summaryrefslogtreecommitdiff
path: root/sql-bench/test-insert.sh
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-08-17 01:05:02 +0300
committerunknown <monty@donna.mysql.com>2000-08-17 01:05:02 +0300
commit7496ec3173ed1ad87f07ff87058a40e1748ae64c (patch)
treeeff8fc8b2beebf362d7ac8de2cad48821df97d02 /sql-bench/test-insert.sh
parente318f3a607f609c28636a9ac29cd67662166f01a (diff)
downloadmariadb-git-7496ec3173ed1ad87f07ff87058a40e1748ae64c.tar.gz
Additions for CHECK table + update of benchmarks
Docs/manual.texi: Updated for 3.23.23 myisam/mi_check.c: Fix for CHECK table sql-bench/bench-init.pl.sh: Fix of benchmarks for PostgreSQL 7.0.2 sql-bench/server-cfg.sh: Fix of benchmarks for PostgreSQL 7.0.2 sql-bench/test-insert.sh: Fix of benchmarks for PostgreSQL 7.0.2 sql-bench/test-select.sh: Fix of benchmarks for PostgreSQL 7.0.2 sql/ha_myisam.cc: Fix for CHECK table sql/handler.h: Fix for CHECK table sql/lex.h: Fix for CHECK table sql/sql_load.cc: Fix bug in delayed keys sql/sql_table.cc: Fix for CHECK table sql/sql_yacc.yy: Fix for CHECK table sql/structs.h: Fix wrong type
Diffstat (limited to 'sql-bench/test-insert.sh')
-rwxr-xr-xsql-bench/test-insert.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh
index 5cde7c25405..da70d99d87a 100755
--- a/sql-bench/test-insert.sh
+++ b/sql-bench/test-insert.sh
@@ -1,4 +1,4 @@
-#@PERL@
+#!@PERL@
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This library is free software; you can redistribute it and/or
@@ -215,16 +215,19 @@ if ($opt_fast && defined($server->{vacuum}))
#### insert $opt_loop_count records with duplicate id
####
-print "Testing insert of duplicates\n";
-$loop_time=new Benchmark;
-for ($i=0 ; $i < $opt_loop_count ; $i++)
+if ($limits->{'unique_index'})
{
- $tmpvar^= ((($tmpvar + 63) + $i)*3 % $opt_loop_count);
- $tmp=$tmpvar % ($total_rows);
- $tmpquery = "$query" . "$tmp" . ",1,2,'D')";
- if ($dbh->do($tmpquery))
+ print "Testing insert of duplicates\n";
+ $loop_time=new Benchmark;
+ for ($i=0 ; $i < $opt_loop_count ; $i++)
{
- die "Didn't get an error when inserting duplicate record $tmp\n";
+ $tmpvar^= ((($tmpvar + 63) + $i)*3 % $opt_loop_count);
+ $tmp=$tmpvar % ($total_rows);
+ $tmpquery = "$query" . "$tmp" . ",1,2,'D')";
+ if ($dbh->do($tmpquery))
+ {
+ die "Didn't get an error when inserting duplicate record $tmp\n";
+ }
}
}