diff options
author | Michael Widenius <monty@askmonty.org> | 2010-02-10 23:26:06 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-02-10 23:26:06 +0200 |
commit | af51917d1e2e47eaee5e39a3d83ce09815ab4d1c (patch) | |
tree | 327d81d518a7cde259a80ffa968aee07cc706b01 /sql-bench/test-connect.sh | |
parent | d77e3cde5f43426271f7ac64a922e5ddbf6e675d (diff) | |
download | mariadb-git-af51917d1e2e47eaee5e39a3d83ce09815ab4d1c.tar.gz |
Added option --temporary-tables to test speed of temporary tables
mysql-test/suite/parts/t/partition_repair_myisam-master.opt:
Added missing file from last push
sql-bench/bench-init.pl.sh:
Added options:
--temporary-tables to test speed of temporary tables
sql-bench/server-cfg.sh:
Added limit for number of temporary tables one can create
sql-bench/test-connect.sh:
Skip test that doesn't work with temporary tables.
sql-bench/test-create.sh:
Added limit for number of temporary tables one can create
Diffstat (limited to 'sql-bench/test-connect.sh')
-rw-r--r-- | sql-bench/test-connect.sh | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/sql-bench/test-connect.sh b/sql-bench/test-connect.sh index d0f3f0791a4..52566f7bb54 100644 --- a/sql-bench/test-connect.sh +++ b/sql-bench/test-connect.sh @@ -161,41 +161,48 @@ if ($opt_fast && defined($server->{vacuum})) { $server->vacuum(0,\$dbh); } -$dbh->disconnect; +if (!$main::opt_temporary_tables) +{ + $dbh->disconnect; +} # # First test connect/select/disconnect # -print "Testing connect/select 1 row from table/disconnect\n"; +if (!$main::opt_temporary_tables) +{ + print "Testing connect/select 1 row from table/disconnect\n"; -$loop_time=new Benchmark; -$errors=0; + $loop_time=new Benchmark; + $errors=0; -for ($i=0 ; $i < $small_loop_count ; $i++) -{ - for ($j=0; $j < $max_test ; $j++) + for ($i=0 ; $i < $small_loop_count ; $i++) { - last if ($dbh = DBI->connect($server->{'data_source'}, $opt_user, $opt_password)); - $errors++; - } - die $DBI::errstr if ($j == $max_test); + for ($j=0; $j < $max_test ; $j++) + { + last if ($dbh = DBI->connect($server->{'data_source'}, $opt_user, $opt_password)); + $errors++; + } + die $DBI::errstr if ($j == $max_test); - $sth = $dbh->do("select a,i,s,$i from bench1") # Select * from table with 1 record + $sth = $dbh->do("select a,i,s,$i from bench1") # Select * from table with 1 record or die $DBI::errstr; - $dbh->disconnect; -} + $dbh->disconnect; + } -$end_time=new Benchmark; -print "Warning: $errors connections didn't work without a time delay\n" if ($errors); -print "Time to connect+select_1_row ($small_loop_count): " . + $end_time=new Benchmark; + print "Warning: $errors connections didn't work without a time delay\n" if ($errors); + print "Time to connect+select_1_row ($small_loop_count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; + $dbh = $server->connect(); +} + # # The same test, but without connect/disconnect # print "Testing select 1 row from table\n"; -$dbh = $server->connect(); $loop_time=new Benchmark; for ($i=0 ; $i < $opt_loop_count ; $i++) |