php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35637 Mysqli "Lost connection to MySQL server during query"
Submitted: 2005-12-11 22:49 UTC Modified: 2005-12-13 11:33 UTC
From: realbenzin at inbox dot lv Assigned: georg (profile)
Status: Not a bug Package: MySQLi related
PHP Version: 5CVS-2005-12-12 (snap) OS: Win XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: realbenzin at inbox dot lv
New email:
PHP Version: OS:

 

 [2005-12-11 22:49 UTC] realbenzin at inbox dot lv
Description:
------------
When mysql stored procedures are called twice in a row I get  mysqli error "Lost connection to MySQL server during query", it does not happen if I do it once or in row with simple sql statements... Mysql is ok, and no free_result is helping...

Reproduce code:
---------------
$db = new mysqli('localhost','root','qwerty','VT_SYS');
$u = $db->query("call spRazList(NULL);");
$u = $db->query("call spRazList(NULL);") or die('asdasdad'.$db->error);

Expected result:
----------------
That stored procedure would execute twice with no errors.

Actual result:
--------------
Mysqli error "Lost connection to MySQL server during query"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-11 23:12 UTC] sniper@php.net
What mysql version are you connecting to?
 [2005-12-11 23:22 UTC] realbenzin at inbox dot lv
5.0.15
 [2005-12-11 23:30 UTC] tony2001@php.net
Duplicate of bug #32882.
 [2005-12-12 07:11 UTC] realbenzin at inbox dot lv
It is not the same!!!!! Because I am calling the sp twice and sp contains only one select not two like in that other "bug". PS i red about that multi query, but that won`t help me...
 [2005-12-12 07:53 UTC] sniper@php.net
How about showing how you defined the procedure?
 [2005-12-12 11:51 UTC] realbenzin at inbox dot lv
Ok here is sp:
DELIMITER $$

DROP PROCEDURE IF EXISTS `vt_sys`.`spRazList` $$
CREATE PROCEDURE `spRazList`(r_id int unsigned)
BEGIN
  SELECT
    RAZ_ID,
    RAZ_NOS,
    RAZ_NMR,
    RAZ_KONTA_NR
  FROM
    RAZOTAJS
  WHERE
    RAZ_ID = IFNULL(r_id,RAZ_ID);
END $$

DELIMITER ;
 [2005-12-12 13:22 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2005-12-12 14:09 UTC] realbenzin at inbox dot lv
Nop still the same problem..
 [2005-12-12 23:13 UTC] georg@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

see also #35333, #35203
 [2005-12-13 11:33 UTC] realbenzin at inbox dot lv
Sorry #35203 was identical...
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu May 26 06:05:47 2022 UTC