|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53993 "Command out of sync" after CALL
Submitted: 2011-02-11 09:51 UTC Modified: 2011-05-10 17:15 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: doqnach at miraizou dot net Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.3.5 OS: WinXP SP3 & Win Server 2003 R2
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.
Block user comment
Status: Assign to:
Bug Type:
From: doqnach at miraizou dot net
New email:
PHP Version: OS:


 [2011-02-11 09:51 UTC] doqnach at miraizou dot net
I'm having problems doing a SELECT query after having done a CALL to a stored procedure.

see bug #48065 and bug #35203

The statement by schwern at pobox dot com at bug #48065 clearly states my view on this as well.

This 'issue' is not bogus and it's strange that you have to handle a CALL completely different from a normal SELECT even though the rest of the logic is exactly the same.

I have made a post at the mysql support forum when trying to figure out what was going wrong which contains a working test script.

multi query should not have to be the only solution for this.

Test script:

Expected result:
array(1) {
  array(1) {
    string(16) "5.1.51-community"

array(1) {
  array(1) {
    string(16) "5.1.51-community"

Actual result:
array(1) {
  array(1) {
    string(16) "5.1.51-community"
object(mysqli)#1 (17) {
  string(48) "mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $"
  string(52) "Commands out of sync; you can't run this command now"
  string(20) "localhost via TCP/IP"
  string(16) "5.1.51-community"
  string(5) "HY000"

Fatal error: Call to a member function fetch_assoc() on a non-object in <path>\test_call.php on line 21


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-09 15:05 UTC]
This is somewhat beyond the scope of the PHP drivers. The PHP drivers follow MySQL Client Server protocol. Given you don't like the protocol and its handling of certain queries - with the need to fetch result sets in some cases - you should direct your request to the database vendor but not to and the PHP drivers. This is not a PHP driver specific issue.
 [2011-05-10 17:15 UTC]
-Status: Open +Status: Bogus
 [2011-05-10 17:15 UTC]
Sorry, but that's how it is. Check the docs and fetch all result sets before running new statement.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 17 03:05:44 2022 UTC