Bug #752 Open Handler with REPAIR/ANALYZE/OPTIMIZE don't work properly
Submitted: 29 Jun 2003 23:40 Modified: 30 Jun 2003 7:56
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.13 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[29 Jun 2003 23:40] Georg Richter
Description:
When you send a REPAIR, ANALYZE or OPTIMIZE TABLE and you have an open HANDLER on this table, it's locked until process is killed

How to repeat:
mysql> create table a (a int);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into a values (1),(2),(3);
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> handler a open;
Query OK, 0 rows affected (0.00 sec)

mysql> repair table a;
+--------+--------+----------+----------+
| Table  | Op     | Msg_type | Msg_text |
+--------+--------+----------+----------+
| test.a | repair | status   | OK       |
+--------+--------+----------+----------+
1 row in set (0.00 sec)

mysql> select count(*) from a;
[30 Jun 2003 7:56] Sergei Golubchik
Thank you for your bug report. This issue has been fixed in the latest
development tree for that product. You can find more information about
accessing our development trees at 
    http://www.mysql.com/doc/en/Installing_source_tree.html

fixed in 4.0.14