php.net |  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
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tre-php-net at crushedhat dot com
New email:
PHP Version: OS:

 

 [2010-11-29 23:55 UTC] tre-php-net at crushedhat dot com
Description:
------------
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:

http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_nonapi.c?r1=251525&r2=252376&pathrev=303911

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.



Patches

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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-12 18:55 UTC] kalle@php.net
-Status: Open +Status: Suspended -Assigned To: +Assigned To: kalle
 [2010-12-12 18:57 UTC] kalle@php.net
-Status: Suspended +Status: Assigned
 [2010-12-12 19:00 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=306278
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] kalle@php.net
-Status: Assigned +Status: Closed
 [2010-12-12 19:04 UTC] kalle@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC