#49027 [Opn]: mysqli_options doesn't work when using mysqlnd
| From: | andreas dot streichardt at globalpark dot com | Date: | Thu, 23 Jul 2009 10:11:18 +0000 |
| Subject: | #49027 [Opn]: mysqli_options doesn't work when using mysqlnd | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140114@lists.php.net to get a copy of this message | ||
ID: 49027
User updated by: andreas dot streichardt at globalpark dot com
Reported By: andreas dot streichardt at globalpark dot com
Status: Open
Bug Type: MySQLi related
Operating System: Linux
PHP Version: 5.3.0
New Comment:
Sorry for the dups but i got an error and a blank page when submitting
the bug and thought it didn't make it into the bug system :S
Authentication failed: Incorrect username Authentication failed:
Incorrect username
Warning: Cannot modify header information - headers already sent by
(output started at /home/Web/sites/php-bugs-web/include/auth.inc:30) in
/home/Web/sites/php-bugs-web/report.php on line 195
Previous Comments:
------------------------------------------------------------------------
[2009-07-23 09:07:38] andreas dot streichardt at globalpark dot com
Description:
------------
mysqli_real_connect() doesn't honor init commands previously set with
mysqli_options($x,MYSQLI_INIT_COMMAND) when using the mysqlnd driver.
I am not sure if this is simply a missing feature or a bug. At least
this is a documentation problem as it isn't noted anywhere.
Ideally if this is not a bug mysqli_options should return false so one
notices that it isn't supported yet.
This problem only appears when using mysqlnd as the driver.
mysql> SELECT version();
+----------------+
| version() |
+----------------+
| 5.4.1-beta-log |
+----------------+
But i don't think this is related to the database version, is it?
Reproduce code:
---------------
$handle=mysqli_init();
if (!mysqli_options($handle,MYSQLI_INIT_COMMAND,"testtest"))
print "Broken!\n";
if
(!@mysqli_real_connect($handle,"localhost","root","","test",3306))
print "Connection broken!\n";
Expected result:
----------------
Connection broken! (testtest is not a valid query)
If the general log is activated you should see the query in the log
Actual result:
--------------
blank output (database connection was successful - assuming that the
credentials provided in the connection string work).
no "testtest" query in the general log
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49027&edit=1