5.1中repair table
mysql> repair table xs;
+---------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+---------+--------+----------+----------+
| lina.xs | repair | status | OK |
+---------+--------+----------+----------+
1 row in set (0.00 sec)
mysql> show profiles;
+----------+------------+-----------------------------------------------------+
| Query_ID | Duration | Query |
+----------+------------+-----------------------------------------------------+
| 1 | 0.00469700 | alter table xs modify age int not null default 3 |
| 2 | 0.00023300 | drop table xs |
| 3 | 0.00527100 | create table xs(name varchar(12),age int default 5) |
| 4 | 0.00030300 | insert into xs values('a',4) |
| 5 | 0.00403400 | alter table xs alter column age set default 3 |
| 6 | 0.00088200 | repair table xs |
+----------+------------+-----------------------------------------------------+
6 rows in set (0.00 sec)
mysql> show profile for query 6;
+----------------------+----------+
| Status | Duration |
+----------------------+----------+
| starting | 0.000151 |
| Opening tables | 0.000024 |
| System lock | 0.000008 |
| Table lock | 0.000034 |
| Repair with keycache | 0.000533 |
| Saving state | 0.000112 |
| query end | 0.000004 |
| freeing items | 0.000014 |
| cleaning up | 0.000002 |
+----------------------+----------+
9 rows in set (0.00 sec)