Bug #21248 4GB limit with ARCHIVE engine in 32 bit Linux
Submitted: 24 Jul 2006 9:26 Modified: 1 Oct 2006 10:09
Reporter: Josh Chamas Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Archive storage engine Severity:S2 (Serious)
Version:4.1.20 OS:Linux (Linux 2.6.9, 32 bit)
Assigned to: CPU Architecture:Any

[24 Jul 2006 9:26] Josh Chamas
Description:
There seems to be a 4GB ARCHIVE engine limit that is reproducible on this particular platform.  I can get this error:

DBD::mysql::st execute failed: The table 'archive_insert' is full at build.pl line 17.

And this is when the table is 4GB:

-rw-rw----  1 mysql mysql       8574 Jul 24 00:28 archive_insert.frm
-rw-rw----  1 mysql mysql 4294966376 Jul 24 00:45 archive_insert.MYD
-rw-rw----  1 mysql mysql       1024 Jul 24 00:45 archive_insert.MYI

The platform that I am on is:
  Linux master3.mapocity.com 2.6.9-22.0.2.ELhugemem #1 SMP Tue Jan 17 07:28:38 CST 2006 i686 i686 i386 GNU/Linux

I believe its RHEL4 32 bit linux.

How to repeat:
#!/usr/bin/perl

use DBI;
use strict;

my $dbh = DBI->connect("dbi:mysql:database=test", "user", "pass", { RaiseError => 1 });
$dbh->do("drop table if exists archive_insert");
$dbh->do("create table archive_insert ( insert_data text )");
my $sth = $dbh->prepare("insert into archive_insert values(?)");

srand(0);
for(1..4000000) {
   my $string = '';
   for(1..100) {
        $string .= rand();
   }
   $sth->execute($string);      
}
[28 Aug 2006 14:27] Valeriy Kravchuk
Thank you for a problem report. Please, send the resuls of SHOW TABLE STATUS for this archive_insert table. What is the value of myisam_data_pointer_size system variable in your case? What type of filesystem is used?
[1 Sep 2006 7:19] Josh Chamas
Hi Valeriy,

I will not have access to the machine I produced the problem on, so the bug report is all the information there is on the defect.

Regards,

Josh
[1 Oct 2006 10:09] Valeriy Kravchuk
ARCHIVE storage enginze uses .ARM and .ARZ as extensions:

vkravchuk@build:~/dbs/4.1> ls -l var/test/a*
-rw-rw----    1 vkravchu vkravchu       19 Oct  1 11:03 var/test/archive_insert.
ARM
-rw-rw----    1 vkravchu vkravchu 335162827 Oct  1 11:51 var/test/archive_insert
.ARZ
-rw-rw----    1 vkravchu vkravchu     8574 Oct  1 11:02 var/test/archive_insert.
frm
-rw-rw----    1 vkravchu vkravchu       20 Sep 26 18:55 var/test/assort.MYD
-rw-rw----    1 vkravchu vkravchu     1024 Sep 26 18:58 var/test/assort.MYI
-rw-rw----    1 vkravchu vkravchu     8592 Sep 26 18:48 var/test/assort.frm

In your case, archive_insert was a MyISAM table, that is, by default (if MAX_ROWS/AVG_ROW_LENGTH not set properly), limited to 4GB in size. It is documented on http://dev.mysql.com/doc/refman/4.1/en/create-table.html. So, it is expected behaviour.