On 4/23/2012 2:44 PM, Franz Engel wrote:
>
> query.store() doesn't wait until the server works.
store() returns when it has all of the result sets you asked for. If it
returns before the server-side action is completed, it's because
whatever long-running action you're asking MySQL to do doesn't involve
returning result sets. You should probably be using execute() in that case.
Moving to execute() isn't going to prevent MySQL from doing things
asynchronously if it thinks it can do so safely. It's not MySQL++'s
place to second-guess the server, blocking on an asynchronous operation.
Perhaps there is a SQL command that you can use to figure out the
server's state. Or, maybe you could parse what you need out of the
Connection::server_status() return value.