Bug #53993 [NEW]: "Command out of sync" after CALL
From:
Operating system: WinXP SP3 & Win Server 2003 R2
PHP version: 5.3.5
Package: MySQLi related
Bug Type: Bug
Bug description:"Command out of sync" after CALL
Description:
------------
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:
---------------
http://forums.mysql.com/read.php?52,407069,407203#msg-407203
Expected result:
----------------
array(1) {
[0]=>
array(1) {
["VERSION()"]=>
string(16) "5.1.51-community"
}
}
array(1) {
[0]=>
array(1) {
["VERSION()"]=>
string(16) "5.1.51-community"
}
}
Actual result:
--------------
array(1) {
[0]=>
array(1) {
["VERSION()"]=>
string(16) "5.1.51-community"
}
}
object(mysqli)#1 (17) {
["affected_rows"]=>
int(1)
["client_info"]=>
string(48) "mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $"
["client_version"]=>
int(50007)
["connect_errno"]=>
int(0)
["connect_error"]=>
NULL
["errno"]=>
int(2014)
["error"]=>
string(52) "Commands out of sync; you can't run this command now"
["field_count"]=>
int(1)
["host_info"]=>
string(20) "localhost via TCP/IP"
["info"]=>
NULL
["insert_id"]=>
int(0)
["server_info"]=>
string(16) "5.1.51-community"
["server_version"]=>
int(50151)
["sqlstate"]=>
string(5) "HY000"
["protocol_version"]=>
int(10)
["thread_id"]=>
int(12)
["warning_count"]=>
int(0)
}
Fatal error: Call to a member function fetch_assoc() on a non-object in
<path>\test_call.php on line 21
--
Edit bug report at http://bugs.php.net/bug.php?id=53993&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53993&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53993&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53993&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53993&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53993&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53993&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53993&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53993&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53993&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53993&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53993&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53993&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53993&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53993&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53993&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53993&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53993&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53993&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53993&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53993&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53993&r=mysqlcfg
Thread (3 messages)
- doqnach at miraizou dot net