#37732 [NEW]: calling mysqli_multi_query with multiple queries stops subsequent queries

From: Date: Wed, 07 Jun 2006 16:13:38 +0000
Subject: #37732 [NEW]: calling mysqli_multi_query with multiple queries stops subsequent queries
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-98143@lists.php.net to get a copy of this message
From: jerry dot walsh at gmail dot com Operating system: FreeBSD 6.1-STABLE PHP version: 5.1.4 PHP Bug Type: MySQLi related Bug description: calling mysqli_multi_query with multiple queries stops subsequent queries Description: ------------ Calling mysqli_multi_query with multiple insert queries causes subsequent calls to mysqli_query or mysqli_multi_query to fail with a MySQL lost connection to server (err#2031). OS - FreeBSD 6.1 MySQL - 5.0.22 (also tested on 5.0.18) PHP - 5.1.4 MySQLi version - 5.1.4 Reproduce code: --------------- $strTestDatabaseName = "Testdb"; $db_hostname = "localhost"; $db_username = "username"; $db_password = "password"; $m_mysqlTestConn = mysqli_connect($db_hostname, $db_username, $db_password, $strTestDatabaseName); // succeeds... $strSQL="INSERT INTO billingrecurringinvoicedetail (billingrecurringinvoicedetail_quantity, billingrecurringinvoicedetail_dontrecur) VALUES (1,false);INSERT INTO billingrecurringinvoicedetail (billingrecurringinvoicedetail_quantity, billingrecurringinvoicedetail_dontrecur) VALUES (1,false);"; mysqli_multi_query($m_mysqlTestConn, $strSQL) || print ("Database insert Failed:<br>".mysqli_error($m_mysqlTestConn)." Code:".mysqli_errno ($m_mysqlTestConn)); $strSQL="SELECT * FROM billingrecurringinvoice WHERE billingrecurringinvoice_id = 429;"; // fails (mysqli_multi_query($m_mysqlTestConn, $strSQL)) || print ("Database select Failed:<br>".mysqli_error($m_mysqlTestConn)." Code:".mysqli_errno ($m_mysqlTestConn)); $mysql_result = mysqli_store_result($m_mysqlTestConn); mysqli_close($m_mysqlTestConn); Expected result: ---------------- I expected the select to work after the double insert Actual result: -------------- This line fails: $strSQL="SELECT * FROM billingrecurringinvoice WHERE billingrecurringinvoice_id = 429;"; // fails (mysqli_multi_query($m_mysqlTestConn, $strSQL)) || print ("Database select Failed:<br>".mysqli_error($m_mysqlTestConn)." With: Database select Failed: Lost connection to MySQL server during query Code:2013 -- Edit bug report at http://bugs.php.net/?id=37732&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37732&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37732&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37732&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37732&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37732&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37732&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37732&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37732&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37732&r=support Expected behavior: http://bugs.php.net/fix.php?id=37732&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37732&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37732&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37732&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37732&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37732&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37732&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37732&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37732&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37732&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37732&r=mysqlcfg

« previous php.bugs (#98143) next »