"Commands out of sync" issue
Posted: Sat 12 Apr 2008 20:30
Hey guys. I found another bug. MyDeveloper Studio is getting stuck with "Commands out of sync" error. Here are steps to reproduce:
1) Create new stored procedure with following code:
2) Call it using query "call GetTest(0);".
3) You will see first resultset with numbers.
4) Now you're screwed. Any further queries will cause "Commands out of sync" error. All you can do is to restart MyDeveloper Studio which obviously sucks.
As I see here
http://dev.mysql.com/doc/refman/5.0/en/ ... -sync.html
it's client-side problem (MyDeveloper Studio in this case) which doesn't fetch all returned recordsets or at least doesn't cleanup statement object. I tested same SP in Aqua Data Studio and it works fine. I know that I can see both recordsets if I switch to Card View mode, but still mysql_free_result() needs to be called.
Thank you.
1) Create new stored procedure with following code:
Code: Select all
CREATE PROCEDURE GetTest(IN nTestId INT(11))
BEGIN
select 0, 1, 3
union
select 4, 5, 6;
select "A", "B";
END
3) You will see first resultset with numbers.
4) Now you're screwed. Any further queries will cause "Commands out of sync" error. All you can do is to restart MyDeveloper Studio which obviously sucks.
As I see here
http://dev.mysql.com/doc/refman/5.0/en/ ... -sync.html
it's client-side problem (MyDeveloper Studio in this case) which doesn't fetch all returned recordsets or at least doesn't cleanup statement object. I tested same SP in Aqua Data Studio and it works fine. I know that I can see both recordsets if I switch to Card View mode, but still mysql_free_result() needs to be called.
Thank you.