Bug #31181 innodb_table_monitor locks the Mysql Server while it is dumping data
Submitted: 25 Sep 2007 5:00 Modified: 8 Jan 2008 19:31
Reporter: Cristian Gafton Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.45 OS:Linux
Assigned to: CPU Architecture:Any

[25 Sep 2007 5:00] Cristian Gafton
After issuing the 
    create table innodb_table_monitor(a integer) engine=innodb;
request, the mysql server begins dumping its data structures into the log. While this dumping action is happening, no queries are being processed and the dumping can not be shut down. On a production server with over 7000 databases this can cause an hour long outage.

Furthermore, not even a shutdown request (nor a kill -TERM) are honored, leaving the site admin with no choice but to watch and wait for the dumping action to finish.

How to repeat:
Database server running with innodb as the default tablespace storage.

Create a few thousand databases, with about 50-75 tables each. Start up the innodb_table_monitor and watch as no other queries/connections are being processed by the MySQL server.

Or, attempt to shut down the mysql server immediately after the dump is started. The server will finish the dump first and then honor the shutdown request.

Suggested fix:
There should be a way to cancel an innodb monitor, or have it not take over the entire database server, or have the monitors stop and give up when receiving a -TERM signal.
[8 Dec 2007 19:31] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.51, and inform about the results.
[9 Jan 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".