summaryrefslogtreecommitdiff
path: root/sql-bench
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-08-17 01:20:21 +0300
committerunknown <monty@donna.mysql.com>2000-08-17 01:20:21 +0300
commitc4543517a39e376ce12a86b2d68baf98fde4880e (patch)
tree19c14783fd50a8c44254ce4a6529d9f226add65b /sql-bench
parentdd38ab7583fb0f850a4be59c1f45261bc1ecf318 (diff)
parent7496ec3173ed1ad87f07ff87058a40e1748ae64c (diff)
downloadmariadb-git-c4543517a39e376ce12a86b2d68baf98fde4880e.tar.gz
Merge
sql-bench/server-cfg.sh: Auto merged Docs/manual.texi: Merged of manual
Diffstat (limited to 'sql-bench')
-rwxr-xr-xsql-bench/bench-init.pl.sh4
-rwxr-xr-xsql-bench/server-cfg.sh26
-rwxr-xr-xsql-bench/test-insert.sh21
-rwxr-xr-xsql-bench/test-select.sh2
4 files changed, 36 insertions, 17 deletions
diff --git a/sql-bench/bench-init.pl.sh b/sql-bench/bench-init.pl.sh
index b6552ccb48f..3b9e343bc4a 100755
--- a/sql-bench/bench-init.pl.sh
+++ b/sql-bench/bench-init.pl.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
@@ -31,7 +31,7 @@
# $server Object for current server
# $limits Hash reference to limits for benchmark
-$benchmark_version="2.8";
+$benchmark_version="2.9";
use Getopt::Long;
require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh
index 2ecd5104adb..b986b4b519e 100755
--- a/sql-bench/server-cfg.sh
+++ b/sql-bench/server-cfg.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
@@ -159,6 +159,7 @@ sub new
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 1; # Has function in
$limits{'limit'} = 1; # supports the limit attribute
+ $limits{'unique_index'} = 1; # Unique index works or not
$smds{'time'} = 1;
$smds{'q1'} = 'b'; # with time not supp by mysql ('')
@@ -355,6 +356,7 @@ sub new
$limits{'alter_table_dropcol'}= 0;
$limits{'group_func_extra_std'} = 0;
$limits{'limit'} = 1; # supports the limit attribute
+ $limits{'unique_index'} = 1; # Unique index works or not
$limits{'func_odbc_mod'} = 0;
$limits{'func_extra_%'} = 0;
@@ -551,7 +553,8 @@ sub new
$limits{'max_index'} = 64; # Is this true ?
$limits{'max_index_parts'} = 16; # Is this true ?
$limits{'max_text_size'} = 7000; # 8000 crashes pg 6.3
- $limits{'query_size'} = 8191;
+ $limits{'query_size'} = 16777216;
+ $limits{'unique_index'} = 0; # Unique index works or not
# the different cases per query ...
$smds{'q1'} = 'b'; # with time
@@ -642,13 +645,17 @@ sub create
$index =~ s/primary key/unique index primary_key/i;
if ($index =~ /^unique.*\(([^\(]*)\)$/i)
{
- $indfield="using btree (" .$1.")";
+ # original: $indfield="using btree (" .$1.")";
+ # using btree doesnīt seem to work with Postgres anymore; it creates
+ # the table and adds the index, but it isnīt unique
+ $indfield=" (" .$1.")";
$in="unique index";
$table="index_$nr"; $nr++;
}
elsif ($index =~ /^(.*index)\s+(\w*)\s+(\(.*\))$/i)
{
- $indfield="using btree " .$3;
+ # original: $indfield="using btree (" .$1.")";
+ $indfield=" " .$3;
$in="index";
$table="index_$nr"; $nr++;
}
@@ -820,6 +827,7 @@ sub new
$limits{'column_alias'} = 1;
$limits{'NEG'} = 1;
$limits{'func_extra_in_num'} = 1;
+ $limits{'unique_index'} = 1; # Unique index works or not
# for the smds small benchmark test ....
# the different cases per query ...
@@ -1057,6 +1065,7 @@ sub new
$limits{'column_alias'} = 0;
$limits{'NEG'} = 1;
$limits{'func_extra_in_num'} = 0;
+ $limits{'unique_index'} = 1; # Unique index works or not
# for the smds small benchmark test ....
# the different cases per query ... EMPRESS
@@ -1333,6 +1342,7 @@ sub new
$limits{'column_alias'} = 1; # Alias for fields in select statement.
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 1; # Has function in
+ $limits{'unique_index'} = 1; # Unique index works or not
$smds{'time'} = 1;
$smds{'q1'} = 'b'; # with time not supp by mysql ('')
@@ -1580,7 +1590,7 @@ sub new
$limits{'select_without_from'}= 0; # Can do 'select 1';
$limits{'subqueries'} = 1; # Doesn't support sub-queries.
$limits{'table_wildcard'} = 1; # Has SELECT table_name.*
-
+ $limits{'unique_index'} = 1; # Unique index works or not
return $self;
}
@@ -1777,6 +1787,7 @@ sub new
$limits{'column_alias'} = 1; # Alias for fields in select statement.
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 1; # Has function in
+ $limits{'unique_index'} = 1; # Unique index works or not
return $self;
}
@@ -1947,6 +1958,7 @@ sub new
$limits{'column_alias'} = 1; # Alias for fields in select statement.
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 0; # Has function in
+ $limits{'unique_index'} = 1; # Unique index works or not
return $self;
}
@@ -2129,6 +2141,7 @@ sub new
$limits{'column_alias'} = 1; # Alias for fields in select statement.
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 0; # Has function in
+ $limits{'unique_index'} = 1; # Unique index works or not
return $self;
}
@@ -2314,6 +2327,7 @@ sub new
$limits{'column_alias'} = 1; # Alias for fields in select statement.
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 1; # Has function in
+ $limits{'unique_index'} = 1; # Unique index works or not
$smds{'time'} = 1;
$smds{'q1'} = 'b'; # with time not supp by mysql ('')
@@ -2522,6 +2536,7 @@ sub new
$limits{'column_alias'} = 1; # Alias for fields in select statement.
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 0; # Has function in
+ $limits{'unique_index'} = 1; # Unique index works or not
return $self;
}
@@ -2689,6 +2704,7 @@ sub new
$limits{'NEG'} = 1; # Supports -id
$limits{'func_extra_in_num'} = 1; # Has function in
$limits{'limit'} = 0; # Does not support the limit attribute
+ $limits{'unique_index'} = 1; # Unique index works or not
$smds{'time'} = 1;
$smds{'q1'} = 'b'; # with time not supp by mysql ('')
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";
+ }
}
}
diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh
index 7ed8a4cac9f..21a5b2307c9 100755
--- a/sql-bench/test-select.sh
+++ b/sql-bench/test-select.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