When you have a stored procedure that returns a result set, it seems that the server returns its results the same way as with a multi-query. As a result, if you don't set the multi-query option when setting up the connection with the C API, the server refuses to return the result set. You get this error:

"PROCEDURE foo can't return a result set in the given context"

If you set this flag in the mysql_real_connect() call, the stored procedure works fine. But if you set it with mysql_set_server_option(), only regular multi-queries work fine; stored procedures returning result sets still fail. According to this manual page:

        http://dev.mysql.com/doc/mysql/en/c-api-multiple-queries.html

the two invocations should be equivalent.

Due to the way my program is structured, it is highly inconvenient to set this flag in the real_connect call. I would much rather set it on the connection after it is established.

Is there a good reason why the server behaves differently than the manual indicates, or is it a bug?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to