config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/include/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/innodb/include/default_row_format_large.inc

perl;
use strict;
use warnings;
my $dest_dir = $ENV{'MYSQLTEST_VARDIR'};
my $prefix_len = $ENV{'PREFIX_LEN'};
open(DATA, ">$dest_dir/tmp/create_table.sql") or die "Couldn't open file
$dest_dir/tmp/create_table.sql, $!";
print DATA "CREATE TABLE t1(";
my $huge_cols = 196;
for (my $i=1; $i <= $huge_cols; $i++) {
        print DATA "c$i TEXT ";

        if ($i != $huge_cols) {
                print DATA ", ";
        }
}

print DATA ", ";
my $max_keys = 64;
for (my $i=1; $i <= $max_keys; $i++) {
        print DATA "KEY k$i(c$i($prefix_len))";

        if ($i != $max_keys) {
                print DATA ", ";
        }
}

print DATA ")ENGINE=INNODB ROW_FORMAT=DYNAMIC;";
print DATA "\n";

print DATA "INSERT INTO t1 VALUES (";
for (my $i=1; $i <= $huge_cols; $i++) {
        print DATA "$i$i";
        if ($i != $huge_cols) {
                print DATA ", ";
        }
}
print DATA ");";
print DATA "\n";

print DATA "UPDATE t1 SET ";
for (my $i=1; $i <= $huge_cols; $i++) {
	print DATA " c$i=REPEAT('a', 1)";
        if ($i != $huge_cols) {
                print DATA ", ";
        }
}
print DATA ";";
print DATA "\n";

print DATA "UPDATE t1 SET ";
for (my $i=1; $i <= $huge_cols; $i++) {
	print DATA " c$i=REPEAT('a', $i)";
        if ($i != $huge_cols) {
                print DATA ", ";
        }
}
print DATA ";";
print DATA "\n";

close DATA;
EOF

Man Man