From: camka at email dot ee Operating system: WinXP, Linux PHP version: 5.0.5 PHP Bug Type: MySQLi related Bug description: MySQL server goes away after multi_query and before the next query.
Description: ------------ After running several "non-select" queries with mysqli::multi_query() it's impossible to run mysqli::query() method with some "select" query, the mysqli::error says "MySQL server has gone away". If iterate through all the results of mysqli::multi_query() using mysqli::next_result(), then the program won't issue the "gone away" problem and the following mysqli::query() runs as expected. tried with the latest cvs snapshot. PHP Version 5.0.6-dev Nov 22 2005 10:22:22 On one machine it needs to hit browser's "refresh" button to get an error, on other machine the error comes every single program run. Reproduce code: --------------- <?php $s = new mysqli('localhost', '******', '*******', '*****'); $s -> multi_query('drop temporary table if exists z1; create temporary table z1(u int);'); // if uncomment the following line, the script works as expected // while ($s->next_result()); echo "- ",$s -> error,"<br>"; $s -> query("SELECT count(*) from z1"); echo "- ",$s -> error,"<br>"; $s->close(); ?>qu Expected result: ---------------- - - (two empty errors) Actual result: -------------- - - MySQL server has gone away -- Edit bug report at http://bugs.php.net/?id=35333&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35333&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35333&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35333&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35333&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35333&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35333&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35333&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35333&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35333&r=support Expected behavior: http://bugs.php.net/fix.php?id=35333&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35333&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35333&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35333&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35333&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35333&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35333&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35333&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35333&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35333&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35333&r=mysqlcfg