|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52623 PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported in mysqlnd
Submitted: 2010-08-17 12:17 UTC Modified: 2010-08-20 13:04 UTC
Avg. Score:4.0 ± 0.9
Reproduced:3 of 4 (75.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: gasper dot kozak at gmail dot com Assigned:
Status: Wont fix Package: MySQL related
PHP Version: 5.3SVN-2010-08-17 (SVN) OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
10 + 32 = ?
Subscribe to this entry?

 [2010-08-17 12:17 UTC] gasper dot kozak at gmail dot com
Seems as if mysqlnd driver doesn't support PDO::MYSQL_ATTR_MAX_BUFFER_SIZE 

In pdo_mysql.c (from svn
src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c), I can see:


So, this constant (and some others) are only defined when mysqlnd isn't the 
active driver.

Test script:

Expected result:
Output 1005

Actual result:
Fatal error: Undefined class constant 'MYSQL_ATTR_MAX_BUFFER_SIZE' in php shell 
code on line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-20 12:21 UTC]
-Status: Open +Status: Wont fix
 [2010-08-20 12:21 UTC]
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.
 [2010-08-20 13:04 UTC] gasper dot kozak at gmail dot com
I understand, the constant has no effect on how mysqlnd behaves. Wouldn't it then 
be better to just enable the constant, for cross-platform compatibility reasons? 
Currently users have to explicitly check for the constant and pass different 
options, if it's needed on mysql/mysqli.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 13:01:29 2024 UTC