diff options
author | unknown <monty@donna.mysql.com> | 2000-11-24 01:51:18 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-11-24 01:51:18 +0200 |
commit | e94b4ebf2bc64710336597445529887640908cc4 (patch) | |
tree | f7a94e9f7992838a96724db08a38f94bd9d50e27 /sql-bench/test-insert.sh | |
parent | 681aeb58e6f58de62134c24630bba5de0f49705d (diff) | |
download | mariadb-git-e94b4ebf2bc64710336597445529887640908cc4.tar.gz |
All statements are now run in a sub transaction
Give warning if we are using non transactional tables and do ROLLBACK
Porting of crash-me and benchmarks to FrontBase
Docs/manual.texi:
Updates for 3.23.29
include/mysqld_error.h:
New error messages
sql-bench/Data/ATIS/fconnection.txt:
Name change because 'connection' was a reserved word in FrontBase
sql-bench/bench-init.pl.sh:
Port to FrontBase
sql-bench/crash-me.sh:
Port to FrontBase
sql-bench/server-cfg.sh:
Port to FrontBase
sql-bench/test-ATIS.sh:
Port to FrontBase
sql-bench/test-alter-table.sh:
Port to FrontBase
sql-bench/test-big-tables.sh:
Port to FrontBase
sql-bench/test-connect.sh:
Port to FrontBase
sql-bench/test-create.sh:
Port to FrontBase
sql-bench/test-insert.sh:
Port to FrontBase
sql-bench/test-select.sh:
Port to FrontBase
sql-bench/test-wisconsin.sh:
Port to FrontBase
sql/ha_berkeley.cc:
All statements are now run in a sub transaction
sql/ha_berkeley.h:
All statements are now run in a sub transaction
sql/handler.cc:
All statements are now run in a sub transaction
sql/handler.h:
All statements are now run in a sub transaction
sql/mysql_priv.h:
Moved QUERY_NO.. flags to unique numbers
sql/mysqld.cc:
All statements are now run in a sub transaction
sql/net_pkg.cc:
Added send_warning
sql/share/czech/errmsg.sys:
New error messages
sql/share/czech/errmsg.txt:
New error messages
sql/share/danish/errmsg.sys:
New error messages
sql/share/danish/errmsg.txt:
New error messages
sql/share/dutch/errmsg.sys:
New error messages
sql/share/dutch/errmsg.txt:
New error messages
sql/share/english/errmsg.sys:
New error messages
sql/share/english/errmsg.txt:
New error messages
sql/share/estonian/errmsg.sys:
New error messages
sql/share/estonian/errmsg.txt:
New error messages
sql/share/french/errmsg.sys:
New error messages
sql/share/french/errmsg.txt:
New error messages
sql/share/german/errmsg.sys:
New error messages
sql/share/german/errmsg.txt:
New error messages
sql/share/greek/errmsg.sys:
New error messages
sql/share/greek/errmsg.txt:
New error messages
sql/share/hungarian/errmsg.sys:
New error messages
sql/share/hungarian/errmsg.txt:
New error messages
sql/share/italian/errmsg.sys:
New error messages
sql/share/italian/errmsg.txt:
New error messages
sql/share/japanese/errmsg.sys:
New error messages
sql/share/japanese/errmsg.txt:
New error messages
sql/share/korean/errmsg.sys:
New error messages
sql/share/korean/errmsg.txt:
New error messages
sql/share/norwegian-ny/errmsg.txt:
New error messages
sql/share/norwegian/errmsg.txt:
New error messages
sql/share/polish/errmsg.sys:
New error messages
sql/share/polish/errmsg.txt:
New error messages
sql/share/portuguese/errmsg.sys:
New error messages
sql/share/portuguese/errmsg.txt:
New error messages
sql/share/romanian/errmsg.txt:
New error messages
sql/share/russian/errmsg.sys:
New error messages
sql/share/russian/errmsg.txt:
New error messages
sql/share/slovak/errmsg.sys:
New error messages
sql/share/slovak/errmsg.txt:
New error messages
sql/share/spanish/errmsg.sys:
New error messages
sql/share/spanish/errmsg.txt:
New error messages
sql/share/swedish/errmsg.OLD:
New error messages
sql/share/swedish/errmsg.sys:
New error messages
sql/share/swedish/errmsg.txt:
New error messages
sql/slave.cc:
All statements are now run in a sub transaction
sql/sql_class.cc:
All statements are now run in a sub transaction
sql/sql_class.h:
All statements are now run in a sub transaction
sql/sql_delete.cc:
Remember if we are using a non transactional table
sql/sql_insert.cc:
Remember if we are using a non transactional table
sql/sql_load.cc:
Remember if we are using a non transactional table
sql/sql_parse.cc:
All statements are now run in a sub transaction
sql/sql_select.cc:
Remember if we are using a non transactional table
sql/sql_table.cc:
All statements are now run in a sub transaction
sql/sql_update.cc:
All statements are now run in a sub transaction
sql/sql_yacc.yy:
All statements are now run in a sub transaction
Diffstat (limited to 'sql-bench/test-insert.sh')
-rwxr-xr-x | sql-bench/test-insert.sh | 84 |
1 files changed, 48 insertions, 36 deletions
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh index a9a95cf6710..daccd678b56 100755 --- a/sql-bench/test-insert.sh +++ b/sql-bench/test-insert.sh @@ -34,6 +34,7 @@ $opt_loop_count=100000; # number of rows/3 $small_loop_count=10; # Loop for full table retrieval $range_loop_count=$small_loop_count*50; $many_keys_loop_count=$opt_loop_count; +$opt_read_key_loop_count=$opt_loop_count; chomp($pwd = `pwd`); $pwd = "." if ($pwd eq ''); require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n"; @@ -46,13 +47,15 @@ if ($opt_loop_count < 256) if ($opt_small_test) { $opt_loop_count/=100; - $range_loop_count/=10; $many_keys_loop_count=$opt_loop_count/10; + $range_loop_count=10; + $opt_read_key_loop_count=10; } elsif ($opt_small_tables) { $opt_loop_count=10000; # number of rows/3 $many_keys_loop_count=$opt_loop_count; + $opt_read_key_loop_count=10; } elsif ($opt_small_key_tables) { @@ -96,9 +99,9 @@ goto keys_test if ($opt_stage == 2); goto select_test if ($opt_skip_create); print "Creating tables\n"; -$dbh->do("drop table bench1"); -$dbh->do("drop table bench2"); -$dbh->do("drop table bench3"); +$dbh->do("drop table bench1" . $server->{'drop_attr'}); +$dbh->do("drop table bench2" . $server->{'drop_attr'}); +$dbh->do("drop table bench3" . $server->{'drop_attr'}); do_many($dbh,$server->create("bench1", ["id int NOT NULL", "id2 int NOT NULL", @@ -239,11 +242,11 @@ if ($limits->{'unique_index'}) die "Didn't get an error when inserting duplicate record $tmp\n"; } } -} -$end_time=new Benchmark; -print "Time for insert_duplicates (" . ($opt_loop_count) . "): " . + $end_time=new Benchmark; + print "Time for insert_duplicates (" . ($opt_loop_count) . "): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; +} #if ($opt_fast && defined($server->{vacuum})) #{ @@ -332,11 +335,13 @@ else print " for order_by_big_key2 ($small_loop_count:$rows): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; + +$sel=$limits->{'order_by_unused'} ? "id2" : "*"; $loop_time=new Benchmark; $estimated=$rows=0; for ($i=1 ; $i <= $small_loop_count ; $i++) { - $rows+=fetch_all_rows($dbh,"select id2 from bench1 order by id3",1); + $rows+=fetch_all_rows($dbh,"select $sel from bench1 order by id3",1); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, $small_loop_count)); @@ -349,11 +354,12 @@ print " for order_by_big_key_diff ($small_loop_count:$rows): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; +$sel=$limits->{'order_by_unused'} ? "id" : "*"; $loop_time=new Benchmark; $estimated=$rows=0; for ($i=1 ; $i <= $small_loop_count ; $i++) { - $rows+=fetch_all_rows($dbh,"select id from bench1 order by id2,id3",1); + $rows+=fetch_all_rows($dbh,"select $sel from bench1 order by id2,id3",1); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, $small_loop_count)); @@ -365,13 +371,15 @@ else print " for order_by_big ($small_loop_count:$rows): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; + +$sel=$limits->{'order_by_unused'} ? "dummy1" : "dummy1,id3"; $loop_time=new Benchmark; $estimated=$rows=0; for ($i=1 ; $i <= $range_loop_count ; $i++) { $start=$opt_loop_count/$range_loop_count*$i; $end=$start+$i; - $rows+=fetch_all_rows($dbh,"select dummy1 from bench1 where id>=$start and id <= $end order by id3",1); + $rows+=fetch_all_rows($dbh,"select $sel from bench1 where id>=$start and id <= $end order by id3",1); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, $range_loop_count)); @@ -383,14 +391,14 @@ else print " for order_by_range ($range_loop_count:$rows): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; - +$sel=$limits->{'order_by_unused'} ? "dummy1" : "dummy1,id"; $loop_time=new Benchmark; $estimated=$rows=0; for ($i=1 ; $i <= $range_loop_count ; $i++) { $start=$opt_loop_count/$range_loop_count*$i; $end=$start+$i; - $rows+=fetch_all_rows($dbh,"select dummy1 from bench1 where id>=$start and id <= $end order by id",1); + $rows+=fetch_all_rows($dbh,"select $sel from bench1 where id>=$start and id <= $end order by id",1); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, $range_loop_count)); @@ -402,13 +410,14 @@ else print " for order_by_key ($range_loop_count:$rows): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; +$sel=$limits->{'order_by_unused'} ? "id2" : "id2,id3"; $loop_time=new Benchmark; $estimated=$rows=0; for ($i=1 ; $i <= $range_loop_count ; $i++) { $start=$opt_loop_count/$range_loop_count*$i; $end=$start+$range_loop_count; - $rows+=fetch_all_rows($dbh,"select id2 from bench1 where id3>=$start and id3 <= $end order by id3",1); + $rows+=fetch_all_rows($dbh,"select $sel from bench1 where id3>=$start and id3 <= $end order by id3",1); $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$i, $range_loop_count)); @@ -674,23 +683,26 @@ if ($limits->{'group_functions'}) print "Time for count ($count): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; - $loop_time=new Benchmark; - $count=$estimated=0; - for ($tests=1 ; $tests <= $small_loop_count ; $tests++) + if ($limits->{'group_distinct_functions'}) { - $count+=2; - fetch_all_rows($dbh,"select count(distinct dummy1) from bench1"); - fetch_all_rows($dbh,"select dummy1,count(distinct id) from bench1 group by dummy1"); - $end_time=new Benchmark; - last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$tests, - $small_loop_count)); + $loop_time=new Benchmark; + $count=$estimated=0; + for ($tests=1 ; $tests <= $small_loop_count ; $tests++) + { + $count+=2; + fetch_all_rows($dbh,"select count(distinct dummy1) from bench1"); + fetch_all_rows($dbh,"select dummy1,count(distinct id) from bench1 group by dummy1"); + $end_time=new Benchmark; + last if ($estimated=predict_query_time($loop_time,$end_time,\$count,$tests, + $small_loop_count)); + } + if ($estimated) + { print "Estimated time"; } + else + { print "Time"; } + print " for count_distinct_big ($count): " . + timestr(timediff($end_time, $loop_time),"all") . "\n"; } - if ($estimated) - { print "Estimated time"; } - else - { print "Time"; } - print " for count_distinct_big ($count): " . - timestr(timediff($end_time, $loop_time),"all") . "\n"; } @@ -1002,9 +1014,9 @@ if ($limits->{'insert_select'}) print "Time for insert_select_2_keys (1): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; $loop_time=new Benchmark; - $sth = $dbh->do("DROP TABLE bench2") || + $sth = $dbh->do("DROP TABLE bench2" . $server->{'drop_attr'}) || die $DBI::errstr; - $sth = $dbh->do("DROP TABLE bench3") || + $sth = $dbh->do("DROP TABLE bench3" . $server->{'drop_attr'}) || die $DBI::errstr; $end_time=new Benchmark; print "Time for drop table(2): " . @@ -1096,7 +1108,7 @@ if (!$opt_skip_delete) { $sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr; } - $sth = $dbh->do("drop table bench1") or die $DBI::errstr; + $sth = $dbh->do("drop table bench1" . $server->{'drop_attr'}) or die $DBI::errstr; } if ($server->small_rollback_segment()) @@ -1309,7 +1321,7 @@ $end_time=new Benchmark; print "Time for delete_all_many_keys ($count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; -$sth = $dbh->do("drop table bench1") or die $DBI::errstr; +$sth = $dbh->do("drop table bench1" . $server->{'drop_attr'}) or die $DBI::errstr; if ($opt_fast && defined($server->{vacuum})) { $server->vacuum(1,\$dbh); @@ -1323,7 +1335,7 @@ if ($limits->{'multi_value_insert'}) { $query_size=$limits->{'query_size'}; # Same limit for all databases - $sth = $dbh->do("drop table bench1"); + $sth = $dbh->do("drop table bench1" . $server->{'drop_attr'}); do_many($dbh,$server->create("bench1", ["id int NOT NULL", "id2 int NOT NULL", @@ -1375,7 +1387,7 @@ if ($limits->{'multi_value_insert'}) # A big table may take a while to drop $loop_time=new Benchmark; - $sth = $dbh->do("drop table bench1") or die $DBI::errstr; + $sth = $dbh->do("drop table bench1" . $server->{'drop_attr'}) or die $DBI::errstr; $end_time=new Benchmark; print "Time for drop table(1): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; @@ -1405,7 +1417,7 @@ sub check_select_key $estimated=0; $loop_time=new Benchmark; $count=0; - for ($i=1 ; $i <= $opt_loop_count; $i++) + for ($i=1 ; $i <= $opt_read_key_loop_count; $i++) { $count+=2; $tmpvar^= ((($tmpvar + 63) + $i)*3 % $opt_loop_count); @@ -1437,7 +1449,7 @@ sub check_select_key2 $estimated=0; $loop_time=new Benchmark; $count=0; - for ($i=1 ; $i <= $opt_loop_count; $i++) + for ($i=1 ; $i <= $opt_read_key_loop_count; $i++) { $count+=2; $tmpvar^= ((($tmpvar + 63) + $i)*3 % $opt_loop_count); |