Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Googling around, there are several reports of the same error, but little information to solve the problem. There's even a <a href="http://bugs.mysql.com/bug.php?id=25983" rel="nofollow noreferrer">bug</a> logged at mysql.com but it appears to have been abandoned without being resolved. </p> <p>There's another StackOverflow <a href="https://stackoverflow.com/questions/1111586/mac-osx-mysql-update-stored-procedure">question</a> on the same error, but it's also unresolved.</p> <p>All it means is that there is no result set from the query. Looking at the source code, it appears that sometimes an error status of <code>MYX_SQL_ERROR</code> is set when the query has no result set. Perhaps this is not an appropriate consequence?</p> <p>I notice that when I use the <code>mysql</code> command-line client, it yields no error for calling a proc that returns no result set. </p> <hr> <p><strong>update:</strong> I tried to revive that MySQL bug report, and provide a good test case for them. They changed the bug from "no feedback" to "verified" -- so at least they acknowledge it's a bug in Query Browser:</p> <blockquote> <p>[11 Dec 9:18] Sveta Smirnova </p> <p>Bill,</p> <p>thank you for the feedback. Verified as described.</p> <p>Although most likely this only be fixed when MySQL Query Browser functionality is part of MySQL workbench.</p> </blockquote> <p>I guess the workaround is to ignore the -1 error, or to test your stored procedures in the command-line <code>mysql</code> client, where the error does not occur.</p> <p>The comment supposes the issue will disappear as the Query Browser functionality becomes part of MySQL Workbench. This is <a href="http://wb.mysql.com/?page_id=15" rel="nofollow noreferrer">supposed to happen</a> in <a href="http://dev.mysql.com/downloads/select.php?id=8" rel="nofollow noreferrer">MySQL Workbench 5.2</a>. I'll download this beta and give it a try.</p> <p>MySQL Workbench 5.2 is in Beta, but I would assume MySQL engineering can't predict when the Beta will become GA. Those kinds of predictions are hard enough under standard conditions, but there's a lot of extra uncertainty of MySQL's fate due to the unresolved Oracle acquisition.</p> <hr> <p><strong>update:</strong> Okay, I have tried MySQL Workbench 5.2.10 beta. I executed a stored procedure like this:</p> <pre><code>CREATE PROCEDURE FooProc(doquery SMALLINT) BEGIN IF doquery THEN SELECT * FROM Foo; END IF; END </code></pre> <p>When I <code>CALL FooProc(0)</code> the response is no result set, and the status is simply "OK".</p> <p>When I <code>CALL FooProc(1)</code> the response is the result of <code>SELECT * FROM Foo</code> as expected.</p> <p>However, there's another bug related to calling procedures. Procedures may have multiple result sets, so it's hard to know when to close the statement when you execute a <code>CALL</code> query. The consequence is that MySQL Workbench 5.2 <em>doesn't</em> close the statement, and if you try to do another query (either <code>CALL</code> or <code>SELECT</code>) it gives you an error:</p> <blockquote> <p>Commands out of sync; you can't run this command now.</p> </blockquote> <p>MySQL doesn't support multiple concurrent open queries. So the last one must be closed before you can start a new one. But it isn't closing the <code>CALL</code> query. This <a href="http://bugs.mysql.com/bug.php?id=49553" rel="nofollow noreferrer">bug</a> is also logged at the MySQL site.</p> <hr> <p>The bug about commands out of sync has been resolved. They say it's fixed in MySQL Workbench 5.2.11.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload