This page has been translated from Spanish

...::: Guatewireless.org ::::..

Technology, Software Libre, Guatemala, Open Source, Linux, Wireless, WiFi, Scripting, Debian, CentOS, Gentoo, Redhat, SuSE, Windows

MySQL: The table is full error - resolved

Apart from my regular duties, I am also the DBA (database administrator) and honorary lately I've been correguir troubleshoot errors and MySQL. Everything started with the problem described below:

Among all our databases, there is one in particular that handles an average of 40k transactions per day. This database runs on MySQL which has a table which already exceeds the 21 million records, which make it have the 4 GB of information.

For its size, this error showed MyISAM table The table is full, which at first we thought we might be limitations 2.4.x kernel ext2 file system (if it is a Red Hat Linux 9).

MySQL's 4GB Limit

The MySQL error, the table is full is a message that is displayed when a table reaches 4GB in size, really underestimated the impact, as they are very few applications that may exceed this amount of data. But when we have consolidated our services and our database server MySQL stops working, is a major problem.

It is advisable to make a good analysis and design of our database so that this does not happen. However, sometimes it's hard to imagine that a table can contain 21 million records in two years.

InnoDB tables do not have this limitation because its storage model is completely different. In a MyISAM table with dynamic or variable-length rows, the index file of the table (nombre_tabla.MYI) rows stored using 32-bit pointer in the data file (nombre_tabla.MYI). This has a limit of 4 GB of space.

Remember that most computers are 32bit since technologies like 64-bit AMD Opteron processors also have support for 32bit.

Solving the problem of the table is full

The solution to the table is full is not very dicil, just enough to run the ALTER TABLE command, but it can take considerable time. Consider the example of the creature table Sleeve Length:

  mysql> describe creature; 
  +-----------------+-----------------------+------+ -----+---------+----------------+ 
  | Field          | Type                 | Null | Key | Default | Extra         | 
  +-----------------+-----------------------+------+ -----+---------+----------------+ 
  | Guide           | int (10)     unsigned | NoA | PRI | NULL  | auto_increment | 
  | Ida             | mediumint (8) unsigned | NoA | MUL | 0A      |                | 
  | Map            | smallint (5) unsigned | NoA | MUL | 0A      |                | 
  | SpawnMask      | tinyint (3) unsigned  | NoA |     |   1    |                | 
  | Models        | mediumint (8) unsigned | NoA |     | 0A      |                | 
  | Equipment_id   | mediumint (9)          | NoA |     | 0A      |                | 
  | Position_x     | float                | NoA |     | 0A      |                | 
  | Position_y     | float                | NoA |     | 0A      |                | 
  | Position_z     | float                | NoA |     | 0A      |                | 
  | Orientation    | float                | NoA |     | 0A      |                | 
  | Spawntimesecs  | int (10)     unsigned | NoA |     | 120A    |                | 
  | Spawndist      | float                | NoA |     |  5     |                | 
  | Currentwaypoint | mediumint (8) unsigned | NoA | Â Â Â Â | 0A Â Â Â Â Â | Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â | 
  | Curhealth      | int (10)     unsigned | NoA |     |   1    |                | 
  | Curmana        | int (10)     unsigned | NoA |     | 0A      |                | 
  | DeathState     | tinyint (3) unsigned  | NoA |     | 0A      |                | 
  | MovementType   | tinyint (3) unsigned  | NoA |     | 0A      |                | 
  +-----------------+-----------------------+------+ -----+---------+----------------+ 
  17 rows in set (0.02 sec) 


To find the limit of the size of the table, use the SHOW TABLE STATUS. And note that Max_data_length is 4 GB.

  mysql> SHOW TABLE STATUS LIKE 'creature' \ G;
 *************************** 1.  row ***************************
 Â Â Â Â Â Â Â Â Â Â Name: creature
 Â Â Â Â Â Â Â Â Engine: MyISAM
 Â Â Â Â Â Â Â Version: 10
 Â Â Â Â Row_format: Dynamic
 Â Â Â Â Â Â Â Â Â Â Rows: 95,094
 Â Avg_row_length: 46
 Â Â Â Data_length: 4382696
 Max_data_length: 281474976710655
 Â Â Index_length: 2628608
 Â Â Â Â Â Data_free: 0
 Â Auto_increment: 106,039
 Â Â Â Create_time: 2008-09-19 09:54:05
 Â Â Â Update_time: 2008-09-19 10:31:08
 Â Â Â Â Check_time: 2008-09-19 10:31:09
 Â Â Â Â Â Collation: utf8_general_ci
 Â Â Â Â Â Â Checksum: NULL
 Â Create_options: row_format = DYNAMIC
 Â Â Â Â Â Â Â Comment: Summon System
 1 row in set (0.00 sec)

 ERROR:
 No query specified

 mysql> 



Let's fix this by typing:

  mysql> ALTER TABLE creature AVG_ROW_LENGTH max_rows = 200000000000 = 50;
 Query OK, 0 rows affected (0.03 seconds) 


Now if we run the SHOW TABLE STATUS LIKE 'creature' \ G, we can see idea that the new value Max_data_length: 1099511627775. If so, now we can store more information in our MySQL table.

Note: This command in my hardware Intel (R) Xeon (TM) CPU 2.80GHz, with 2GB of RAM it takes 45 minutes.

The good thing about this whole experience is that we are more ready to migrate our computer center to support high availability for MySQL.

Popularity: 2%



Tagged as:

Please enter a comment

Please note the following:
Comments are moderated, so it can take in being published. No need to repeat his comment.
Your email will never be revealed.

Search terms


  • limitations mysql
  • tables full of data
  • enter values into a table full
  • full table mysql
  • mysql the table is full
  • example of how full the log gundbaund
  • mysql record size
  • mysql full table
  • Out prepared statements with MySQL
  • mysql table full
  • bd restoring mysql problem in win 64
  • row_format = dynamic; myisam
  • ROW_FORMAT
  • restore mysql 4 gb
  • mysql rename table
  • problems with a table containing one million records
  • mysql tables problem with over 1 million records
  • mysql row_format
  • problems with mysql myisam
  • mysql a million records
  • mysql the table is full
  • mysql table full
  • MYSQL table size WINDOWSXP
  • a table that is filled with 1
  • SHOW TABLE STATUS LIKE \ table \
  • mysql table can support two million record
  • The table is full mysql ubuntu
  • The table is full mysql innodb
  • size of a mysql table
  • mysql table is full
  • MyISAM tables larger than 4GB
  • filled tables mysql
  • mysql show table status table size
  • creature handles tables
  • creature tables
  • mysql table 2 million records
  • mysql full table
  • table full of user data
  • mysql table is full
  • table is full
  • mysql error table
  • see example of a data table filled
  • mysql MAX_ROWS
  • mysql innodb Data_free Auto_increment
  • create table handles guide
  • error: table is full
  • error mysql rename table entries
  • mysql version error tables
  • error mysql database full
  • Examples of an error table
  • model example of static on myisam table
  • autoincrement in mysql that is filled
  • example of how full registration gunbound
  • where under full database
  • creature sleeve boards
  • create index full table
  • run mysql tables
  • as a table full
  • as tapping a million records in mysql
  • change mysql innodb myisam