#35333 [Opn->Fbk]: MySQL server goes away after multi_query and before the next query.
| From: | sniper@php.net | Date: | Tue, 22 Nov 2005 16:49:01 +0000 |
| Subject: | #35333 [Opn->Fbk]: MySQL server goes away after multi_query and before the next query. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-88709@lists.php.net to get a copy of this message | ||
ID: 35333
Updated by: sniper@php.net
Reported By: camka at email dot ee
-Status: Open
+Status: Feedback
Bug Type: MySQLi related
Operating System: WinXP, Linux
PHP Version: 5.0.5
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-11-22 16:07:36] camka at email dot ee
may be related to bug #31668
------------------------------------------------------------------------
[2005-11-22 16:06:59] camka at email dot ee
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 this bug report at http://bugs.php.net/?id=35333&edit=1