|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-03 02:39 UTC] jprice at netspace dot net dot au
[2006-08-07 11:24 UTC] webvelosix at yahoo dot com
[2006-10-03 05:21 UTC] mehran20 at hotmail dot com
[2006-10-11 09:25 UTC] mehran20 at hotmail dot com
[2006-12-09 10:32 UTC] mike at we11er dot co dot uk
[2007-02-07 04:29 UTC] denis dot podgurskiy at cofelab dot ru
[2008-09-12 11:06 UTC] johannes at schlueters dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 21:00:02 2025 UTC |
Description: ------------ information from phpinfo(); PHP Version 5.1.4 MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 5.0.21 PDO support enabled PDO drivers sqlite, mysql, sqlite2 pdo_mysql PDO Driver for MySQL, client library version 5.0.21 Exception happening when calling several stored procedure or query after store procedure execution. When calling MySQL Stored Procedure, MySQL returns several rowset and probably that's why PDO driver for MySQL has problem. It works fine if just SELECT statements would be used. After Exception (Lost connection to MySQL ...) any attempts to connect to database will throw new exception : Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in Thanks, Stanislav Beletsky Reproduce code: --------------- /* DELIMITER $$; DROP PROCEDURE IF EXISTS `sccc`.`proc_Testing`$$ CREATE PROCEDURE `proc_Testing`() BEGIN SELECT 1; END$$ DELIMITER ;$$ */ $conn=new PDO("mysql:host=192.168.2.127;dbname=sccc","","",array(PDO::ATTR_PERSISTENT=>true)); $conn->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION); $comm=$conn->query("CALL proc_Testing()"); $comm->execute(); $comm->fetchAll(); $comm->closeCursor(); $comm=null; //actually any SQL query will throw exception $comm=$conn->query("CALL proc_Testing()"); $comm->execute(); $comm->fetchAll(); $comm->closeCursor(); $comm=null; //<-- Exception //Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query' in Expected result: ---------------- No errors Actual result: -------------- Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query' in or Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in after first one