Home » Performance » MySQL » Error: table is full [ALTER TABLE deleted the rows]
Error: table is full [ALTER TABLE deleted the rows] [message #1690] Thu, 23 August 2007 16:00 Go to next message
mysql_beginner  is currently offline mysql_beginner
Messages: 5
Registered: May 2007
Junior Member
Today when I tried to insert data in a table i received the error that 'table is full'. On SHOW TABLE STATUS, I noticed the size of table is grown to 4GB (rows 5359211).

mysql> SHOW TABLE STATUS LIKE 'messages' \G
*************************** 1. row ***************************
           Name: messages
         Engine: MyISAM
        Version: 9
     Row_format: Dynamic
           Rows: 5359211
 Avg_row_length: 801
    Data_length: 4294967288
Max_data_length: 4294967295
   Index_length: 45783040
      Data_free: 0
 Auto_increment: 5406252
    Create_time: 2007-04-20 18:26:38
    Update_time: 2007-08-22 09:55:22
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options:
        Comment:
1 row in set (0.00 sec)

Here is the table structure.
CREATE TABLE `messages` (
  `id` int(11) NOT NULL auto_increment,
  `subject` varchar(255) NOT NULL default '',
  `message` text NOT NULL,
  `attachment_path` varchar(255) default NULL,
  `new` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



On searching I found the this link.
http://dev.mysql.com/doc/refman/4.1/en/full-table.html

According to manual i executed the following query
ALTER TABLE messages MAX_ROWS=20000000000;

I skipped AVG_ROW_LENGTH from the query, I was confused what should be the value for this.

After executing the query, when i check the table status it displayed totally different picture. Now there were only 170109 rows left.
mysql> SHOW TABLE STATUS LIKE 'messages' \G
*************************** 1. row ***************************
           Name: messages
         Engine: MyISAM
        Version: 9
     Row_format: Dynamic
           Rows: 170109
 Avg_row_length: 649
    Data_length: 110563036
Max_data_length: 281474976710655
   Index_length: 1961984
      Data_free: 0
 Auto_increment: 5409214
    Create_time: 2007-08-23 10:07:08
    Update_time: 2007-08-23 13:41:57
     Check_time: NULL
      Collation: latin1_swedish_ci
       Checksum: NULL
 Create_options: max_rows=4294967295
        Comment:
1 row in set (0.00 sec)


What could be the reason of this rows deletion?

I am on 32 bit system.
MySQL version: 4.1.18-standard-log
Operating System : CentOS 3.x
Memory: 4 GB DDR

[Updated on: Thu, 23 August 2007 16:04]

Re: Error: table is full [ALTER TABLE deleted the rows] [message #1691 is a reply to message #1690 ] Thu, 23 August 2007 16:25 Go to previous messageGo to next message
bproven  is currently offline bproven
Messages: 12
Registered: August 2007
Location: Fort Collins CO
Junior Member
I see something here regarding others that this happened to (see comments): http://jeremy.zawodny.com/blog/archives/000796.html

Never experienced it myself nor tried it. You might have to backup the table first, issue the command to increase the size and then do a reload. Might be the only "safe" method(?)

Re: Error: table is full [ALTER TABLE deleted the rows] [message #1692 is a reply to message #1690 ] Thu, 23 August 2007 16:31 Go to previous messageGo to next message
mysql_beginner  is currently offline mysql_beginner
Messages: 5
Registered: May 2007
Junior Member
I have the backup.

One thing I forgot to mention that I executed the ALTER query on MASTER MySQL server (I am in replication environment). But it did not deleted the rows from slave servers. All the slave servers have the correct number or rows.
Re: Error: table is full [ALTER TABLE deleted the rows] [message #1693 is a reply to message #1690 ] Thu, 23 August 2007 16:33 Go to previous message
mysql_beginner  is currently offline mysql_beginner
Messages: 5
Registered: May 2007
Junior Member
Thanks for the link, I have already read this. This also does not mentioned what should I use the value for AVG_ROW_LENGTH?
Previous Topic:select difference between 2 tables (rows from table b that are not in table a)
Next Topic:Left Join Not using index (or how to index this query)?
Goto Forum:
  



Current Time: Thu Jan 8 17:49:16 EST 2009

Total time taken to generate the page: 0.15084 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge