diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-17 19:39:39 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-17 19:39:39 +0300 |
commit | aeaf3fcf1275c81578594149ffc7a1d6c45c3596 (patch) | |
tree | a99a119a594cef911c36b9e84ddb7975f5747e05 /sql-bench/test-insert.sh | |
parent | 037c19e4ad2beccc0712ddb753ccf981ef58b457 (diff) | |
download | mariadb-git-aeaf3fcf1275c81578594149ffc7a1d6c45c3596.tar.gz |
Don't do signal() on windows (Causes instability problems)
Safer, a bit faster filesort.
Code changes to avoid calls to current_thd() (faster code).
Removed all compiler warnings from readline.
BitKeeper/etc/ignore:
Add my_global.h back.
Docs/manual.texi:
4.0.1 Changelog
include/my_sys.h:
Added strmake_root
libmysql/libmysql.c:
Don't do signal() on windows (Causes instability problems)
mysys/my_alloc.c:
Added strmake_root
readline/bind.c:
Remove warnings
readline/complete.c:
Remove warnings
readline/display.c:
Remove warnings
readline/funmap.c:
Remove warnings
readline/histexpand.c:
Remove warnings
readline/histfile.c:
Remove warnings
readline/history.h:
Remove warnings
readline/histsearch.c:
Remove warnings
readline/isearch.c:
Remove warnings
readline/kill.c:
Remove warnings
readline/macro.c:
Remove warnings
readline/readline.c:
Remove warnings
readline/readline.h:
Remove warnings
readline/rltty.c:
Remove warnings
readline/search.c:
Remove warnings
readline/shell.c:
Remove warnings
readline/terminal.c:
Remove warnings
readline/tilde.c:
Remove warnings
readline/tilde.h:
Remove warnings
readline/undo.c:
Remove warnings
readline/util.c:
Remove warnings
readline/vi_mode.c:
Remove warnings
sql-bench/server-cfg.sh:
Added use of truncate table
sql-bench/test-insert.sh:
Added use of truncate table
Changed some tests to use keys instead of 'range'
sql-bench/test-wisconsin.sh:
Cleanup
sql/field.cc:
Add 'thd' to send() (To avoid usage of 'current_thd')
sql/field.h:
Add 'thd' to send() (To avoid usage of 'current_thd')
sql/filesort.cc:
Safer memory allocation; Don't allocate pointer to buffers directly, but use an IO_CACHE instead.
This will allow us to use more memory for keys and will also work better if the number of rows that is to be sorted is much larger than expected.
sql/item.cc:
Add 'thd' to send() (To avoid usage of 'current_thd')
sql/item.h:
Add 'thd' to send() (To avoid usage of 'current_thd')
sql/item_func.h:
Cleanup
sql/opt_range.cc:
Use mem_root instead of sql_alloc() to get more speed
sql/sql_class.cc:
Add 'thd' to send() (To avoid usage of 'current_thd')
sql/sql_class.h:
Added strmake()
sql/sql_handler.cc:
Add 'thd' to send() (To avoid usage of 'current_thd')
sql/sql_lex.cc:
Use mem_root instead of sql_alloc() to get more speed
sql/sql_select.cc:
Add 'thd' to send() (To avoid usage of 'current_thd')
tests/fork2_test.pl:
Fixed typos
tests/fork_big.pl:
Fixed typos
tests/insert_and_repair.pl:
Fixed typos
tests/rename_test.pl:
Fixed typos
tests/test_delayed_insert.pl:
Fixed typos
Diffstat (limited to 'sql-bench/test-insert.sh')
-rw-r--r-- | sql-bench/test-insert.sh | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh index 9dc3d9aa7c2..9da82fc8191 100644 --- a/sql-bench/test-insert.sh +++ b/sql-bench/test-insert.sh @@ -1173,7 +1173,7 @@ if (!$opt_skip_delete) } $end_time=new Benchmark; - print "Time for delete_all ($count): " . + print "Time for delete_range ($count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; if ($opt_lock_tables) @@ -1209,6 +1209,7 @@ print "Insert into table with $keys keys and with a primary key with $seg parts\ # Make keys on the most important types @types=(0,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1); # A 1 for each char field push(@fields,"field1 tinyint not null"); +push(@fields,"field_search tinyint not null"); push(@fields,"field2 mediumint not null"); push(@fields,"field3 smallint not null"); push(@fields,"field4 char(16) not null"); @@ -1228,9 +1229,10 @@ for ($i= 1 ; $i <= $seg ; $i++) } substr($query,-1)=")"; push (@keys,$query); +push (@keys,"index index2 (field_search)"); #Create other keys -for ($i=2 ; $i <= $keys ; $i++) +for ($i=3 ; $i <= $keys ; $i++) { push(@keys,"index index$i (field$i)"); } @@ -1256,11 +1258,11 @@ if (($opt_fast || $opt_fast_insert) && $server->{'limits'}->{'insert_multi_value $res=$query; for ($i=0; $i < $many_keys_loop_count; $i++) { + $id= $i & 127; $rand=$random[$i]; - $tmp="(" . ($i & 127) . ",$rand," . ($i & 32766) . - ",'ABCDEF$rand',0,"; + $tmp="($id,$id,$rand," . ($i & 32766) . ",'ABCDEF$rand',0,"; - for ($j=5; $j <= $fields ; $j++) + for ($j=6; $j <= $fields ; $j++) { $tmp.= ($types[$j] == 0) ? "$rand," : "'$rand',"; } @@ -1281,11 +1283,12 @@ else { for ($i=0; $i < $many_keys_loop_count; $i++) { + $id= $i & 127; $rand=$random[$i]; - $query="insert into bench1 values (" . ($i & 127) . ",$rand," . ($i & 32767) . + $query="insert into bench1 values ($id,$id,$rand," . ($i & 32767) . ",'ABCDEF$rand',0,"; - for ($j=5; $j <= $fields ; $j++) + for ($j=6; $j <= $fields ; $j++) { $query.= ($types[$j] == 0) ? "$rand," : "'$rand',"; } @@ -1324,8 +1327,8 @@ print "Testing update of keys\n"; $loop_time=new Benchmark; for ($i=0 ; $i< 256; $i++) { - $dbh->do("update bench1 set field5=1 where field1=$i") - or die "Got error $DBI::errstr with query: update bench1 set field5=1 where field1=$i\n"; + $dbh->do("update bench1 set field5=1 where field_search=$i") + or die "Got error $DBI::errstr with query: update bench1 set field5=1 where field_search=$i\n"; } $end_time=new Benchmark; print "Time for update_of_primary_key_many_keys (256): " . @@ -1366,29 +1369,31 @@ $count=0; for ($i=0 ; $i < 128 ; $i++) { $count++; - $dbh->do("delete from bench1 where field1 = $i") or die $DBI::errstr; + $dbh->do("delete from bench1 where field_search = $i") or die $DBI::errstr; } $end_time=new Benchmark; print "Time for delete_big_many_keys ($count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; +if ($opt_lock_tables) +{ + $sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr; +} + print "Deleting everything from table\n"; $count=1; if ($opt_fast) { - $dbh->do("delete from bench1") or die $DBI::errstr; + $query= ($limits->{'truncate_table'} ? "truncate table bench1" : + "delete from bench1"); + $dbh->do($query) or die $DBI::errstr; } else { $dbh->do("delete from bench1 where field1 > 0") or die $DBI::errstr; } -if ($opt_lock_tables) -{ - $sth = $dbh->do("UNLOCK TABLES") || die $DBI::errstr; -} - $end_time=new Benchmark; print "Time for delete_all_many_keys ($count): " . timestr(timediff($end_time, $loop_time),"all") . "\n\n"; |