#!/usr/bin/perl

if ( (scalar(@ARGV) != 2 ) || ($ARGV[0] =~ /[^0-9]/i ) )

{

	if( $ARGV[0] =~ /[^0-9]/i )

	{

		print "\n\nFirst parameter <Rowcount> should be an integer value. \n"

	}

	&printusage;

}

else

{

# Case "InnoDB"

	if ( $ARGV[1] =~ /innodb/i )

	{

# First Table "tb1.txt"

		$file = 'innodb_tb1.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

#Data type declarations

		$s_int = 0;

		$u_int = 0;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$char_0 = &get_next_char_0($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			print ($char_0);		#char(0)##

			print ("\t",$char_0);		#char binary(0)##

			print ("\t",$char_0);		#char ascii(0)##

			print ("\t",$tinytext);		#tiny text unicode##

			print ("\t",$tinytext);		#text

			print ("\t",$longtext);		#medium text

			print ("\t",$longtext);		#long text

			print ("\t",$tinytext);		#tiny blob

			print ("\t",$tinytext);		#blob

			print ("\t",$longtext);		#medium blob

			print ("\t",$longtext);		#long blob

			print ("\t",$char);			#binary

			print ("\t",&random(127));		#tiny int

			print ("\t",&random(255));		#tiny int unsigned

			print ("\t",&random(127));		#tiny int zerofill

			print ("\t",&random(255));		#tiny int unsigned zerofill

			print ("\t",&random(32767));		#smallint

			print ("\t",&random(65535));		#smallint unsigned

			print ("\t",&random(32767));		#smallint zerofill

			print ("\t",&random(65535));		#smallint unsigned zerofill

			print ("\t",$s_int);			#mediumint

			print ("\t",$u_int);			#mediumint unsigned

			print ("\t",$u_int);			#mediumint zerofill

			print ("\t",$u_int);			#mediumint unsigned zerofill

			print ("\t",$s_int);			#int

			print ("\t",$u_int);			#int unsigned

			print ("\t",$u_int);			#int zerofill

			print ("\t",$u_int);			#int unsigned zerofill

			print ("\t",$s_int);			#bigint

			print ("\t",$u_int);			#bigint unsigned

			print ("\t",$u_int);			#bigint zerofill

			print ("\t",$u_int);			#bigint unsigned zerofill

			print ("\t",$s_int);			#decimal

			print ("\t",$u_int);			#decimal unsigned

			print ("\t",$u_int);			#decimal zerofill

			print ("\t",$u_int);			#decimal unsigned zerofill not null

			print ("\t",$s_int);			#decimal(0) not null

			print ("\t",$s_int);			#decimal(254) not null

			print ("\t",$u_int);			#decimal (0) unsigned not null

			print ("\t",$u_int);			#decimal (254) unsigned not null

			print ("\t",$u_int);			#decimal(0) zerofill not null

			print ("\t",$u_int);			#decimal(254) zerofill not null

			print ("\t",$u_int);			#decimal (0) unsigned zerofill not null

			print ("\t",$u_int);			#decimal (254) unsigned zerofill not null

			print ("\t",$s_int);			#decimal (0,0) not null

			print ("\t",$decimal);			#decimal(253,253) not null

			print ("\t",$u_int);			#decimal (0,0) unsigned not null

			print ("\t",$decimal);			#decimal (253,253) unsigned not null

			print ("\t",$u_int);			#decimal(0,0) zerofill not null

			print ("\t",$decimal);			#decimal(253,253) zerofill not null

			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill not null

			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill not null

			print ("\t",$s_int);			#numeric not null

			print ("\t",$u_int);			#numeric unsigned not null

			print ("\t",$u_int);			#numeric zerofill not null

			print ("\t",$u_int);			#numeric unsigned zerofill not null

			print ("\t",$s_int);			#numeric(0) not null

			print ("\t",$s_int);			#numeric(254) not null

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Second Table "tb2.txt"

		$file = 'innodb_tb2.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$s_int = 0;

		$u_int = 0;

		$enum = 1;

		$set = 1;

		$int=0;

		$current_time = "838:59:59";

		$s_time = "00:00:00";

		$s_date = "1970-01-01";

		$current_date = "1000-01-00";

		$current_year = 1901;

		$u_current_float = 1.175494351e-38;

		$s_current_float = -1.175494351e-38;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$decimal = $count. "\." .$count;

			$int = &get_next_int($int);

			$enum = &get_next_enum($enum);

			$set = &get_next_set($set);

			$current_date = &get_next_date($current_date);

			$current_time = &get_next_time($current_time);

			$current_year = &get_next_year($current_year);

			$u_current_float = &get_next_float($u_current_float);

			$s_current_float = &get_next_float($s_current_float);

			$s_time = &get_next_s_time($s_time);

			$s_date = &get_next_s_date($s_date);

			$datetime = &get_next_datetime($s_date,$s_time);

			$timestamp = &get_next_timestamp($s_date,$s_time);

			print ($u_int);			#numeric (0) unsigned

			print ("\t",$u_int);			#numeric (254) unsigned

			print ("\t",$u_int);			#numeric (0) zerofill

			print ("\t",$u_int);			#numeric (254) zerofill

			print ("\t",$u_int);			#numeric (0) unsigned zerofill

			print ("\t",$u_int);			#numeric (254) unsigned zerofill

			print ("\t",$s_int);			#numeric (0,0)

			print ("\t",$decimal);			#numeric (253,253)

			print ("\t",$u_int);			#numeric (0,0) unsigned

			print ("\t",$decimal);			#numeric (253,253) unsigned

			print ("\t",$u_int);			#numeric (0,0) zerofill

			print ("\t",$decimal);			#numeric (253,253) zerofill

			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill

			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill

			print ("\t",$s_current_float);		#real

			print ("\t",$u_current_float);		#real unsigned

			print ("\t",$u_current_float);		#real zerofill

			print ("\t",$u_current_float);		#real unsigned zerofill

			print ("\t",$s_current_float);		#double

			print ("\t",$u_current_float);		#double unsigned

			print ("\t",$u_current_float);		#double zerofill

			print ("\t",$u_current_float);		#double unsigned zerofill

			print ("\t",$s_current_float);		#float not null

			print ("\t",$u_current_float);		#float unsigned not null

			print ("\t",$u_current_float);		#float zerofill not null

			print ("\t",$u_current_float);		#float unsigned zerofill not null

			print ("\t",$s_current_float);		#float(0) not null

			print ("\t",$s_current_float);		#float(23) not null

			print ("\t",$u_current_float);		#float(0) unsigned not null

			print ("\t",$u_current_float);		#float(23) unsigned not null

			print ("\t",$u_current_float);		#float(0) zerofill not null

			print ("\t",$u_current_float);		#float(23) zerofill not null

			print ("\t",$u_current_float);		#float(0) unsigned zerofill not null

			print ("\t",$u_current_float);		#float(23) unsigned zerofill not null

			print ("\t",$s_current_float);		#float(24) not null

			print ("\t",$s_current_float);		#float(53) not null

			print ("\t",$u_current_float);		#float(24) unsigned not null

			print ("\t",$u_current_float);		#float(53) unsigned not null

			print ("\t",$u_current_float);		#float(24) zerofill not null

			print ("\t",$u_current_float);		#float(53) zerofill not null

			print ("\t",$u_current_float);		#float(24) unsigned zerofill not null

			print ("\t",$u_current_float);		#float(53) unsigned zerofill not null

			print ("\t",$current_date);		#date not null

			print ("\t",$current_time);		#time not null

			print ("\t",$datetime);			#datetime not null

			print ("\t",$timestamp);		#timestamp not null

			print ("\t",$current_year);		#year not null

			print ("\t",$current_year);		#year(3) not null

			print ("\t",$current_year);		#year(4) not null

			print ("\t",$enum);			#enum("1enum","2enum") not null

			print ("\t",$set);			#set("1set","2set") not null

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Third Table "tb3.txt"

		$file = 'innodb_tb3.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$u_int = 0;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			print ($char);			#char not null

			print ("\t",$char);			#char binary not null

			print ("\t",$char);			#char ascii not null

			print ("\t",$tinytext);			#tinytext not null

			print ("\t",$tinytext);			#text not null

			print ("\t",$longtext);			#mediumtext not null

			print ("\t",$longtext);			#longtext not null unicode##

			print ("\t",$tinytext);			#tinyblob not null

			print ("\t",$tinytext);			#blob not null

			print ("\t",$longtext);			#mediumblob not null

			print ("\t",$longtext);			#longblob not null

			print ("\t",$char);			#binary not null

			print ("\t",&random(127));		#tinyint not null

			print ("\t",&random(255));		#tinyint unsigned not null

			print ("\t",&random(127));		#tinyint zerofill not null

			print ("\t",&random(255));		#tinyint unsigned zerofill not null

			print ("\t",&random(32767));		#smallint not null

			print ("\t",&random(65535));		#smallint unsigned not null

			print ("\t",&random(32767));		#smallint zerofill not null

			print ("\t",&random(65535));		#smallint unsigned zerofill not null

			print ("\t",$s_int);			#mediumint not null

			print ("\t",$u_int);			#mediumint unsigned not null

			print ("\t",$u_int);			#mediumint zerofill not null

			print ("\t",$u_int);			#mediumint unsigned zerofill not null

			print ("\t",$s_int);			#int not null

			print ("\t",$u_int);			#int unsigned not null

			print ("\t",$u_int);			#int zerofill not null

			print ("\t",$u_int);			#int unsigned zerofill not null

			print ("\t",$s_int);			#bigint not null

			print ("\t",$u_int);			#bigint unsigned not null

 			print ("\t",$u_int);			#bigint zerofill not null

			print ("\t",$u_int);			#bigint unsigned zerofill not null

			print ("\t",$s_int);			#decimal not null

			print ("\t",$u_int);			#decimal unsigned not null

			print ("\t",$u_int);			#decimal zerofill not null

			print ("\t",$u_int);			#decimal unsigned zerofill

			print ("\t",$s_int);			#decimal(0)

			print ("\t",$s_int);			#decimal(254)

			print ("\t",$u_int);			#decimal (0) unsigned

			print ("\t",$u_int);			#decimal (254) unsigned

			print ("\t",$u_int);			#decimal(0) zerofill

			print ("\t",$u_int);			#decimal(254) zerofill

			print ("\t",$u_int);			#decimal (0) unsigned zerofill

			print ("\t",$u_int);			#decimal (254) unsigned zerofill

			print ("\t",$s_int);			#decimal (0,0)

			print ("\t",$decimal);			#decimal(253,253)

			print ("\t",$u_int);			#decimal (0,0) unsigned

			print ("\t",$decimal);			#decimal (253,253) unsigned

			print ("\t",$u_int);			#decimal(0,0) zerofill

			print ("\t",$decimal);			#decimal(253,253) zerofill

			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill

			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill

			print ("\t",$s_int);			#numeric

			print ("\t",$u_int);			#numeric unsigned

			print ("\t",$u_int);			#numeric zerofill

			print ("\t",$u_int);			#numeric unsigned zerofill

			print ("\t",$s_int);			#numeric(0)

			print ("\t",$s_int);			#numeric(254)

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Fourth Table "tb4.txt"

		$file = 'innodb_tb4.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$enum = 1;

		$ret_bit = 1;

		$set = 1;

		$s_int = 0;

		$u_int = 0;

		$int=0;

		$s_time = "00:00:00";

		$s_date = "1970-01-01";

		$current_time = "838:59:59";

		$current_date = "1000-01-00";

		$current_year = 1901;

		$u_current_float = 1.175494351e-38;

		$s_current_float = -1.175494351e-38;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

#			$bit = &get_next_bit(0);

			$char = &get_next_char($count);

			$char_0 = &get_next_char_0($count);

			$char_55 = &get_next_char_55($count);

			$char_90 = &get_next_char_90($count);

			$char_100 = &get_next_char_100($count);

			$char_255 = &get_next_char_255($count);

			$varchar_500 = &get_next_varchar_500($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			$int = &get_next_int($int);

			$enum = &get_next_enum($enum);

			$set = &get_next_set($set);

			$current_date = &get_next_date($current_date);

			$current_time = &get_next_time($current_time);

			$current_year = &get_next_year($current_year);

			$u_current_float = &get_next_float($u_current_float);

			$s_current_float = &get_next_float($s_current_float);

			$s_time = &get_next_s_time($s_time);

			$s_date = &get_next_s_date($s_date);

			$datetime = &get_next_datetime($s_date,$s_time);

			$timestamp = &get_next_timestamp($s_date,$s_time);

			print ($u_int);			#numeric (0) unsigned not null

			print ("\t",$u_int);			#numeric (254) unsigned not null

			print ("\t",$u_int);			#numeric (0) zerofill not null

			print ("\t",$u_int);			#numeric (254) zerofill not null

			print ("\t",$u_int);			#numeric (0) unsigned zerofill not null

			print ("\t",$u_int);			#numeric (254) unsigned zerofill not null

			print ("\t",$s_int);			#numeric (0,0) not null

			print ("\t",$decimal);			#numeric (253,253) not null

			print ("\t",$u_int);			#numeric (0,0) unsigned not null

			print ("\t",$decimal);			#numeric (253,253) unsigned not null

			print ("\t",$u_int);			#numeric (0,0) zerofill not null

			print ("\t",$decimal);			#numeric (253,253) zerofill not null

			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill not null

			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill not null

			print ("\t",$s_current_float);		#real not null

			print ("\t",$u_current_float);		#real unsigned not null

			print ("\t",$u_current_float);		#real zerofill not null

			print ("\t",$u_current_float);		#real unsigned zerofill not null

			print ("\t",$s_current_float);		#double not null

			print ("\t",$u_current_float);		#double unsigned not null

			print ("\t",$u_current_float);		#double zerofill not null

			print ("\t",$u_current_float);		#double unsigned zerofill not null

			print ("\t",$s_current_float);		#float

			print ("\t",$u_current_float);		#float unsi	gned

			print ("\t",$u_current_float);		#float zerofill

			print ("\t",$u_current_float);		#float unsigned zerofill

			print ("\t",$s_current_float);		#float(0)

			print ("\t",$s_current_float);		#float(23)

			print ("\t",$u_current_float);		#float(0) unsigned

			print ("\t",$u_current_float);		#float(23) unsigned

			print ("\t",$u_current_float);		#float(0) zerofill

			print ("\t",$u_current_float);		#float(23) zerofill

			print ("\t",$u_current_float);		#float(0) unsigned zerofill

			print ("\t",$u_current_float);		#float(23) unsigned zerofill

			print ("\t",$s_current_float);		#float(24)

			print ("\t",$s_current_float);		#float(53)

			print ("\t",$u_current_float);		#float(24) unsigned

			print ("\t",$u_current_float);		#float(53) unsigned

			print ("\t",$u_current_float);		#float(24) zerofill

			print ("\t",$u_current_float);		#float(53) zerofill

			print ("\t",$u_current_float);		#float(24) unsigned zerofill

			print ("\t",$u_current_float);		#float(53) unsigned zerofill

			print ("\t",$current_date);		#date

			print ("\t",$current_time);		#time

			print ("\t",$datetime);			#datetime

			print ("\t",$timestamp);		#timestamp

			print ("\t",$current_year);		#year

			print ("\t",$current_year);		#year(3)

			print ("\t",$current_year);		#year(4)

			print ("\t",$enum);			#enum("1enum","2enum")

			print ("\t",$set);			#set("1set","2set")

			print ("\t",$char_0);			#char(0) unicode##

 			print ("\t",$char_90);			#char(90)##

			print ("\t",$char_255);			#char(255) ascii##

			print ("\t",$char_0); 			#varchar(0)##

			print ("\t",$varchar_500);		#varchar(20000) binary##

			print ("\t",$varchar_500);		#varchar(2000) unicode##

			print ("\t",$char_100);		#char(100) unicode##

#			print ("\t",$bit);			#Bit(0)##

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

	}

#Next Database "MyIsam"

	elsif ( $ARGV[1] =~ /myisam/i )

	{

# Fifth Table "tb5.txt"

		$file = 'myisam_tb1.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

	#Data type declarations

		$s_int = 0;

		$u_int = 0;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			print ($char);			#char

			print ("\t",$char);			#char binary

			print ("\t",$char);			#char ascii

			print ("\t",$tinytext);			#tiny text unicode##

			print ("\t",$tinytext);			#text

			print ("\t",$longtext);			#medium text

			print ("\t",$longtext);			#long text

			print ("\t",$tinytext);			#tiny blob

			print ("\t",$tinytext);			#blob

			print ("\t",$longtext);			#medium blob

			print ("\t",$longtext);			#long blob

			print ("\t",$char);			#binary

			print ("\t",&random(127));		#tiny int

			print ("\t",&random(255));		#tiny int unsigned

			print ("\t",&random(127));		#tiny int zerofill

			print ("\t",&random(255));		#tiny int unsigned zerofill

			print ("\t",&random(32767));		#smallint

			print ("\t",&random(65535));		#smallint unsigned

			print ("\t",&random(32767));		#smallint zerofill

			print ("\t",&random(65535));		#smallint unsigned zerofill

			print ("\t",$s_int);			#mediumint

			print ("\t",$u_int);			#mediumint unsigned

			print ("\t",$u_int);			#mediumint zerofill

			print ("\t",$u_int);			#mediumint unsigned zerofill

			print ("\t",$s_int);			#int

			print ("\t",$u_int);			#int unsigned

			print ("\t",$u_int);			#int zerofill

			print ("\t",$u_int);			#int unsigned zerofill

			print ("\t",$s_int);			#bigint

			print ("\t",$u_int);			#bigint unsigned

			print ("\t",$u_int);			#bigint zerofill

			print ("\t",$u_int);			#bigint unsigned zerofill

			print ("\t",$s_int);			#decimal not null

			print ("\t",$u_int);			#decimal unsigned not null

			print ("\t",$u_int);			#decimal zerofill not null

			print ("\t",$u_int);			#decimal unsigned zerofill not null

			print ("\t",$s_int);			#decimal(0) not null

			print ("\t",$s_int);			#decimal(254) not null

			print ("\t",$u_int);			#decimal (0) unsigned not null

			print ("\t",$u_int);			#decimal (254) unsigned not null

			print ("\t",$u_int);			#decimal(0) zerofill not null

			print ("\t",$u_int);			#decimal(254) zerofill not null

			print ("\t",$u_int);			#decimal (0) unsigned zerofill not null

			print ("\t",$u_int);			#decimal (254) unsigned zerofill not null

			print ("\t",$s_int);			#decimal (0,0) not null

			print ("\t",$decimal);			#decimal(253,253) not null

			print ("\t",$u_int);			#decimal (0,0) unsigned not null

			print ("\t",$decimal);			#decimal (253,253) unsigned not null

			print ("\t",$u_int);			#decimal(0,0) zerofill not null

			print ("\t",$decimal);			#decimal(253,253) zerofill not null

			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill not null

			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill not null

			print ("\t",$s_int);			#numeric not null

			print ("\t",$u_int);			#numeric unsigned not null

			print ("\t",$u_int);			#numeric zerofill not null

			print ("\t",$u_int);			#numeric unsigned zerofill not null

			print ("\t",$s_int);			#numeric(0) not null

			print ("\t",$s_int);			#numeric(254) not null

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Sixth Table "tb6.txt"

		$file = 'myisam_tb2.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$enum = 1;

		$set = 1;

		$s_int = 0;

		$u_int = 0;

		$int=0;

		$s_time = "00:00:00";

		$s_date = "1970-01-01";

		$current_time = "838:59:59";

		$current_date = "1000-01-00";

		$current_year = 1901;

		$u_current_float = 1.175494351e-38;

		$s_current_float = -1.175494351e-38;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$decimal = $count. "\." .$count;

			$int = &get_next_int($int);

			$enum = &get_next_enum($enum);

			$set = &get_next_set($set);

			$current_date = &get_next_date($current_date);

			$current_time = &get_next_time($current_time);

			$current_year = &get_next_year($current_year);

			$u_current_float = &get_next_float($u_current_float);

			$s_current_float = &get_next_float($s_current_float);

			$s_time = &get_next_s_time($s_time);

			$s_date = &get_next_s_date($s_date);

			$datetime = &get_next_datetime($s_date,$s_time);

			$timestamp = &get_next_timestamp($s_date,$s_time);

			$geometry = &get_next_geometry($count);

			$point = &get_next_point($count);

			$linestring = &get_next_linestring($count);

			$polygon = &get_next_polygon($count);

			$geometry_collection = &get_next_geometry_collection($count);

			$multipoint = &get_next_multipoint($count);

			$multilinestring = &get_next_multilinestring($count);

			$multipolygon = &get_next_multipolygon($count);

			print ($u_int);			#numeric (0) unsigned

			print ("\t",$u_int);			#numeric (254) unsigned

			print ("\t",$u_int);			#numeric (0) zerofill

			print ("\t",$u_int);			#numeric (254) zerofill

			print ("\t",$u_int);			#numeric (0) unsigned zerofill

			print ("\t",$u_int);			#numeric (254) unsigned zerofill

			print ("\t",$s_int);			#numeric (0,0)

			print ("\t",$decimal);			#numeric (253,253)

			print ("\t",$u_int);			#numeric (0,0) unsigned

			print ("\t",$decimal);			#numeric (253,253) unsigned

			print ("\t",$u_int);			#numeric (0,0) zerofill

			print ("\t",$decimal);			#numeric (253,253) zerofill

			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill

			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill

			print ("\t",$s_current_float);		#real

			print ("\t",$u_current_float);		#real unsigned

			print ("\t",$u_current_float);		#real zerofill

			print ("\t",$u_current_float);		#real unsigned zerofill

			print ("\t",$s_current_float);		#double

			print ("\t",$u_current_float);		#double unsigned

			print ("\t",$u_current_float);		#double zerofill

			print ("\t",$u_current_float);		#double unsigned zerofill

			print ("\t",$s_current_float);		#float not null

			print ("\t",$u_current_float);		#float unsigned not null

			print ("\t",$u_current_float);		#float zerofill not null

			print ("\t",$u_current_float);		#float unsigned zerofill not null

			print ("\t",$s_current_float);		#float(0) not null

			print ("\t",$s_current_float);		#float(23) not null

			print ("\t",$u_current_float);		#float(0) unsigned not null

			print ("\t",$u_current_float);		#float(23) unsigned not null

			print ("\t",$u_current_float);		#float(0) zerofill not null

			print ("\t",$u_current_float);		#float(23) zerofill not null

			print ("\t",$u_current_float);		#float(0) unsigned zerofill not null

			print ("\t",$u_current_float);		#float(23) unsigned zerofill not null

			print ("\t",$s_current_float);		#float(24) not null

			print ("\t",$s_current_float);		#float(53) not null

			print ("\t",$u_current_float);		#float(24) unsigned not null

			print ("\t",$u_current_float);		#float(53) unsigned not null

			print ("\t",$u_current_float);		#float(24) zerofill not null

			print ("\t",$u_current_float);		#float(53) zerofill not null

			print ("\t",$u_current_float);		#float(24) unsigned zerofill not null

			print ("\t",$u_current_float);		#float(53) unsigned zerofill not null

			print ("\t",$current_date);		#date not null

			print ("\t",$current_time);		#time not null

			print ("\t",$datetime);			#datetime not null

			print ("\t",$timestamp);		#timestamp not null

			print ("\t",$current_year);		#year not null

			print ("\t",$current_year);		#year(3) not null

			print ("\t",$current_year);		#year(4) not null

			print ("\t",$enum);			#enum("1enum","2enum") not null

			print ("\t",$set);			#set("1set","2set") not null

			print ("\t",$geometry);		#geometry not null

			print ("\t",$point);			#point not null

			print ("\t",$linestring);			#linestring not null

			print ("\t",$polygon);			#polygon not null

			print ("\t",$geometry_collection);	#geometrycollection not null

			print ("\t",$multipoint);		#multipoint not null

			print ("\t",$multilinestring);		#multilinestring not null

			print ("\t",$multipolygon);		#multipolygon not null

#geometry not null, point not null, linestring not null, polygon not null, geometrycollection not null, multipoint not null, multilinestring not null, multipolygon not null

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Seventh Table "tb7.txt"

		$file = 'myisam_tb3.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$u_int = 0;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			print ($char);			#char not null

			print ("\t",$char);			#char binary not null

			print ("\t",$char);			#char ascii not null

			print ("\t",$tinytext);			#tinytext not null

			print ("\t",$tinytext);			#text not null

			print ("\t",$longtext);			#mediumtext not null

			print ("\t",$longtext);			#longtext not null unicode##

			print ("\t",$tinytext);			#tinyblob not null

			print ("\t",$tinytext);			#blob not null

			print ("\t",$longtext);			#mediumblob not null

			print ("\t",$longtext);			#longblob not null

			print ("\t",$char);			#binary not null

			print ("\t",&random(127));		#tinyint not null

			print ("\t",&random(255));		#tinyint unsigned not null

			print ("\t",&random(127));		#tinyint zerofill not null

			print ("\t",&random(255));		#tinyint unsigned zerofill not null

			print ("\t",&random(32767));		#smallint not null

			print ("\t",&random(65535));		#smallint unsigned not null

			print ("\t",&random(32767));		#smallint zerofill not null

			print ("\t",&random(65535));		#smallint unsigned zerofill not null

			print ("\t",$s_int);			#mediumint not null

			print ("\t",$u_int);			#mediumint unsigned not null

			print ("\t",$u_int);			#mediumint zerofill not null

			print ("\t",$u_int);			#mediumint unsigned zerofill not null

			print ("\t",$s_int);			#int not null

			print ("\t",$u_int);			#int unsigned not null

			print ("\t",$u_int);			#int zerofill not null

			print ("\t",$u_int);			#int unsigned zerofill not null

			print ("\t",$s_int);			#bigint not null

			print ("\t",$u_int);			#bigint unsigned not null

 			print ("\t",$u_int);			#bigint zerofill not null

			print ("\t",$u_int);			#bigint unsigned zerofill not null

			print ("\t",$s_int);			#decimal

			print ("\t",$u_int);			#decimal unsigned

			print ("\t",$u_int);			#decimal zerofill

			print ("\t",$u_int);			#decimal unsigned zerofill

			print ("\t",$s_int);			#decimal(0)

			print ("\t",$s_int);			#decimal(254)

			print ("\t",$u_int);			#decimal (0) unsigned

			print ("\t",$u_int);			#decimal (254) unsigned

			print ("\t",$u_int);			#decimal(0) zerofill

			print ("\t",$u_int);			#decimal(254) zerofill

			print ("\t",$u_int);			#decimal (0) unsigned zerofill

			print ("\t",$u_int);			#decimal (254) unsigned zerofill

			print ("\t",$s_int);			#decimal (0,0)

			print ("\t",$decimal);			#decimal(253,253)

			print ("\t",$u_int);			#decimal (0,0) unsigned

			print ("\t",$decimal);			#decimal (253,253) unsigned

			print ("\t",$u_int);			#decimal(0,0) zerofill

			print ("\t",$decimal);			#decimal(253,253) zerofill

			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill

			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill

			print ("\t",$s_int);			#numeric

			print ("\t",$u_int);			#numeric unsigned

			print ("\t",$u_int);			#numeric zerofill

			print ("\t",$u_int);			#numeric unsigned zerofill

			print ("\t",$s_int);			#numeric(0)

			print ("\t",$s_int);			#numeric(254)

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Eighth Table "tb8.txt"

		$file = 'myisam_tb4.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$enum = 1;

		$set = 1;

		$ret_bit = 1;

		$s_int = 0;

		$u_int = 0;

		$s_time = "00:00:00";

		$s_date = "1970-01-01";

		$int=0;

		$current_time = "838:59:59";

		$current_date = "1000-01-00";

		$current_year = 1901;

		$u_current_float = 1.175494351e-38;

		$s_current_float = -1.175494351e-38;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$bit = &get_next_bit(30);

			$char = &get_next_char($count);

			$char_0 = &get_next_char_0($count);

			$char_55 = &get_next_char_55($count);

			$char_90 = &get_next_char_90($count);

			$char_100 = &get_next_char_100($count);

			$char_255 = &get_next_char_255($count);

			$varchar_500 = &get_next_varchar_500($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			$enum = &get_next_enum($enum);

			$set = &get_next_set($set);

			$current_date = &get_next_date($current_date);

			$current_time = &get_next_time($current_time);

			$current_year = &get_next_year($current_year);

			$u_current_float = &get_next_float($u_current_float);

			$s_current_float = &get_next_float($s_current_float);

			$s_time = &get_next_s_time($s_time);

			$s_date = &get_next_s_date($s_date);

			$datetime = &get_next_datetime($s_date,$s_time);

			$timestamp = &get_next_timestamp($s_date,$s_time);

			$geometry = &get_next_geometry($count);

			$point = &get_next_point($count);

			$linestring = &get_next_linestring($count);

			$polygon = &get_next_polygon($count);

			$geometry_collection = &get_next_geometry_collection($count);

			$multipoint = &get_next_multipoint($count);

			$multilinestring = &get_next_multilinestring($count);

			$multipolygon = &get_next_multipolygon($count);

			print ($u_int);			#numeric (0) unsigned not null

			print ("\t",$u_int);			#numeric (254) unsigned not null

			print ("\t",$u_int);			#numeric (0) zerofill not null

			print ("\t",$u_int);			#numeric (254) zerofill not null

			print ("\t",$u_int);			#numeric (0) unsigned zerofill not null

			print ("\t",$u_int);			#numeric (254) unsigned zerofill not null

			print ("\t",$s_int);			#numeric (0,0) not null

			print ("\t",$decimal);			#numeric (253,253) not null

			print ("\t",$u_int);			#numeric (0,0) unsigned not null

			print ("\t",$decimal);			#numeric (253,253) unsigned not null

			print ("\t",$u_int);			#numeric (0,0) zerofill not null

			print ("\t",$decimal);			#numeric (253,253) zerofill not null

			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill not null

			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill not null

			print ("\t",$s_current_float);		#real not null

			print ("\t",$u_current_float);		#real unsigned not null

			print ("\t",$u_current_float);		#real zerofill not null

			print ("\t",$u_current_float);		#real unsigned zerofill not null

			print ("\t",$s_current_float);		#double not null

			print ("\t",$u_current_float);		#double unsigned not null

			print ("\t",$u_current_float);		#double zerofill not null

			print ("\t",$u_current_float);		#double unsigned zerofill not null

			print ("\t",$s_current_float);		#float

			print ("\t",$u_current_float);		#float unsigned

			print ("\t",$u_current_float);		#float zerofill

			print ("\t",$u_current_float);		#float unsigned zerofill

			print ("\t",$s_current_float);		#float(0)

			print ("\t",$s_current_float);		#float(23)

			print ("\t",$u_current_float);		#float(0) unsigned

			print ("\t",$u_current_float);		#float(23) unsigned

			print ("\t",$u_current_float);		#float(0) zerofill

			print ("\t",$u_current_float);		#float(23) zerofill

			print ("\t",$u_current_float);		#float(0) unsigned zerofill

			print ("\t",$u_current_float);		#float(23) unsigned zerofill

			print ("\t",$s_current_float);		#float(24)

			print ("\t",$s_current_float);		#float(53)

			print ("\t",$u_current_float);		#float(24) unsigned

			print ("\t",$u_current_float);		#float(53) unsigned

			print ("\t",$u_current_float);		#float(24) zerofill

			print ("\t",$u_current_float);		#float(53) zerofill

			print ("\t",$u_current_float);		#float(24) unsigned zerofill

			print ("\t",$u_current_float);		#float(53) unsigned zerofill

			print ("\t",$current_date);		#date

			print ("\t",$current_time);		#time

			print ("\t",$datetime);			#datetime

			print ("\t",$timestamp);		#timestamp

			print ("\t",$current_year);		#year

			print ("\t",$current_year);		#year(3)

			print ("\t",$current_year);		#year(4)

			print ("\t",$enum);			#enum("1enum","2enum")

			print ("\t",$set);			#set("1set","2set")

			print ("\t",$geometry);		#geometry

			print ("\t",$point);			#point

			print ("\t",$linestring);			#linestring

			print ("\t",$polygon);			#polygon

			print ("\t",$geometry_collection);	#geometrycollection

			print ("\t",$multipoint);		#multipoint

			print ("\t",$multilinestring);		#multilinestring

			print ("\t",$multipolygon);		#multipolygon

			print ("\t",$char_255);		#char(255) unicode##

			print ("\t",$char_55);			#char(60) ascii##

			print ("\t",$char_255);		#char(255) binary##

			print ("\t",$char_0);			#varchar(0) binary##

			print ("\t",$varchar_500);		#varbinary(20000)##

			print ("\t",$char_100);		#varchar(120) unicode##

			print ("\t",$char_100);		#char(100) unicode##

			print ("\t",$bit);			#bit(30)##

#geometry, point, linestring, polygon, geometrycollection, multipoint, multilinestring, multipolygon

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

	}

	elsif ( $ARGV[1] =~ /memory/i )

	{

# Ninth Table "tb9.txt"

		$file = 'memory_tb1.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

	#Data type declarations

		$s_int = 0;

		$u_int = 0;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			print ($char);			#char

			print ("\t",$char);			#char binary

			print ("\t",$char);			#char ascii

			print ("\t",$char);			#binary

			print ("\t",&random(127));		#tiny int

			print ("\t",&random(255));		#tiny int unsigned

			print ("\t",&random(127));		#tiny int zerofill

			print ("\t",&random(255));		#tiny int unsigned zerofill

			print ("\t",&random(32767));		#smallint

			print ("\t",&random(65535));		#smallint unsigned

			print ("\t",&random(32767));		#smallint zerofill

			print ("\t",&random(65535));		#smallint unsigned zerofill

			print ("\t",$s_int);			#mediumint

			print ("\t",$u_int);			#mediumint unsigned

			print ("\t",$u_int);			#mediumint zerofill

			print ("\t",$u_int);			#mediumint unsigned zerofill

			print ("\t",$s_int);			#int

			print ("\t",$u_int);			#int unsigned

			print ("\t",$u_int);			#int zerofill

			print ("\t",$u_int);			#int unsigned zerofill

			print ("\t",$s_int);			#bigint

			print ("\t",$u_int);			#bigint unsigned

			print ("\t",$u_int);			#bigint zerofill

			print ("\t",$u_int);			#bigint unsigned zerofill

			print ("\t",$s_int);			#decimal

			print ("\t",$u_int);			#decimal unsigned

			print ("\t",$u_int);			#decimal zerofill

			print ("\t",$u_int);			#decimal unsigned zerofill not null

			print ("\t",$s_int);			#decimal(0) not null

			print ("\t",$s_int);			#decimal(254) not null

			print ("\t",$u_int);			#decimal (0) unsigned not null

			print ("\t",$u_int);			#decimal (254) unsigned not null

			print ("\t",$u_int);			#decimal(0) zerofill not null

			print ("\t",$u_int);			#decimal(254) zerofill not null

			print ("\t",$u_int);			#decimal (0) unsigned zerofill not null

			print ("\t",$u_int);			#decimal (254) unsigned zerofill not null

			print ("\t",$s_int);			#decimal (0,0) not null

			print ("\t",$decimal);			#decimal(253,253) not null

			print ("\t",$u_int);			#decimal (0,0) unsigned not null

			print ("\t",$decimal);			#decimal (253,253) unsigned not null

			print ("\t",$u_int);			#decimal(0,0) zerofill not null

			print ("\t",$decimal);			#decimal(253,253) zerofill not null

			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill not null

			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill not null

			print ("\t",$s_int);			#numeric not null

			print ("\t",$u_int);			#numeric unsigned not null

			print ("\t",$u_int);			#numeric zerofill not null

			print ("\t",$u_int);			#numeric unsigned zerofill not null

			print ("\t",$s_int);			#numeric(0) not null

			print ("\t",$s_int);			#numeric(254) not null

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Tenth Table "tb10.txt"

		$file = 'memory_tb2.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$enum = 1;

		$set = 1;

		$s_int = 0;

		$u_int = 0;

		$s_time = "00:00:00";

		$s_date = "1970-01-01";

		$int=0;

		$current_time = "838:59:59";

		$current_date = "1000-01-00";

		$current_year = 1901;

		$u_current_float = 1.175494351e-38;

		$s_current_float = -1.175494351e-38;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$decimal = $count. "\." .$count;

			$int = &get_next_int($int);

			$enum = &get_next_enum($enum);

			$set = &get_next_set($set);

			$current_date = &get_next_date($current_date);

			$current_time = &get_next_time($current_time);

			$current_year = &get_next_year($current_year);

			$u_current_float = &get_next_float($u_current_float);

			$s_current_float = &get_next_float($s_current_float);

			$s_time = &get_next_s_time($s_time);

			$s_date = &get_next_s_date($s_date);

			$datetime = &get_next_datetime($s_date,$s_time);

			$timestamp = &get_next_timestamp($s_date,$s_time);

			print ($u_int);			#numeric (0) unsigned

			print ("\t",$u_int);			#numeric (254) unsigned

			print ("\t",$u_int);			#numeric (0) zerofill

			print ("\t",$u_int);			#numeric (254) zerofill

			print ("\t",$u_int);			#numeric (0) unsigned zerofill

			print ("\t",$u_int);			#numeric (254) unsigned zerofill

			print ("\t",$s_int);			#numeric (0,0)

			print ("\t",$decimal);			#numeric (253,253)

			print ("\t",$u_int);			#numeric (0,0) unsigned

			print ("\t",$decimal);			#numeric (253,253) unsigned

			print ("\t",$u_int);			#numeric (0,0) zerofill

			print ("\t",$decimal);			#numeric (253,253) zerofill

			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill

			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill

			print ("\t",$s_current_float);		#real

			print ("\t",$u_current_float);		#real unsigned

			print ("\t",$u_current_float);		#real zerofill

			print ("\t",$u_current_float);		#real unsigned zerofill

			print ("\t",$s_current_float);		#double

			print ("\t",$u_current_float);		#double unsigned

			print ("\t",$u_current_float);		#double zerofill

			print ("\t",$u_current_float);		#double unsigned zerofill

			print ("\t",$s_current_float);		#float not null

			print ("\t",$u_current_float);		#float unsigned not null

			print ("\t",$u_current_float);		#float zerofill not null

			print ("\t",$u_current_float);		#float unsigned zerofill not null

			print ("\t",$s_current_float);		#float(0) not null

			print ("\t",$s_current_float);		#float(23) not null

			print ("\t",$u_current_float);		#float(0) unsigned not null

			print ("\t",$u_current_float);		#float(23) unsigned not null

			print ("\t",$u_current_float);		#float(0) zerofill not null

			print ("\t",$u_current_float);		#float(23) zerofill not null

			print ("\t",$u_current_float);		#float(0) unsigned zerofill not null

			print ("\t",$u_current_float);		#float(23) unsigned zerofill not null

			print ("\t",$s_current_float);		#float(24) not null

			print ("\t",$s_current_float);		#float(53) not null

			print ("\t",$u_current_float);		#float(24) unsigned not null

			print ("\t",$u_current_float);		#float(53) unsigned not null

			print ("\t",$u_current_float);		#float(24) zerofill not null

			print ("\t",$u_current_float);		#float(53) zerofill not null

			print ("\t",$u_current_float);		#float(24) unsigned zerofill not null

			print ("\t",$u_current_float);		#float(53) unsigned zerofill not null

			print ("\t",$current_date);		#date not null

			print ("\t",$current_time);		#time not null

			print ("\t",$datetime);			#datetime not null

			print ("\t",$timestamp);		#timestamp not null

			print ("\t",$current_year);		#year not null

			print ("\t",$current_year);		#year(3) not null

			print ("\t",$current_year);		#year(4) not null

			print ("\t",$enum);			#enum("1enum","2enum") not null

			print ("\t",$set);			#set("1set","2set") not null

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Eleventh Table "tb11.txt"

		$file = 'memory_tb3.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$u_int = 0;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

			$char = &get_next_char($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			print ($char);			#char not null

			print ("\t",$char);			#char binary not null

			print ("\t",$char);			#char ascii not null

# OBN - Added two strings to address the missing f121, f122 used in trigger testing
#       as char(50). In MyISAM, innodb they are text and tinytext
			print ("\t",$char);			#char (50)
			print ("\t",$char);			#char (50)
# OBN - End of modification

			print ("\t",$char);			#binary not null

			print ("\t",&random(127));		#tinyint not null

			print ("\t",&random(255));		#tinyint unsigned not null

			print ("\t",&random(127));		#tinyint zerofill not null

			print ("\t",&random(255));		#tinyint unsigned zerofill not null

			print ("\t",&random(32767));		#smallint not null

			print ("\t",&random(65535));		#smallint unsigned not null

			print ("\t",&random(32767));		#smallint zerofill not null

			print ("\t",&random(65535));		#smallint unsigned zerofill not null

			print ("\t",$s_int);			#mediumint not null

			print ("\t",$u_int);			#mediumint unsigned not null

			print ("\t",$u_int);			#mediumint zerofill not null

			print ("\t",$u_int);			#mediumint unsigned zerofill not null

			print ("\t",$s_int);			#int not null

			print ("\t",$u_int);			#int unsigned not null

			print ("\t",$u_int);			#int zerofill not null

			print ("\t",$u_int);			#int unsigned zerofill not null

			print ("\t",$s_int);			#bigint not null

			print ("\t",$u_int);			#bigint unsigned not null

 			print ("\t",$u_int);			#bigint zerofill not null

			print ("\t",$u_int);			#bigint unsigned zerofill not null

			print ("\t",$s_int);			#decimal not null

			print ("\t",$u_int);			#decimal unsigned not null

			print ("\t",$u_int);			#decimal zerofill not null

			print ("\t",$u_int);			#decimal unsigned zerofill

			print ("\t",$s_int);			#decimal(0)

			print ("\t",$s_int);			#decimal(254)

			print ("\t",$u_int);			#decimal (0) unsigned

			print ("\t",$u_int);			#decimal (254) unsigned

			print ("\t",$u_int);			#decimal(0) zerofill

			print ("\t",$u_int);			#decimal(254) zerofill

			print ("\t",$u_int);			#decimal (0) unsigned zerofill

			print ("\t",$u_int);			#decimal (254) unsigned zerofill

			print ("\t",$s_int);			#decimal (0,0)

			print ("\t",$decimal);			#decimal(253,253)

			print ("\t",$u_int);			#decimal (0,0) unsigned

			print ("\t",$decimal);			#decimal (253,253) unsigned

			print ("\t",$u_int);			#decimal(0,0) zerofill

			print ("\t",$decimal);			#decimal(253,253) zerofill

			print ("\t",$u_int);			#decimal (0,0) unsigned zerofill

			print ("\t",$decimal);			#decimal (253,253) unsigned zerofill

			print ("\t",$s_int);			#numeric

			print ("\t",$u_int);			#numeric unsigned

			print ("\t",$u_int);			#numeric zerofill

			print ("\t",$u_int);			#numeric unsigned zerofill

			print ("\t",$s_int);			#numeric(0)

			print ("\t",$s_int);			#numeric(254)

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

# Twelfth Table "tb12.txt"

		$file = 'memory_tb4.txt';

		open ( FILE_INPUT, ">$file");

		$oldhandle = select(FILE_INPUT);

		$enum = 1;

		$ret_bit = 1;

		$set = 1;

		$s_int = 0;

		$u_int = 0;

		$s_time = "00:00:00";

		$s_date = "1970-01-01";

		$int=0;

		$current_time = "838:59:59";

		$current_date = "1000-01-00";

		$current_year = 1901;

		$u_current_float = 1.175494351e-38;

		$s_current_float = -1.175494351e-38;

		srand();

	#Write data to file

		for ($count=0; $count < $ARGV[0]; $count++)

		{

			$u_int++;

#			$bit = &get_next_bit(64);

			$char = &get_next_char($count);

			$char_0 = &get_next_char_0($count);

			$char_55 = &get_next_char_55($count);

			$char_90 = &get_next_char_90($count);

			$char_100 = &get_next_char_100($count);

			$char_255 = &get_next_char_255($count);

			$varchar_500 = &get_next_varchar_500($count);

			$longtext = &get_next_longtext($count);

			$tinytext = &get_next_tinytext($count);

			$s_int = &get_next_s_int($count,$ARGV[0]);

			$decimal = $count. "\." .$count;

			$int = &get_next_int($int);

			$enum = &get_next_enum($enum);

			$set = &get_next_set($set);

			$current_date = &get_next_date($current_date);

			$current_time = &get_next_time($current_time);

			$current_year = &get_next_year($current_year);

			$u_current_float = &get_next_float($u_current_float);

			$s_current_float = &get_next_float($s_current_float);

			$s_time = &get_next_s_time($s_time);

			$s_date = &get_next_s_date($s_date);

			$datetime = &get_next_datetime($s_date,$s_time);

			$timestamp = &get_next_timestamp($s_date,$s_time);

			print ($u_int);			#numeric (0) unsigned not null

			print ("\t",$u_int);			#numeric (254) unsigned not null

			print ("\t",$u_int);			#numeric (0) zerofill not null

			print ("\t",$u_int);			#numeric (254) zerofill not null

			print ("\t",$u_int);			#numeric (0) unsigned zerofill not null

			print ("\t",$u_int);			#numeric (254) unsigned zerofill not null

			print ("\t",$s_int);			#numeric (0,0) not null

			print ("\t",$decimal);			#numeric (253,253) not null

			print ("\t",$u_int);			#numeric (0,0) unsigned not null

			print ("\t",$decimal);			#numeric (253,253) unsigned not null

			print ("\t",$u_int);			#numeric (0,0) zerofill not null

			print ("\t",$decimal);			#numeric (253,253) zerofill not null

			print ("\t",$u_int);			#numeric (0,0) unsigned zerofill not null

			print ("\t",$decimal);			#numeric (253,253) unsigned zerofill not null

			print ("\t",$s_current_float);		#real not null

			print ("\t",$u_current_float);		#real unsigned not null

			print ("\t",$u_current_float);		#real zerofill not null

			print ("\t",$u_current_float);		#real unsigned zerofill not null

			print ("\t",$s_current_float);		#double not null

			print ("\t",$u_current_float);		#double unsigned not null

			print ("\t",$u_current_float);		#double zerofill not null

			print ("\t",$u_current_float);		#double unsigned zerofill not null

			print ("\t",$s_current_float);		#float

			print ("\t",$u_current_float);		#float unsigned

			print ("\t",$u_current_float);		#float zerofill

			print ("\t",$u_current_float);		#float unsigned zerofill

			print ("\t",$s_current_float);		#float(0)

			print ("\t",$s_current_float);		#float(23)

			print ("\t",$u_current_float);		#float(0) unsigned

			print ("\t",$u_current_float);		#float(23) unsigned

			print ("\t",$u_current_float);		#float(0) zerofill

			print ("\t",$u_current_float);		#float(23) zerofill

			print ("\t",$u_current_float);		#float(0) unsigned zerofill

			print ("\t",$u_current_float);		#float(23) unsigned zerofill

			print ("\t",$s_current_float);		#float(24)

			print ("\t",$s_current_float);		#float(53)

			print ("\t",$u_current_float);		#float(24) unsigned

			print ("\t",$u_current_float);		#float(53) unsigned

			print ("\t",$u_current_float);		#float(24) zerofill

			print ("\t",$u_current_float);		#float(53) zerofill

			print ("\t",$u_current_float);		#float(24) unsigned zerofill

			print ("\t",$u_current_float);		#float(53) unsigned zerofill

			print ("\t",$current_date);		#date

			print ("\t",$current_time);		#time

			print ("\t",$datetime);			#datetime

			print ("\t",$timestamp);		#timestamp

			print ("\t",$current_year);		#year

			print ("\t",$current_year);		#year(3)

			print ("\t",$current_year);		#year(4)

			print ("\t",$enum);			#enum("1enum","2enum")

			print ("\t",$set);			#set("1set","2set")

			print ("\t",$char_90);			#char(95) unicode##

			print ("\t",$char_255);		#char(255) unicode##

			print ("\t",$char_100);		#char(130) binary##

			print ("\t",$varchar_500);		#varchar(25000) binary##

			print ("\t",$char_0);			#varbinary(0)##

			print ("\t",$varchar_500);		#varchar(1200) unicode##

#			print ("\t",$bit);			#Bit(64)##

			print ("\n");

		}

		select ($oldhandle);

		close (FILE_INPUT);

	}

	else

	{

		&printusage;

	}

}

#Subroutines START HERE

sub get_next_geometry

{

	my($count) = @_;

	$index = $count % 6 ;

	@ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ï¿½\0\0\0\0\0\0ï¿½\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ï¿½\0\0\0\0\0\0ï¿½\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0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\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\0ï¿½\0\0\0\0\0@@\0\0\0\0\0\02@\0\0\0\0\0\02@\0\0\0\0\0\0\0\0\07@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0ï¿½\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');

	return($ascii[$index]);

}

sub get_next_multipoint

{

	my($count) = @_;

	$index = $count % 6 ;

	@ascii = ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',

'\0\0\0\0\0\0\0\0\0\0\0\0\0ï¿½\0\0\0\0\0\0ï¿½',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0*@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0 @\0\0\0\0\0\0 @',

'\0\0\0\0\0\0\0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0\07@\0\0\0\0\0\09@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\09@\0\0\0\0\0\07@\0\0\0\0\0\07@',

'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\0ï¿½\0\0\0\0\0@@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0@@\0\0\0\0\0\03@\0\0\0\0\0\03@\0\0\0\0\0\0\0\0\08@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\0:@\0\0\0\0\0\08@\0\0\0\0\0\08@');

	return($ascii[$index]);

}

sub get_next_int

{

	my($next_int) = @_;

	if (($next_int>= 0) && ($next_int<= 255))

	{

		$next_int++;

	}

	else

	{

		$next_int = 0;

	}

	return($next_int);

}

sub get_next_enum

{

	my($next_enum) = @_;

	if($next_enum == 1)

	{

		$next_enum = 2;

	}

	else

	{

 		$next_enum = 1;

	}

	return($next_enum);

}

sub get_next_set

{

	my($next_set) = @_;

	if($next_set == 3)

	{

		$next_set = 1;

	}

	else

	{

 		$next_set++;

	}

	return($next_set);

}

sub get_next_bit

{
	my($col_size) = @_;

	my($max_size) = $col_size / 8;

#	my($sp_char) = "\x01";

	my($max_no) = 9 x $max_size;

	if ($ret_bit < $max_no)
	{

		$ret_bit++;

	}

	else
	{

		$ret_bit = 1;

	}

	return($ret_bit);

}

sub get_next_char

{
	my($count) = @_;

	my($index) = $count % 72;

	@ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X',

'Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u',

'v','w','x','y','z');

	return($ascii[$index]);
}

sub get_next_char_0

{
	my($ret_string) = '';

	return($ret_string);
}

sub get_next_char_55

{
	my($count) = @_;

	my($local_count) = $count % 15;

	my($ret_string) = '';

	my($index) = $count % 72;

	@ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X',

'Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u',

'v','w','x','y','z');

	for($loop_count=0;$loop_count <= $local_count; $loop_count++)

	{

		$ret_string = $ret_string.$ascii[$index];

		$index = ($index + 1) % 72;

	}

	$ret_string = $count.$ret_string;

	return($ret_string);

}

sub get_next_char_90

{
	my($count) = @_;

	my($ret_string) = '';

	my($local_count) = $count % 25;

	my($index) = $count % 72;

	@ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X',

'Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u',

'v','w','x','y','z');

	for($loop_count=0; $loop_count <= $local_count; $loop_count++)

	{

		$ret_string = $ret_string.$ascii[$index];

		$index = ($index + 1) % 72;
	}

	$ret_string = $count.$ret_string;

	return($ret_string);

}

sub get_next_char_100

{
	my($count) = @_;

	my($local_count) = $count % 50;

	my($ret_string) = '';

	my($index) = $count % 72;

	@ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X',

'Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u',

'v','w','x','y','z');

	for($loop_count=0; $loop_count <= $local_count; $loop_count++)

	{

		$ret_string = $ret_string.$ascii[$index];

		$index = ($index + 1) % 72;
	}

	$ret_string = $count.$ret_string;

	return($ret_string);

}

sub get_next_char_255

{
	my($count) = @_;

	my($local_count) = $count % 125;

	my($ret_string) = '';

	my($index) = $count % 72;

	@ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X',

'Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',

'w','x','y','z');

	for($loop_count=0; $loop_count<$local_count; $loop_count++)

	{

		$ret_string = $ret_string.$ascii[$index];

		$index = ($index + 1) % 72;
	}

	$ret_string = $count.$ret_string;

	return($ret_string);

}

sub get_next_varchar_500
{
	my($count) = @_;

	my($ret_string) = '';

	my($local_count) = $count % 100;

	my($index) = $count % 72;

	@ascii = ('!','@','#','$','%','^','&','*','(',')','_','+','=','-','|','{','}','[',']',

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X',

'Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u',

'v','w','x','y','z');

	for($loop_count=0; $loop_count<$local_count; $loop_count++)

	{

		$ret_string = $ret_string.$ascii[$index];

		$index = ($index + 1) % 72;
	}

	$ret_string = $count.$ret_string;

	return($ret_string);

}

sub get_next_float

{

	my($next_float) = @_;

	$next_float = $next_float + 1e-47;

	return($next_float);

}

sub get_next_tinytext

{

	my($count) = @_;

	my($default_char) = "a";

	$index = $count % 20 ;

	@ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137","\150",

			  "\151","\152","\153","\154","\155","\156","\157","\134","\135");

	my($quotient) = $count / 100;

	$quotient =~ s/\.[0-9]*// ;

	$tinytext = $default_char.$ascii[$index].$quotient;

	return($tinytext);

}

sub get_next_longtext

{

	my($count) = @_;

	my($default_char) = "a";

	$index = $count % 20 ;

	$multp = $count % 100;

	@ascii = ("\140","\141","\142","\143","\144","\145","\146","\147","\136","\137","\150",

			  "\151","\152","\153","\154","\155","\156","\157","\134","\135");

	$longtext = $count.$ascii[$index].$default_char x $multp;

	return($longtext);

}

sub get_next_year

{

	my($next_year) = @_;

	if (($next_year >= 1901) && ($next_year < 2155))

	{

		$next_year++;

	}

	else

	{

		$next_year = 1901;

	}

	return($next_year);

}

sub get_next_datetime

{

	my($date,$time) = @_;

	$datetime = $date." ".$time;

	return($datetime);

}

sub get_next_s_int

{

	my($count,$maxsize) = @_;

	$s_int = int($count - ($maxsize/2));

	return($s_int);

}

sub get_next_timestamp

{

	my($date,$time) = @_;

	my($pattern1) = "-";

	my($pattern2) = ":";

	@split_date = split(/$pattern1/,$date);

	@split_time = split(/$pattern2/,$time);

	$timestamp = "$split_date[0]"."$split_date[1]"."$split_date[2]"."$split_time[0]"."$split_time[1]"."$split_time[2]";

	return($timestamp);
}

sub get_next_time

{

	my($time) = @_;

	$pattern = ":";

	@words = split(/$pattern/, $time);

	$hour = $words[0];

	$min = $words[1];

	$sec = $words[2];

#Boundary condition

	if(($hour == -838)&&($min == 0)&&($sec == 0))

	{

		$hour = 838;

		$min = 59;

		$sec = 59;

	}

	if($min > 0)

	{

		if($sec > 0)

		{

			$sec-- ;

		}

		else

		{

			$sec = 59;

			$min-- ;

		}

	}

	else

	{

		$hour-- ;

		$min = 59;

		$sec = 59;

	}

	if($hour !~ /[0-9][0-9]/)

	{

		$hour = "0".$hour;

	}

	if($min !~ /[0-9][0-9]/)

	{

		$min = "0".$min;

	}

	if($sec !~ /[0-9][0-9]/)

	{

		$sec = "0".$sec;

	}

	$time = "$hour".":"."$min".":"."$sec";

	return($time);

}

sub get_next_date

{

	my($date) = @_ ;

	$pattern = '-';

	@words = split(/$pattern/, $date);

	$year = $words[0];

	$month = $words[1];

	$day = $words[2];

	if (($month == 2) )

	{

		if($day == 28)

		{

			if($year =~ /[0-9][0-9]00/)

			{

				if($year % 400 == 0)

				{

					$day++;

				}

				else

				{

					$day = 01;

					$month++;

				}

			}

			else

			{

				if($year % 4 == 0)

				{

					$day++;

				}

				else

				{

					$day = 01;

					$month++;

				}

			}

		}

		elsif($day == 29)

		{

			$day = 01;

			$month++;

		}

		else

		{

			$day++;

		}

	}

	elsif($day == 30)

	{

		if (($month == 1) || ($month == 3) || ($month == 5) || ($month == 7) || ($month == 8) || ($month == 10) || ($month == 12))

		{

			$day++;

		}

		else

		{

			$day = 01;

			$month++;

		}

	}

	elsif($day == 31)

	{

		if ($month == 12)

		{

			$day = 01;

			$month = 01;

			if($year < 9999)

			{

				$year++;

			}

			else

			{

				$year = 1000;

			}

		}

		else

		{

			$day = 01;

			$month++;

		}

	}

	else

	{

		$day++;

	}

	if($month !~ /[0-9][0-9]/)

	{

		$month = "0".$month;

	}

	if($day !~ /[0-9][0-9]/)

	{

		$day = "0".$day;

	}

	$date = "$year"."-"."$month"."-"."$day";

	return($date);

}

sub get_next_s_date

{

	my($date) = @_ ;

	$pattern = '-';

	@words = split(/$pattern/, $date);

	$year = "$words[0]";

	$month = "$words[1]";

	$day = "$words[2]";

	if (($month == "02") )

	{

		if($day == "28")

		{

			if($year =~ /[0-9][0-9]00/)

			{

				if($year % 400 == 0)

				{

					$day++;

				}

				else

				{

					$day = 01;

					$month++;

				}

			}

			else

			{

				if($year % 4 == 0)

				{

					$day++;

				}

				else

				{

					$day = 01;

					$month++;

				}

			}

		}

		elsif($day == "29")

		{

			$day = "01";

			$month++;

		}

		else

		{

			$day++;

		}

	}

	elsif($day == "30")

	{

		if (($month == "01") || ($month == "03") || ($month == "05") || ($month == "07") || ($month == "08") || ($month == "10") || ($month == "12"))

		{

			$day++;

		}

		else

		{

			$day = "01";

			$month++;

		}

	}

	elsif($day == "31")

	{

		if ($month == "12")

		{

			$day = "01";

			$month = "01";

			if($year < "2036")

			{

				$year = $year + "0001";

			}

			else

			{

				$year = "1970";

			}

		}

		else

		{

			$day = "01";

			$month++;

		}

	}

	else

	{

		$day++;

	}

	if($month !~ /[0-9][0-9]/)

	{

		$month = "0".$month;

	}

	if($day !~ /[0-9][0-9]/)

	{

		$day = "0".$day;

	}

	$date = "$year"."-"."$month"."-"."$day";

	return($date);

}

sub get_next_s_time

{

	my($time) = @_;

	$pattern = ":";

	@words = split(/$pattern/, $time);

	$hour = "$words[0]";

	$min = "$words[1]";

	$sec = "$words[2]";

	#Boundary condition

	if(($hour == "23")&&($min == "59")&&($sec == "59"))

	{

		$hour = "00";

		$min = "00";

		$sec = "00";

	}

	if($min < "59")

	{

		if($sec < "59")

		{

			$sec = $sec + "01";

		}

		else

		{

			$sec = "00";

			$min = $min + "01" ;

		}

	}

	else

	{

		$hour = $hour + "01" ;

		$min = "00";

		$sec = "00";

	}

	if($hour !~ /[0-9][0-9]/)

	{

		$hour = "0".$hour;

	}

	if($min !~ /[0-9][0-9]/)

	{

		$min = "0".$min;

	}

	if($sec !~ /[0-9][0-9]/)

	{

		$sec = "0".$sec;

	}

	$time = "$hour".":"."$min".":"."$sec";

	return($time);

}

sub printusage

{

	print "\n\nUsage: Perl DataGen.pl <Rowcount> <Storage Engine>";

	print "\n\n<Rowcount>: The number of rows in the table " .

	"\n<Storage Engine>: The storage engine parameter" .

	" will be of the following types:" .

	"\n\t\t  InnoDB | MyIsam | Memory" .

	"\n\nE.g. Perl DataGen.pl 5000 InnoDB" .

	"\n\nThis will generate 4 text files containing 5000" .

	" records each for the 4 types of InnoDB tables.\n\n";

}

sub random

{

	my($limit) = @_ ;

	$random = int(rand($limit));

	return($random);

}


#!/usr/bin/perl
use strict;
use JSON;
use File::Spec::Functions qw/ canonpath /;
my $usage = "This is from WL#5257 \"first API for optimizer trace\".

Usage:
  %s [-q] <a_file> <another_file> <etc>

    -q      quiet mode: only display errors and warnings.

It will verify that all optimizer traces of files (usually a_file
is a .result or .reject file which contains
SELECT * FROM OPTIMIZER_TRACE; ) are JSON-compliant, and that
they contain no duplicates keys.
Exit code is 0 if all ok.";
my $retcode = 0;
my @ignored;
my @input = @ARGV;

# Filter out "-q" options
@input = grep {!/-q/} @input;

if (!@input)
{
  print "$usage\n";
  exit 1;
}

# If command line contains at least one "-q" option, it is quiet mode
my $quiet= scalar(@input) <= scalar(@ARGV) -1;
# On Windows, command line arguments specified using wildcards need to be evaluated.
# On Unix too if the arguments are passed with single quotes.
my $need_parse = grep(/\*/,@input);
if ($need_parse)
{
  my $platform_independent_dir;
  $platform_independent_dir= canonpath "@input";
  @input= glob "$platform_independent_dir";
}

foreach my $input_file (@input)
{
  handle_one_file($input_file);
  print "\n";
}

if ( @ignored )
{
  print STDERR "These files have been ignored:\n";
  foreach my $ig ( @ignored )
  {
    print "$ig\n";
  }
  print "\n";
}
if ( $retcode )
{
  print STDERR "There are errors\n";
}

else
{
  print "\n";
  print "ALL OK\n";
}

exit $retcode;

sub handle_one_file {

  my ( $input_file ) = @_;
  if ( $input_file =~ /^.*(ctype_.*|mysqldump)\.result/ )
  {
    push @ignored ,$input_file;
    return;
  }
  print "FILE $input_file\n";
  print "\n";
  open(DATA,"<$input_file") or die "Can't open file";
  my @lines = <DATA>;
  close(DATA);
  my $first_trace_line = 0;
  my $trace_line = 0;
  my @trace = undef;
  label_to: foreach my $i ( @lines )
  {
    $trace_line = $trace_line + 1;
    if (( grep(/^.*(\t)?{\n/,$i) ) and ( $first_trace_line == 0 ))
    {
      @trace = undef;
      $first_trace_line = $trace_line;
      push @trace, "{\n";
      next label_to;
    }
    if (( $i =~ /^}/ ) and ( $first_trace_line != 0))
    {
      push @trace, "}";
      check($first_trace_line,@trace);
      $first_trace_line = 0;
    }
    if ( $first_trace_line != 0 )
    {
      # Eliminate /* */ from end_marker=on (not valid JSON)
      $i =~ s/\/\*.*\*\// /g;
      push @trace, $i;
    }

  }
}

sub check {

  my ( $first_trace_line, @trace ) = @_;
  my $string = join("", @trace);
  my $parsed;
  eval { $parsed = decode_json($string); };
  unless ( $parsed )
  {
    print "Parse error at line: $first_trace_line\n";
    my $error = $@;
    print "Error: $@\n";
    # If there is a character position specified, put a mark ('&') in front of this character
    if ($error =~ /invalid character.*at character offset (\d+)/)
    {
      substr($string,$1,0) = "&";
      print "$string\n";
    }
    else
    {
      print "$string\n";
    }
    $retcode = 1;
    print "\n";
    return;
  }
  # Detect non-unique keys in one object, by counting
  # number of quote symbols ("): the json module outputs only
  # one of the non-unique keys, making the number of "
  # smaller compared to the input string.

  my $before = $string =~ tr/'"'//;
  my $re_json;
  $re_json= to_json($parsed);
  my $after = $re_json =~ tr/'"'//;
  if ( $before != $after )
  {
    print "Non-unique keys at line $first_trace_line ( $before vs $after )\n";
    print "$string\n";
    $retcode = 1;
    print "\n";
    return;
  }
  if ( !$quiet )
  {
    print "OK at line $first_trace_line\n";
  }
}


#!/usr/bin/perl

die unless($ARGV[0]);
open(my $f, "<", $ARGV[0]) or die $!;
my @sst;
while(my $l = readline($f)) {
  chomp($l);
  push @sst, int($l);
}

for(my $i= 0; $i < $#sst; $i++) {
  printf("checking sst file reduction on optimize table from %d to %d..\n", $i, $i+1);

  if($sst[$i] - 1000 < $sst[$i+1]) {
    printf("sst file reduction was not enough. %d->%d (minimum 1000kb)\n", $sst[$i], $sst[$i+1]);
    die;
  }else {
    print "ok.\n";
  }
}
exit(0);


#!/usr/bin/env perl

use strict;

my $row_count = $ARGV[0];

my $value = 'x' x 250;
for (my $i= 1; $i <= $row_count; $i++) {
  print "$i,$i,$value\n";
}


#!/usr/bin/perl

my $a = 0;
my $b=0;
die unless($ARGV[0]);
open(my $f, "<", $ARGV[0]) or die $!;
while(readline($f)) {
  if (/(\d+) before/) {
    $a = $1;
  }

  if (/(\d+) after/ ) {
    $b = $1;
  }
}

if ($a > $b * 2) {
  printf("Compacted\n");
}


#!/usr/bin/perl

my $table_name= $ARGV[0];
my $id1= 1;
my $id2= 1;
my $id3= 1;
my $id4= 1;
my $id5= 1;
my $value= 1000;
my $value2= 'aaabbbccc';
my $max_rows = 1 * 10000;

for(my $row_id= 1; $row_id <= $max_rows; $row_id++) {
  my $value_clause = "($id1, $id2, $id3, $id4, $id5, $value, \"$value2\")";

  if ($row_id % 100 == 1) {
    print "INSERT INTO $table_name VALUES";
  }

  if ($row_id % 100 == 0) {
    print "$value_clause;\n";
  }else {
    print "$value_clause,";
  }

  $id4++;
  $id5++;
  $id3++ if($row_id % 5 == 0);
  $id2++ if($row_id % 5 == 0);
  $id1++ if($row_id % 10 == 0);
}


#!/usr/bin/perl

my $pid_file = $ARGV[0];
my $print_bottom_priority = $ARGV[1];
my $expected_thread_counts = $ARGV[2];

if(!defined($print_bottom_priority)) {
  $print_bottom_priority = 0;
}
if(!defined($expected_thread_counts)) {
  $expected_thread_counts = 0;
}

# Get PID of mysqld
open(my $fh, '<', $pid_file) || die "Cannot open pid file $pid_file\n";
my $pid = <$fh>;
$pid =~ s/\s//g;
close($fh);

if ($pid eq "") {
  die "Couldn't retrieve PID from PID file.\n";
}

if ($print_bottom_priority) {
  print "Bottom thread priority:\n";
  system("cat /proc/$pid/task/*/stat | grep bottom | awk '{print \$19}'");
}

print "Bottom thread counts:\n";
my $retries = 10;
for(my $i= 0; $i <= $retries; $i++) {
  $count=`cat /proc/$pid/task/*/stat | grep bottom | wc -l`;
  chomp($count);
  if ($count != $expected_thread_counts) {
    sleep(1);
  } else {
    print "$count\n";
    last;
  }
}


$file=$ARGV[0];
$total=$ARGV[1];
$pct=$ARGV[2];

open($fh, "<", $file) or die $!;
while(readline($fh)) {
  if (/(\d+) index entries checked \((\d+) had checksums/) {
    if ($1 == $total && $2 >= $total*($pct-2)/100 && $2 <= $total*($pct+2)/100) {
      printf("%d index entries had around %d checksums\n", $total, $total*$pct/100);
    }
  }elsif (/(\d+) table records had checksums/) {
    if ($1 >= $total*($pct-2)/100 && $1 <= $total*($pct+2)/100) {
      printf("Around %d table records had checksums\n", $total*$pct/100);
    }
  }
}


my $pid_file = $ARGV[0];
my $log_file = $ARGV[1];

open(my $fh, '<', $pid_file) || die "Cannot open pid file $pid_file";
my $slave_pid = <$fh>;
close($fh);

$slave_pid =~ s/\s//g;
open(my $log_fh, '<', $log_file) || die "Cannot open log file $log_file";

my $pid_found = 0;
while (my $line = <$log_fh>) {
  next unless ($pid_found || $line =~ /^[\d-]* [\d:]* $slave_pid /);
  $pid_found = 1 unless ($pid_found);
  if ($line =~ /^RocksDB: Last binlog file position.*slave-bin\..*\n/) {
    print "Binlog Info Found\n";
  }
}
close($log_fh);