|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53425 mysqli_real_connect() ignores client flags when built to call libmysql
Submitted: 2010-11-29 23:55 UTC Modified: 2010-12-12 19:04 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tre-php-net at crushedhat dot com Assigned: kalle (profile)
Status: Closed Package: MySQLi related
PHP Version: trunk-SVN-2010-11-29 (SVN) OS:
Private report: No CVE-ID: None
 [2010-11-29 23:55 UTC] tre-php-net at crushedhat dot com
The MySQLi PHP extension has a build option, MYSQLI_USE_MYSQLND, that selects between calling the old library libmysql (FALSE) and the new native driver mysqlnd (TRUE). When built to call mysqlnd, the client flags passed in to mysqli_real_connect() (e.g. MYSQLI_CLIENT_FOUND_ROWS) are properly passed down. However, when built to call libmysql, the passed client flags are ignored. I can see no reason for this except that it was an oversight in the change that added the flags argument:

The attached trivial patch fixes this.

As current releases of Fedora/RHEL/CentOS (and probably other distributions and platforms) build the MySQLi PHP extension to call libmysql, this is still a relevant issue.


mysqli_fix_client_flags (last revision 2010-11-29 22:55 UTC by tre-php-net at crushedhat dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-12 18:55 UTC]
-Status: Open +Status: Suspended -Assigned To: +Assigned To: kalle
 [2010-12-12 18:57 UTC]
-Status: Suspended +Status: Assigned
 [2010-12-12 19:00 UTC]
Automatic comment from SVN on behalf of kalle
Log: Fixed bug #53425 (mysqli_real_connect() ignores client flags when built to call libmysql)

# Based on patch by tre-php-net at crushedhat dot com
 [2010-12-12 19:04 UTC]
-Status: Assigned +Status: Closed
 [2010-12-12 19:04 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 17:01:29 2024 UTC