Bug #29351 Archive tables corrupt when run "show table status"
Submitted: 26 Jun 2007 4:57 Modified: 26 Jul 2007 9:58
Reporter: M.L L Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.16 OS:Any
Assigned to: CPU Architecture:Any

[26 Jun 2007 4:57] M.L L
Description:
When you have more then 300~400 plus of archive tables. All are the same kind of table structure, each purpose to hold 1 hour data.

During creation of each table, insert data & select back the data is success, but when if you try to run the command "show table status from xxx", suppose it will list out all the table from the db, but you will find out that from some where middle to the list show that all table corrupted.

After that you try to select the those table that show table status listed as corrupt, you can no more access it but getting the error

Error Code : 1034
Incorrect key file for table 'tbl_331'; try to repair it
(0 ms taken)
 

How to repeat:
1 create a database (let's name if db_test)

2 Write a loop program to generate 400 of table using archive engine with same column structure (let say name as tbl_1 ~ tbl_400)

3 Write a loop program to access those tables (using select query) to prove those tables no corrupt in the first place.

4 Run the status query "show table status from db_test" to list out all those tables from the database "db_test". Suprise !! it show that almost partial of yr tables are corrupted !! funny....

5 You try to run the step 3 again, then you will find out that those tables that mention on step 4 as corrupt are very corrupted. Is like step 4 will make those tables corrupt

Note: if you use myisam or innodb engine, such issue will not happen...

Suggested fix:
.
[26 Jun 2007 9:58] MySQL Verification Team
Hi!  I couldn't repeat the problem.  Can you try with latest version of 5.0.41 and let us know if they still get corrupt?  If they do please show a table structure for 1 table, and upload my.cnf file. Thanks.
[26 Jul 2007 23: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".