#36228 [NEW]: Loosing connection to db while executing 2 Multi-Statements requests with PDO

From: Date: Tue, 31 Jan 2006 14:12:58 +0000
Subject: #36228 [NEW]: Loosing connection to db while executing 2 Multi-Statements requests with PDO
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92701@lists.php.net to get a copy of this message
From: antleclercq at online dot fr Operating system: Ubuntu Linux (breezy) PHP version: 5.1.2 PHP Bug Type: MySQL related Bug description: Loosing connection to db while executing 2 Multi-Statements requests with PDO Description: ------------ Hello, Executing 2 multi-statement queries gives you the following error : 2013 - Lost connection to MySQL server during query I reproduced this error using 5.1.0RC3 and 5.1.2. My MySQL version is 4.1.12, and I have the right MySQL / PDO connector. Thanks, Antoine Reproduce code: --------------- <?php $dbh = new PDO("mysql:dbname=karibou;host=localhost", "user", "password"); try { $qry = "DELETE FROM addressbook_address WHERE profile_id=2 ; \n"; $qry .= "DELETE FROM addressbook_phone WHERE profile_id=2 ; \n"; //No error $dbh->exec($qry); //The folowing line displays : Array ( [0] => 00000 ) print_r($dbh->errorInfo()); //This second exec statement produces the error : "Lost connection to MySQL server during query" $dbh->exec($qry); //The following line displays : Array ( [0] => HY000 [1] => 2013 [2] => Lost connection to MySQL server during query ) print_r($dbh->errorInfo()); } catch (PDOException $e) { print $e->getMessage(); die(); } ?> Expected result: ---------------- None of the exec should return an error. Actual result: -------------- The second exec returns a 2013 error (Lost connection...). Array ( [0] => HY000 [1] => 2013 [2] => Lost connection to MySQL server during query ) -- Edit bug report at http://bugs.php.net/?id=36228&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36228&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36228&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36228&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36228&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36228&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36228&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36228&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36228&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36228&r=support Expected behavior: http://bugs.php.net/fix.php?id=36228&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36228&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36228&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36228&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36228&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36228&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36228&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36228&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36228&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36228&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36228&r=mysqlcfg

« previous php.bugs (#92701) next »