summaryrefslogtreecommitdiff
path: root/sql-bench/test-insert.sh
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-10-11 04:25:00 +0300
committermonty@hundin.mysql.fi <>2001-10-11 04:25:00 +0300
commit075a0fbde0a068f970473555edfa785592e61291 (patch)
tree52236f7a3879ba894bd97a5318843692f1843b8d /sql-bench/test-insert.sh
parent6265dfccda684865f201e66c305960cffbfdd659 (diff)
downloadmariadb-git-075a0fbde0a068f970473555edfa785592e61291.tar.gz
Portability fixes
Fixed bug with long log-filenames in Innobase.
Diffstat (limited to 'sql-bench/test-insert.sh')
-rw-r--r--sql-bench/test-insert.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh
index 655e38b1b0e..9dc3d9aa7c2 100644
--- a/sql-bench/test-insert.sh
+++ b/sql-bench/test-insert.sh
@@ -917,13 +917,19 @@ print "Time for update_with_key (" . ($opt_loop_count*3) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
$loop_time=new Benchmark;
-for ($i=0 ; $i < $opt_loop_count*3 ; $i+=3)
+$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;
+ $end_time=new Benchmark;
+ last if ($estimated=predict_query_time($loop_time,$end_time,\$i,$tests,
+ $opt_loop_count));
}
-
-$end_time=new Benchmark;
-print "Time for update_with_key_prefix (" . ($opt_loop_count) . "): " .
+if ($estimated)
+{ print "Estimated time"; }
+else
+{ print "Time"; }
+print " for update_with_key_prefix (" . ($opt_loop_count) . "): " .
timestr(timediff($end_time, $loop_time),"all") . "\n";
print "\nTesting update of all rows\n";