diff options
author | Monty <monty@mariadb.org> | 2018-04-27 08:26:28 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-04-30 14:05:27 +0300 |
commit | 862e602b5a5bbc79bacdac9722f1ab69d0ccf7c3 (patch) | |
tree | f643008ad3874dc8070d00989a2e82c6b45f816d /sql-bench/test-insert.sh | |
parent | cb16bc95ff9a7b4ce0835acf8fa6d6a06ad10c3c (diff) | |
download | mariadb-git-862e602b5a5bbc79bacdac9722f1ab69d0ccf7c3.tar.gz |
Added more test to sql-bench
- test-alter now correctly drops all columns
- test-alter has a new test that times adding columns in middle of table
- test-insert has a new test to check updates that doesn't change data
- test-insert: update_with_key_prefix didn't change data. Now fixed
Diffstat (limited to 'sql-bench/test-insert.sh')
-rw-r--r-- | sql-bench/test-insert.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh index e264c7d529f..f4b47908d9b 100644 --- a/sql-bench/test-insert.sh +++ b/sql-bench/test-insert.sh @@ -993,11 +993,22 @@ $end_time=new Benchmark; print "Time for update_with_key (" . ($opt_loop_count*3) . "): " . timestr(timediff($end_time, $loop_time),"all") . "\n"; +print "Testing update with key, no changes in data\n"; +$loop_time=new Benchmark; +for ($i=0 ; $i < $opt_loop_count*3 ; $i++) +{ + $sth = $dbh->do("update bench1 set dummy1='updated' where id=$i and id2=$i") or die $DBI::errstr; +} + +$end_time=new Benchmark; +print "Time for update_with_key_record_unchanged (" . ($opt_loop_count*3) . "): " . + timestr(timediff($end_time, $loop_time),"all") . "\n"; + $loop_time=new Benchmark; $count=0; for ($i=1 ; $i < $opt_loop_count*3 ; $i+=3) { - $sth = $dbh->do("update bench1 set dummy1='updated' where id=$i") or die $DBI::errstr; + $sth = $dbh->do("update bench1 set dummy1='really updated' where id=$i") or die $DBI::errstr; $end_time=new Benchmark; last if ($estimated=predict_query_time($loop_time,$end_time,\$i,($i-1)/3, $opt_loop_count)); |