MySQL Forums
Forum List  »  MyISAM

Lost rows after changing MAX_ROWS on 4GB table
Posted by: Bart van Bragt
Date: August 15, 2005 07:26AM

I just ran into a problem with one of my tables which started giving me 'Table is full' error messages. The .MYD file was 4294967252 bytes at that time, I found: http://dev.mysql.com/doc/mysql/en/table-size.html and changed 'MAX_ROWS'. This took a (long) while, after the change I could insert rows again but at a cost. I've lost some 42.000 rows.

mysql> SHOW TABLE STATUS FROM bokt_forum like 'new_posts'\G
*************************** 1. row ***************************
Name: new_posts
Type: MyISAM
Row_format: Dynamic
Rows: 9629507
Avg_row_length: 446
Data_length: 4294967252
Max_data_length: 4294967295
Index_length: 783155200
Data_free: 0
Auto_increment: 9722779
Create_time: 2005-06-16 23:48:39
Update_time: 2005-08-15 13:28:46
Check_time: 2005-06-17 00:32:26
Create_options:
Comment:
1 row in set (0.00 sec)

mysql> alter table new_posts MAX_ROWS=40000000 AVG_ROW_LENGTH=500;
Query OK, 9587346 rows affected (59 min 58.22 sec)
Records: 9587346 Duplicates: 0 Warnings: 0


Check out the difference between 'rows' (9629507) and 'rows affected' (9587346). Nothing was happening with the database between those two queries. The current size of the table is 4274457336 bytes BTW. This table contains some 20 ints and varchars and it also contains a 'mediumtext' column. I'm currently running MySQL version 4.0.13-standard (which is very ancient, I know. Really, really need to upgrade). I do have a backup of most of the lost rows but restoring those rows is rather time consuming and I don't have all the rows in the backup (missing approx 3000 rows that have been inserted today).

Does anyone know what happened and how I can fix this?

Options: ReplyQuote


Subject
Views
Written By
Posted
Lost rows after changing MAX_ROWS on 4GB table
6265
August 15, 2005 07:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.