#!/usr/bin/perl -w use DBI; sub generate_word { my $len = shift; my $str=""; for (1..$len) { $str .= chr(ord('a')+rand(25)); }; return $str; } sub longrandomstr { my $len = shift; my $str = ' '; while (length($str) < $len) { $str .=" ".generate_word(10); }; return $str; } print "Connecting\n"; $dbh = DBI->connect("dbi:mysql:test","root") or die $DBI::errstr; $dbh->do("drop table if exists bug_test") or die $DBI::errstr; $dbh->do('create table bug_test (id int auto_increment primary key,cargo longtext, fulltext index (cargo)) type=myisam'); print "Inserting\n"; for (1..800) { $str = longrandomstr(60_000); $dbh->do("insert into bug_test(cargo) values('$str')"); } $dbh->disconnect;