Does CHECK TABLE add read/write locks?

Posted by Ztyx on Server Fault See other posts from Server Fault or by Ztyx
Published on 2010-10-08T09:45:17Z Indexed on 2011/01/11 10:55 UTC
Read the original article Hit count: 201

Filed under:

Hi,

Yesterday I ran CHECK TABLE on a table that is read very frequently. I scanned the MySQL documentation for CHECK TABLE for any mentions of "lock" (and found none) and also noticed that only SELECT privilege was required to run the command. I therefor concluded that the command did not do any read lock and was safe to run even in production.

Sadly, running the command took 1 minute and 37 seconds and seemed to block all read access. My question is therefor, does CHECK TABLE do any read lock? Any other reason why I experienced a read block on the table?

Thanks

© Server Fault or respective owner

Related posts about mysql