16.08.2015, 23:19
Are you using the MyISAM engine by any chance? Try switching to InnoDB. MyISAM uses table level locking which may be a problem in case of lots of concurrent inserts. InnoDB uses row level locking making this much less of a problem.
Your original inquiry can be solved by setting a variable when the query is sent and unsetting it when it has been processed.
Your original inquiry can be solved by setting a variable when the query is sent and unsetting it when it has been processed.