Req #52623 [Opn->Wfx]: PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported in mysqlnd
| From: | andrey@php.net | Date: | Fri, 20 Aug 2010 10:21:39 +0000 |
| Subject: | Req #52623 [Opn->Wfx]: PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported in mysqlnd | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153641@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52623&edit=1
ID: 52623
Updated by: andrey@php.net
Reported by: gasper dot kozak at gmail dot com
Summary: PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported in
mysqlnd
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
Package: MySQL related
Operating System: any
PHP Version: 5.3SVN-2010-08-17 (SVN)
Block user comment: N
New Comment:
This constant is not defined when mysqlnd is enabled because it makes no
sense for mysqlnd. mysqlnd allocates buffers for the data as big as
needed. With libmysql PDO_MYSQL needs to allocate some buffer and hope
that the data will fit in.
Previous Comments:
------------------------------------------------------------------------
[2010-08-17 12:17:53] gasper dot kozak at gmail dot com
Description:
------------
Seems as if mysqlnd driver doesn't support
PDO::MYSQL_ATTR_MAX_BUFFER_SIZE
constant.
In pdo_mysql.c (from svn
http://svn.php.net/repository/php/php-
src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c), I can see:
#ifndef PDO_USE_MYSQLND
REGISTER_PDO_CLASS_CONST_LONG("MYSQL_ATTR_MAX_BUFFER_SIZE",
(long)PDO_MYSQL_ATTR_MAX_BUFFER_SIZE);
...
#endif
So, this constant (and some others) are only defined when mysqlnd isn't
the
active driver.
Test script:
---------------
echo PDO::MYSQL_ATTR_MAX_BUFFER_SIZE;
Expected result:
----------------
Output 1005
Actual result:
--------------
Fatal error: Undefined class constant 'MYSQL_ATTR_MAX_BUFFER_SIZE' in
php shell
code on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52623&edit=1