Description:
There is a typo in the documentation of CSV storage engine.
If table is marked as corrupt, then CSV does not automatically repaired when we run next check command. But documentation says, once table has been marked as corrupt then it is automatically repaired when we run next check command.
But it work when we run using select statement and repair command.
I didn't understand what is the bug. It is the documentation mistake or a bug in the CSV storage engine.
How to repeat:
For your information
mysql> select * from csv;
+----+------+
| id | addr |
+----+------+
| 1 | hyd |
| 2 | sc |
| 3 | bza |
| 4 | vzag |
+----+------+
4 rows in set (0.00 sec)
mysql> check table csv;
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| test.csv | check | error | Corrupt |
+----------+-------+----------+----------+
1 row in set (0.02 sec)
mysql> check table csv;
+----------+-------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+-------+----------+----------+
| test.csv | check | error | Corrupt |
+----------+-------+----------+----------+
1 row in set (0.00 sec)
mysql> select * from csv;
+----+------+
| id | addr |
+----+------+
| 1 | hyd |
| 2 | sc |
| 3 | bza |
+----+------+
3 rows in set, 1 warning (0.01 sec)
mysql> show warnings;
+-------+------+---------------------------------------------------------+
| Level | Code | Message |
+-------+------+---------------------------------------------------------+
| Error | 1194 | Table 'csv' is marked as crashed and should be repaired |
+-------+------+---------------------------------------------------------+
1 row in set (0.00 sec)