ID: 35333 Updated by: [EMAIL PROTECTED] Reported By: camka at email dot ee -Status: Assigned +Status: Bogus Bug Type: MySQLi related Operating System: WinXP, Linux PHP Version: 5CVS-2005-11-22 (snap) Assigned To: georg New Comment:
Can't repeat: <?php $mysql = new mysqli('localhost', 'test', 'php', 'test'); printf("Client version: %s\n", $mysql->client_version); printf("Server version: %s\n", $mysql->server_version); $mysql->multi_query('drop temporary table if exists z1; create temporary table z1(u int);'); printf("Error: %s\n", $mysql->error); $mysql->multi_query("SELECT 1;SELECT 2"); printf("Error: %s\n", $mysql->error); $mysql->query("SELECT count(*) from z1"); printf("Error: %s\n", $mysql->error); $mysql->close(); ?> Output: php -f 35333.php Client version: 50015 Server version: 50015 Error: Packets out of order (Found: 2, expected 1) Error: Lost connection to MySQL server during query Error: MySQL server has gone away Previous Comments: ------------------------------------------------------------------------ [2005-11-25 12:58:46] [EMAIL PROTECTED] Georg, as mysql dude, could you explain what's the problem with MySQL Client and why it's not PHP problem? ------------------------------------------------------------------------ [2005-11-25 11:12:26] camka at email dot ee Cannot repeat the problem using C mysql API. Looks like still the mysqli extension error. http://bugs.mysql.com/bug.php?id=15181 ------------------------------------------------------------------------ [2005-11-23 09:30:27] [EMAIL PROTECTED] Report that to Mysql, it is not PHP problem. ------------------------------------------------------------------------ [2005-11-22 23:15:51] camka at email dot ee but still, if i use selects in multi_query: $s -> multi_query("select 1;select 2"); and then $s -> query("select 3"); i get more understandable error - 2014 - Commands out of sync; you can't run this command now Why then the server goes away in case of non-select queries? Out of sync error would be less confusing. ------------------------------------------------------------------------ [2005-11-22 19:42:49] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php After executing mysqli_multi_query you have first process the resultsets before sending any another statement to the server, otherwise your socket is still blocked. Please note that even if your multi statement doesn't contain SELECT queries, the server will send result packages containing errorcodes (or OK packet) for single statements. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/35333 -- Edit this bug report at http://bugs.php.net/?id=35333&edit=1