This could cause para_server to hang in case the child process issued
a query which does not yield a result. It's hard to hit though. Fix is
to take the lock before the call to real_query, and release it after
mysql_store_result().
The patch also fixes a format string bug which was introduced by the patch
that switched to my_ulonglong for suitable variables in mysql_selector.c.
These need "%lli".