ID: 36658 Updated by: [EMAIL PROTECTED] Reported By: jacob at aub dot dk -Status: Open +Status: Bogus Bug Type: MySQLi related Operating System: FreeBSD PHP Version: 5.1.2 New Comment:
Can't reproduce (tested with MySQL 5.0.18 Server and client libs). As expected I'm always getting error "Packets out of order (Found: 2, expected 1)". This is correct behaviour, the server sends two errorcode packets. Previous Comments: ------------------------------------------------------------------------ [2006-03-08 21:30:32] jacob at aub dot dk Description: ------------ I'm seeing indeterministic behaviour from mysqli_multi_query(). In #35333 it is stated that one must process the result sets from mysql before executing another query. The following seem to somewhat disprove that, as it works sometimes. If processing of resultsets is a requirement then I believe the documentation should be updated to reflect this as it is not consistent behaviour in regard to regular query() calls, as I can perform multiple query() calls without processing anything. Reproduce code: --------------- <?php require_once('dbsettings.php'); $mysqli = new mysqli($hostname, $username, $password, $database); $mysqli->multi_query("CREATE TABLE IF NOT EXISTS bar(id int); INSERT INTO bar(id) VALUES(1); "); $result = $mysqli->query("SELECT COUNT(*) FROM bar"); if($result === FALSE) { print "ERROR: ".$mysqli->error."\n"; } else { $row = $result->fetch_assoc(); print $row['COUNT(*)']."\n"; } ?> Expected result: ---------------- % php multiquerybug.php 3 % php multiquerybug.php 4 % php multiquerybug.php 5 Actual result: -------------- % php multiquerybug.php 3 % php multiquerybug.php ERROR: MySQL server has gone away % php multiquerybug.php 5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36658&edit=1