|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-31 15:55 UTC] tony2001@php.net
[2006-01-31 17:03 UTC] antleclercq at online dot fr
[2006-03-01 12:57 UTC] antleclercq at online dot fr
[2006-04-30 01:01 UTC] wez@php.net
[2006-05-06 15:27 UTC] antleclercq at online dot fr
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
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 )