summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerje Rosten <terje.rosten@oracle.com>2014-06-25 12:35:50 +0200
committerTerje Rosten <terje.rosten@oracle.com>2014-06-25 12:35:50 +0200
commit5c4937c101a9f4127ee3f5e21447c872e4406209 (patch)
tree11baaedbb73a5a6d6ab92ad727806313998b9251
parenta44b4a188298c8c7e46cd20bf4198712ce91f762 (diff)
downloadmariadb-git-5c4937c101a9f4127ee3f5e21447c872e4406209.tar.gz
Bug#16395459 TEST AND RESULT FILES WITH EXECUTE BIT
Bug#16415173 CRLF INSTEAD OF LF IN SQL-BENCH SCRIPTS Correct perms and converts from Windows style to UNIX style line endings on some files. Fix perms on installed ini files. (MySQL 5.5 version)
-rw-r--r--[-rwxr-xr-x]mysql-test/collections/default.weekly0
-rw-r--r--[-rwxr-xr-x]mysql-test/r/lowercase_table4.result0
-rw-r--r--[-rwxr-xr-x]mysql-test/suite/innodb/r/innodb_bug57904.result0
-rw-r--r--[-rwxr-xr-x]mysql-test/suite/innodb/r/innodb_bug60196.result0
-rw-r--r--[-rwxr-xr-x]mysql-test/suite/innodb/t/innodb_bug57904.test0
-rw-r--r--[-rwxr-xr-x]mysql-test/suite/innodb/t/innodb_bug60196-master.opt2
-rw-r--r--[-rwxr-xr-x]mysql-test/suite/innodb/t/innodb_bug60196.test0
-rwxr-xr-x[-rw-r--r--]mysql-test/t/long_tmpdir-master.sh2
-rwxr-xr-x[-rw-r--r--]mysql-test/t/lowercase_mixed_tmpdir-master.sh2
-rw-r--r--[-rwxr-xr-x]mysql-test/t/lowercase_table4-master.opt2
-rw-r--r--[-rwxr-xr-x]mysql-test/t/lowercase_table4.test0
-rw-r--r--[-rwxr-xr-x]scripts/mysqlaccess.conf0
-rwxr-xr-x[-rw-r--r--]sql-bench/graph-compare-results.sh2
-rw-r--r--sql-bench/innotest1.sh280
-rw-r--r--sql-bench/innotest1a.sh212
-rw-r--r--sql-bench/innotest1b.sh198
-rw-r--r--sql-bench/innotest2.sh296
-rw-r--r--sql-bench/innotest2a.sh184
-rw-r--r--sql-bench/innotest2b.sh204
-rw-r--r--support-files/CMakeLists.txt6
-rw-r--r--[-rwxr-xr-x]support-files/config.huge.ini.sh0
-rw-r--r--[-rwxr-xr-x]support-files/config.medium.ini.sh0
-rw-r--r--[-rwxr-xr-x]support-files/config.small.ini.sh0
23 files changed, 699 insertions, 691 deletions
diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly
index a03e2593cfe..a03e2593cfe 100755..100644
--- a/mysql-test/collections/default.weekly
+++ b/mysql-test/collections/default.weekly
diff --git a/mysql-test/r/lowercase_table4.result b/mysql-test/r/lowercase_table4.result
index f896b9008e3..f896b9008e3 100755..100644
--- a/mysql-test/r/lowercase_table4.result
+++ b/mysql-test/r/lowercase_table4.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug57904.result b/mysql-test/suite/innodb/r/innodb_bug57904.result
index d265adc385f..d265adc385f 100755..100644
--- a/mysql-test/suite/innodb/r/innodb_bug57904.result
+++ b/mysql-test/suite/innodb/r/innodb_bug57904.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug60196.result b/mysql-test/suite/innodb/r/innodb_bug60196.result
index 411950b49dd..411950b49dd 100755..100644
--- a/mysql-test/suite/innodb/r/innodb_bug60196.result
+++ b/mysql-test/suite/innodb/r/innodb_bug60196.result
diff --git a/mysql-test/suite/innodb/t/innodb_bug57904.test b/mysql-test/suite/innodb/t/innodb_bug57904.test
index 1131e24844d..1131e24844d 100755..100644
--- a/mysql-test/suite/innodb/t/innodb_bug57904.test
+++ b/mysql-test/suite/innodb/t/innodb_bug57904.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug60196-master.opt b/mysql-test/suite/innodb/t/innodb_bug60196-master.opt
index c0a1981fa7c..ac4d3211e89 100755..100644
--- a/mysql-test/suite/innodb/t/innodb_bug60196-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug60196-master.opt
@@ -1 +1 @@
---lower-case-table-names=2
+--lower-case-table-names=2
diff --git a/mysql-test/suite/innodb/t/innodb_bug60196.test b/mysql-test/suite/innodb/t/innodb_bug60196.test
index ea85653f1af..ea85653f1af 100755..100644
--- a/mysql-test/suite/innodb/t/innodb_bug60196.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60196.test
diff --git a/mysql-test/t/long_tmpdir-master.sh b/mysql-test/t/long_tmpdir-master.sh
index 318955fbcca..1edb0b2133d 100644..100755
--- a/mysql-test/t/long_tmpdir-master.sh
+++ b/mysql-test/t/long_tmpdir-master.sh
@@ -1,3 +1,5 @@
+#! /bin/bash
+
d="$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789"
test -d "$d" || mkdir "$d"
rm -f "$d"/*
diff --git a/mysql-test/t/lowercase_mixed_tmpdir-master.sh b/mysql-test/t/lowercase_mixed_tmpdir-master.sh
index 95c26e3aa02..cb34f9f7202 100644..100755
--- a/mysql-test/t/lowercase_mixed_tmpdir-master.sh
+++ b/mysql-test/t/lowercase_mixed_tmpdir-master.sh
@@ -1,3 +1,5 @@
+#! /bin/bash
+
# This test requires a non-lowercase tmpdir directory on a case-sensitive
# filesystem.
diff --git a/mysql-test/t/lowercase_table4-master.opt b/mysql-test/t/lowercase_table4-master.opt
index c0a1981fa7c..ac4d3211e89 100755..100644
--- a/mysql-test/t/lowercase_table4-master.opt
+++ b/mysql-test/t/lowercase_table4-master.opt
@@ -1 +1 @@
---lower-case-table-names=2
+--lower-case-table-names=2
diff --git a/mysql-test/t/lowercase_table4.test b/mysql-test/t/lowercase_table4.test
index 783a4fcae51..783a4fcae51 100755..100644
--- a/mysql-test/t/lowercase_table4.test
+++ b/mysql-test/t/lowercase_table4.test
diff --git a/scripts/mysqlaccess.conf b/scripts/mysqlaccess.conf
index faf47da5f6c..faf47da5f6c 100755..100644
--- a/scripts/mysqlaccess.conf
+++ b/scripts/mysqlaccess.conf
diff --git a/sql-bench/graph-compare-results.sh b/sql-bench/graph-compare-results.sh
index 317ef583886..c5ba68655cc 100644..100755
--- a/sql-bench/graph-compare-results.sh
+++ b/sql-bench/graph-compare-results.sh
@@ -1,3 +1,5 @@
+#! /usr/bin/perl
+
####
#### Hello ... this is a heavily hacked script by Luuk
#### instead of printing the result it makes a nice gif
diff --git a/sql-bench/innotest1.sh b/sql-bench/innotest1.sh
index 1c5450a1d9e..9e1ed32c273 100644
--- a/sql-bench/innotest1.sh
+++ b/sql-bench/innotest1.sh
@@ -1,142 +1,142 @@
-#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl
+############################################################################
+# Stress test for MySQL/InnoDB combined database
+# (c) 2002 Innobase Oy & MySQL AB
+#
+############################################################################
+
use Cwd;
-use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI;
+use Benchmark;
+
+$opt_loop_count = 100000;
+
$pwd = cwd(); $pwd = "." if ($pwd eq '');
-require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest1: MySQL/InnoDB stress test in Perl\n";
-print "-------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on table innotest1 in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest1 > out1\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kh";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-$n = 0;
-
-for ($i = 0; $i < 1; $i++) {
-
- print "Dropping table innotest1\n";
-
- $dbh->do("drop table innotest1");
-
- print "Creating table innotest1\n";
-
- $dbh->do(
- "create table innotest1 (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), E TIMESTAMP, F TIMESTAMP, G DATETIME, PRIMARY KEY (A, D), INDEX
-(B, C), INDEX (C), INDEX (D), INDEX(E), INDEX(G)) TYPE = INNODB")
- || die $dbh->errstr;
-
- for ($j = 2; $j < $opt_loop_count - 10; $j = $j + 2) {
-
- if ($j % 10 == 0) {
- $dbh->do(
- "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NULL, NULL)");
- } else {
- $dbh->do(
- "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NOW(), NOW())");
- }
-
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 7]."' where A = ".$random[$j + 5]);
-
- $dbh->do("update innotest1 SET D = D + 1 where A =".($j / 2 - 500));
-
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 1]."' where A =".($j / 2 - 505));
-
- $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]);
-
- fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 97)) {
- fetch_all_rows($dbh, "select c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select b, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
- fetch_all_rows($dbh, "select b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
- fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
- fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- fetch_all_rows($dbh, "select d, b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
-
- $dbh->do("rollback");
- }
-
- for ($k = 1; $k < 10; $k++) {
-
- $n += fetch_all_rows($dbh,
-"SELECT a, d from innotest1 where a = ".(($k * 1764767) % $j));
-
- $n += fetch_all_rows($dbh,
-"SELECT * from innotest1 where a = ".(($k * 187567) % $j));
-
- }
-
- if (0 == ($j % 1000)) {
- print "round $j, $n rows fetched\n";
- }
-
- if (0 == ($j % 20000)) {
- print "Checking table innotest1...\n";
- $dbh->do("check table innotest1");
- print "Table checked.\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
+
+print "Innotest1: MySQL/InnoDB stress test in Perl\n";
+print "-------------------------------------------\n";
+print "This is a randomized stress test for concurrent inserts,\n";
+print "updates, deletes, commits and rollbacks. The test will generate\n";
+print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
+print "\n";
+print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
+print "The thing to watch is that the server does not crash or does not\n";
+print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
+print "warnings about MySQL lock reservations can appear in the .err log.\n";
+print "The test will run very long, even several hours. You can kill\n";
+print "the perl processes running this test at any time and do CHECK\n";
+print "TABLE on table innotest1 in the 'test' database.\n";
+print "\n";
+print "Some of these stress tests will print a lot of SQL errors\n";
+print "to the standard output. That is not to be worried about.\n";
+print "You can direct the output to a file like this:\n";
+print "perl innotest1 > out1\n\n";
+
+print "Generating random keys\n";
+$random[$opt_loop_count] = 0;
+$rnd_str[$opt_loop_count] = "a";
+
+for ($i = 0; $i < $opt_loop_count; $i++) {
+
+ $random[$i] = ($i * 63857) % $opt_loop_count;
+
+ if (0 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
+ } else { if (1 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khd";
+ } else { if (2 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kh";
+ }}}
+
+ for ($j = 0; $j < (($i * 764877) % 20); $j++) {
+ $rnd_str[$i] = $rnd_str[$i]."k";
+ }
+}
+
+####
+#### Connect
+####
+
+$dbh = $server->connect()
+|| die $dbh->errstr;
+
+$dbh->do("set autocommit = 0");
+
+$n = 0;
+
+for ($i = 0; $i < 1; $i++) {
+
+ print "Dropping table innotest1\n";
+
+ $dbh->do("drop table innotest1");
+
+ print "Creating table innotest1\n";
+
+ $dbh->do(
+ "create table innotest1 (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), E TIMESTAMP, F TIMESTAMP, G DATETIME, PRIMARY KEY (A, D), INDEX
+(B, C), INDEX (C), INDEX (D), INDEX(E), INDEX(G)) TYPE = INNODB")
+ || die $dbh->errstr;
+
+ for ($j = 2; $j < $opt_loop_count - 10; $j = $j + 2) {
+
+ if ($j % 10 == 0) {
+ $dbh->do(
+ "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NULL, NULL)");
+ } else {
+ $dbh->do(
+ "insert into innotest1 (D, B, C, F, G) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."', NOW(), NOW())");
+ }
+
+ $dbh->do("update innotest1 set B = '".$rnd_str[$j + 7]."' where A = ".$random[$j + 5]);
+
+ $dbh->do("update innotest1 SET D = D + 1 where A =".($j / 2 - 500));
+
+ $dbh->do("update innotest1 set B = '".$rnd_str[$j + 1]."' where A =".($j / 2 - 505));
+
+ $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]);
+
+ fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
+
+ if (0 == ($j % 10)) {
+ $dbh->do("commit");
+ }
+
+ if (0 == ($j % 97)) {
+ fetch_all_rows($dbh, "select c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ fetch_all_rows($dbh, "select b, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
+ fetch_all_rows($dbh, "select b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ fetch_all_rows($dbh, "select b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
+ fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ fetch_all_rows($dbh, "select a, b, c, e, f, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
+ fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ fetch_all_rows($dbh, "select d, b, c, g from innotest1 where b = '".$rnd_str[$j - 677]."'");
+
+ $dbh->do("rollback");
+ }
+
+ for ($k = 1; $k < 10; $k++) {
+
+ $n += fetch_all_rows($dbh,
+"SELECT a, d from innotest1 where a = ".(($k * 1764767) % $j));
+
+ $n += fetch_all_rows($dbh,
+"SELECT * from innotest1 where a = ".(($k * 187567) % $j));
+
+ }
+
+ if (0 == ($j % 1000)) {
+ print "round $j, $n rows fetched\n";
+ }
+
+ if (0 == ($j % 20000)) {
+ print "Checking table innotest1...\n";
+ $dbh->do("check table innotest1");
+ print "Table checked.\n";
+ }
+ }
+
+ $dbh->do("commit");
+}
+
+$dbh->disconnect; # close connection
diff --git a/sql-bench/innotest1a.sh b/sql-bench/innotest1a.sh
index 876100e5de4..1e428e33dcf 100644
--- a/sql-bench/innotest1a.sh
+++ b/sql-bench/innotest1a.sh
@@ -1,108 +1,108 @@
-#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl
+############################################################################
+# Stress test for MySQL/InnoDB combined database
+# (c) 2002 Innobase Oy & MySQL AB
+#
+############################################################################
+
use Cwd;
-use DBI;
-use Benchmark;
-
-$opt_loop_count = 200000;
-
+use DBI;
+use Benchmark;
+
+$opt_loop_count = 200000;
+
$pwd = cwd(); $pwd = "." if ($pwd eq '');
-require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest1a: MySQL/InnoDB stress test in Perl\n";
-print "-------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on table innotest1 in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest1 > out1\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kh";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 1; $i++) {
- print "loop $i\n";
-
- for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) {
- $dbh->do(
- "insert into innotest1 (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')");
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 2]."' where A = ".$random[$j + 5]);
- $dbh->do("update innotest1 SET D = D + 1 where A =".(($j - 1) / 2 - 777));
- $dbh->do("update innotest1 set B = '".$rnd_str[$j + 8]."' where A =".(($j - 1) / 2 - 770));
- $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]);
-
- fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
-
- if (0 == ($j % 37)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 533)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 537)) {
- print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'");
- print "\n";
- }
-
- if (0 == (($j - 1) % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
+
+print "Innotest1a: MySQL/InnoDB stress test in Perl\n";
+print "-------------------------------------------\n";
+print "This is a randomized stress test for concurrent inserts,\n";
+print "updates, deletes, commits and rollbacks. The test will generate\n";
+print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
+print "\n";
+print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
+print "The thing to watch is that the server does not crash or does not\n";
+print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
+print "warnings about MySQL lock reservations can appear in the .err log.\n";
+print "The test will run very long, even several hours. You can kill\n";
+print "the perl processes running this test at any time and do CHECK\n";
+print "TABLE on table innotest1 in the 'test' database.\n";
+print "\n";
+print "Some of these stress tests will print a lot of SQL errors\n";
+print "to the standard output. That is not to be worried about.\n";
+print "You can direct the output to a file like this:\n";
+print "perl innotest1 > out1\n\n";
+
+print "Generating random keys\n";
+$random[$opt_loop_count] = 0;
+$rnd_str[$opt_loop_count] = "a";
+
+for ($i = 0; $i < $opt_loop_count; $i++) {
+
+ $random[$i] = ($i * 63857) % $opt_loop_count;
+
+ if (0 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
+ } else { if (1 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khd";
+ } else { if (2 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kh";
+ }}}
+
+ for ($j = 0; $j < (($i * 764877) % 20); $j++) {
+ $rnd_str[$i] = $rnd_str[$i]."k";
+ }
+}
+
+####
+#### Connect
+####
+
+$dbh = $server->connect()
+|| die $dbh->errstr;
+
+
+$dbh->do("set autocommit = 0");
+
+for ($i = 0; $i < 1; $i++) {
+ print "loop $i\n";
+
+ for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) {
+ $dbh->do(
+ "insert into innotest1 (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')");
+ $dbh->do("update innotest1 set B = '".$rnd_str[$j + 2]."' where A = ".$random[$j + 5]);
+ $dbh->do("update innotest1 SET D = D + 1 where A =".(($j - 1) / 2 - 777));
+ $dbh->do("update innotest1 set B = '".$rnd_str[$j + 8]."' where A =".(($j - 1) / 2 - 770));
+ $dbh->do("delete from innotest1 where A = ".$random[$random[$j]]);
+
+ fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
+
+ if (0 == ($j % 37)) {
+ $dbh->do("commit");
+ }
+
+ if (0 == ($j % 533)) {
+ $dbh->do("rollback");
+ }
+
+ if (0 == ($j % 537)) {
+ print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'");
+ print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'");
+ print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'");
+ print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'");
+ print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'");
+ print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'");
+ print "\n";
+ }
+
+ if (0 == (($j - 1) % 1000)) {
+ print "round $j\n";
+ }
+ }
+
+ $dbh->do("commit");
+}
+
+$dbh->disconnect; # close connection
diff --git a/sql-bench/innotest1b.sh b/sql-bench/innotest1b.sh
index 3f6c9f5bd5f..524a6e0e145 100644
--- a/sql-bench/innotest1b.sh
+++ b/sql-bench/innotest1b.sh
@@ -1,101 +1,101 @@
-#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl
+############################################################################
+# Stress test for MySQL/InnoDB combined database
+# (c) 2002 Innobase Oy & MySQL AB
+#
+############################################################################
+
use Cwd;
-use DBI;
-use Benchmark;
-
-$opt_loop_count = 200000;
-
+use DBI;
+use Benchmark;
+
+$opt_loop_count = 200000;
+
$pwd = cwd(); $pwd = "." if ($pwd eq '');
-require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest1b: MySQL/InnoDB stress test in Perl\n";
-print "-------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on table innotest1 in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest1 > out1\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kh";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 5; $i++) {
- print "loop $i\n";
-
- for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) {
-
- fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
-
- if (0 == ($j % 37)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 533)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 537)) {
- print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'");
- print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
- print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'");
- print "\n";
- }
-
- if (0 == (($j - 1) % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
+
+print "Innotest1b: MySQL/InnoDB stress test in Perl\n";
+print "-------------------------------------------\n";
+print "This is a randomized stress test for concurrent inserts,\n";
+print "updates, deletes, commits and rollbacks. The test will generate\n";
+print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
+print "\n";
+print "You should run innotest1, innotest1a, and innotest1b concurrently.\n";
+print "The thing to watch is that the server does not crash or does not\n";
+print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
+print "warnings about MySQL lock reservations can appear in the .err log.\n";
+print "The test will run very long, even several hours. You can kill\n";
+print "the perl processes running this test at any time and do CHECK\n";
+print "TABLE on table innotest1 in the 'test' database.\n";
+print "\n";
+print "Some of these stress tests will print a lot of SQL errors\n";
+print "to the standard output. That is not to be worried about.\n";
+print "You can direct the output to a file like this:\n";
+print "perl innotest1 > out1\n\n";
+
+print "Generating random keys\n";
+$random[$opt_loop_count] = 0;
+$rnd_str[$opt_loop_count] = "a";
+
+for ($i = 0; $i < $opt_loop_count; $i++) {
+
+ $random[$i] = ($i * 63857) % $opt_loop_count;
+
+ if (0 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kjgclgrtfuylfluyfyufyulfulfyyulofuyolfyufyufuyfyufyufyufyufyyufujhfghd";
+ } else { if (1 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khd";
+ } else { if (2 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kh";
+ }}}
+
+ for ($j = 0; $j < (($i * 764877) % 20); $j++) {
+ $rnd_str[$i] = $rnd_str[$i]."k";
+ }
+}
+
+####
+#### Connect
+####
+
+$dbh = $server->connect()
+|| die $dbh->errstr;
+
+$dbh->do("set autocommit = 0");
+
+for ($i = 0; $i < 5; $i++) {
+ print "loop $i\n";
+
+ for ($j = 1; $j < $opt_loop_count - 10; $j = $j + 2) {
+
+ fetch_all_rows($dbh, "select b, c from innotest1 where a > ".$random[$j]." and a < ".($random[$j] + 7));
+
+ if (0 == ($j % 37)) {
+ $dbh->do("commit");
+ }
+
+ if (0 == ($j % 533)) {
+ $dbh->do("rollback");
+ }
+
+ if (0 == ($j % 537)) {
+ print fetch_all_rows($dbh, "select c from innotest1 where c = '".$rnd_str[$j - 67]."'");
+ print fetch_all_rows($dbh, "select b from innotest1 where b = '".$rnd_str[$j - 688]."'");
+ print fetch_all_rows($dbh, "select b, c from innotest1 where c = '".$rnd_str[$j - 67]."'");
+ print fetch_all_rows($dbh, "select b, c from innotest1 where b = '".$rnd_str[$j - 622]."'");
+ print fetch_all_rows($dbh, "select a, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ print fetch_all_rows($dbh, "select a, b, c from innotest1 where b = '".$rnd_str[$j - 644]."'");
+ print fetch_all_rows($dbh, "select d, b, c from innotest1 where c = '".$rnd_str[$j - 68]."'");
+ print fetch_all_rows($dbh, "select d, b, c from innotest1 where b = '".$rnd_str[$j - 677]."'");
+ print "\n";
+ }
+
+ if (0 == (($j - 1) % 1000)) {
+ print "round $j\n";
+ }
+ }
+
+ $dbh->do("commit");
+}
+
+$dbh->disconnect; # close connection
diff --git a/sql-bench/innotest2.sh b/sql-bench/innotest2.sh
index cfeb0527970..fa0fd418968 100644
--- a/sql-bench/innotest2.sh
+++ b/sql-bench/innotest2.sh
@@ -1,150 +1,150 @@
-#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/InnoDB combined database
-# (c) 2002 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl
+############################################################################
+# Stress test for MySQL/InnoDB combined database
+# (c) 2002 Innobase Oy & MySQL AB
+#
+############################################################################
+
use Cwd;
-use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI;
+use Benchmark;
+
+$opt_loop_count = 100000;
+
$pwd = cwd(); $pwd = "." if ($pwd eq '');
-require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest2: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
-print "------------------------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks with foreign keys with\n";
-print "the ON DELETE ... clause. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest2 > out2\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khD";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kHd";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 10); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 1; $i++) {
- print "loop $i\n";
-
- print "dropping table innotest2a\n";
- $dbh->do("drop table innotest2a");
-
- print "dropping table innotest2b\n";
- $dbh->do("drop table innotest2b");
-
- print "dropping table innotest2c\n";
- $dbh->do("drop table innotest2c");
-
- print "dropping table innotest2d\n";
- $dbh->do("drop table innotest2d");
-
- print "creating table innotest2b\n";
- $dbh->do(
- "create table innotest2b (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C)) TYPE = INNODB")
- || die $dbh->errstr;
-
- print "creating table innotest2a\n";
-
- $dbh->do(
- "create table innotest2a (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2b (A, D) ON DELETE CASCADE) TYPE = INNODB")
- || die $dbh->errstr;
-
- print "creating table innotest2c\n";
-
- $dbh->do(
- "create table innotest2c (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2a (A, D) ON DELETE CASCADE, FOREIGN KEY (B, C) REFERENCES innotest2a (B, C) ON DELETE CASCADE) TYPE = INNODB")
- || die $dbh->errstr;
-
- print "creating table innotest2d\n";
-
- $dbh->do(
- "create table innotest2d (A INT AUTO_INCREMENT, D INT, B VARCHAR(200), C VARCHAR(175), UNIQUE KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (C) REFERENCES innotest2c (C) ON DELETE SET NULL, FOREIGN KEY (B, C) REFERENCES innotest2c (B, C) ON DELETE SET NULL) TYPE = INNODB")
- || die $dbh->errstr;
- print "created\n";
-
- for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) {
- $dbh->do(
- "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2d (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do("delete from innotest2b where A = ".$random[$random[$j]])
- || print $dbh->errstr;
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 39)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 1000)) {
- print "round $j\n";
- }
- if (0 == ($j % 20000)) {
- print "Checking tables...\n";
- $dbh->do("check table innotest2a");
- $dbh->do("check table innotest2b");
- $dbh->do("check table innotest2c");
- $dbh->do("check table innotest2d");
- print "Tables checked.\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
+
+print "Innotest2: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
+print "------------------------------------------------------------\n";
+print "This is a randomized stress test for concurrent inserts,\n";
+print "updates, deletes, commits and rollbacks with foreign keys with\n";
+print "the ON DELETE ... clause. The test will generate\n";
+print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
+print "\n";
+print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
+print "The thing to watch is that the server does not crash or does not\n";
+print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
+print "warnings about MySQL lock reservations can appear in the .err log.\n";
+print "The test will run very long, even several hours. You can kill\n";
+print "the perl processes running this test at any time and do CHECK\n";
+print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
+print "\n";
+print "Some of these stress tests will print a lot of SQL errors\n";
+print "to the standard output. That is not to be worried about.\n";
+print "You can direct the output to a file like this:\n";
+print "perl innotest2 > out2\n\n";
+
+print "Generating random keys\n";
+$random[$opt_loop_count] = 0;
+$rnd_str[$opt_loop_count] = "a";
+
+for ($i = 0; $i < $opt_loop_count; $i++) {
+
+ $random[$i] = ($i * 63857) % $opt_loop_count;
+
+ if (0 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khD";
+ } else { if (1 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khd";
+ } else { if (2 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kHd";
+ }}}
+
+ for ($j = 0; $j < (($i * 764877) % 10); $j++) {
+ $rnd_str[$i] = $rnd_str[$i]."k";
+ }
+}
+
+####
+#### Connect
+####
+
+$dbh = $server->connect()
+|| die $dbh->errstr;
+
+$dbh->do("set autocommit = 0");
+
+for ($i = 0; $i < 1; $i++) {
+ print "loop $i\n";
+
+ print "dropping table innotest2a\n";
+ $dbh->do("drop table innotest2a");
+
+ print "dropping table innotest2b\n";
+ $dbh->do("drop table innotest2b");
+
+ print "dropping table innotest2c\n";
+ $dbh->do("drop table innotest2c");
+
+ print "dropping table innotest2d\n";
+ $dbh->do("drop table innotest2d");
+
+ print "creating table innotest2b\n";
+ $dbh->do(
+ "create table innotest2b (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C)) TYPE = INNODB")
+ || die $dbh->errstr;
+
+ print "creating table innotest2a\n";
+
+ $dbh->do(
+ "create table innotest2a (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2b (A, D) ON DELETE CASCADE) TYPE = INNODB")
+ || die $dbh->errstr;
+
+ print "creating table innotest2c\n";
+
+ $dbh->do(
+ "create table innotest2c (A INT NOT NULL AUTO_INCREMENT, D INT NOT NULL, B VARCHAR(200) NOT NULL, C VARCHAR(175), PRIMARY KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (A, D) REFERENCES innotest2a (A, D) ON DELETE CASCADE, FOREIGN KEY (B, C) REFERENCES innotest2a (B, C) ON DELETE CASCADE) TYPE = INNODB")
+ || die $dbh->errstr;
+
+ print "creating table innotest2d\n";
+
+ $dbh->do(
+ "create table innotest2d (A INT AUTO_INCREMENT, D INT, B VARCHAR(200), C VARCHAR(175), UNIQUE KEY (A, D, B), INDEX (B, C), INDEX (C), FOREIGN KEY (C) REFERENCES innotest2c (C) ON DELETE SET NULL, FOREIGN KEY (B, C) REFERENCES innotest2c (B, C) ON DELETE SET NULL) TYPE = INNODB")
+ || die $dbh->errstr;
+ print "created\n";
+
+ for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) {
+ $dbh->do(
+ "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do(
+ "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do(
+ "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do(
+ "insert into innotest2d (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do("delete from innotest2b where A = ".$random[$random[$j]])
+ || print $dbh->errstr;
+
+ if (0 == ($j % 10)) {
+ $dbh->do("commit");
+ }
+
+ if (0 == ($j % 39)) {
+ $dbh->do("rollback");
+ }
+
+ if (0 == ($j % 1000)) {
+ print "round $j\n";
+ }
+ if (0 == ($j % 20000)) {
+ print "Checking tables...\n";
+ $dbh->do("check table innotest2a");
+ $dbh->do("check table innotest2b");
+ $dbh->do("check table innotest2c");
+ $dbh->do("check table innotest2d");
+ print "Tables checked.\n";
+ }
+ }
+
+ $dbh->do("commit");
+}
+
+$dbh->disconnect; # close connection
diff --git a/sql-bench/innotest2a.sh b/sql-bench/innotest2a.sh
index f77ed3ddadd..4a6e4b20a9a 100644
--- a/sql-bench/innotest2a.sh
+++ b/sql-bench/innotest2a.sh
@@ -1,94 +1,94 @@
-#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/Innobase combined database
-# (c) 2000 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl
+############################################################################
+# Stress test for MySQL/Innobase combined database
+# (c) 2000 Innobase Oy & MySQL AB
+#
+############################################################################
+
use Cwd;
-use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI;
+use Benchmark;
+
+$opt_loop_count = 100000;
+
$pwd = cwd(); $pwd = "." if ($pwd eq '');
-require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest2a: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
-print "------------------------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks with foreign keys with\n";
-print "the ON DELETE ... clause. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest2 > out2\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 63857) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khD";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kHd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 20); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect()
-|| die $dbh->errstr;
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 5; $i++) {
- print "loop $i\n";
-
- for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 1) {
-
- $dbh->do("update innotest2a set B = '".$rnd_str[$j + 1]."' where A = ".$random[$j + 5])
- || print $dbh->errstr;
-
- $dbh->do("delete from innotest2a where A = ".$random[$random[$j]])
- || print $dbh->errstr;
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 39)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
+
+print "Innotest2a: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
+print "------------------------------------------------------------\n";
+print "This is a randomized stress test for concurrent inserts,\n";
+print "updates, deletes, commits and rollbacks with foreign keys with\n";
+print "the ON DELETE ... clause. The test will generate\n";
+print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
+print "\n";
+print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
+print "The thing to watch is that the server does not crash or does not\n";
+print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
+print "warnings about MySQL lock reservations can appear in the .err log.\n";
+print "The test will run very long, even several hours. You can kill\n";
+print "the perl processes running this test at any time and do CHECK\n";
+print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
+print "\n";
+print "Some of these stress tests will print a lot of SQL errors\n";
+print "to the standard output. That is not to be worried about.\n";
+print "You can direct the output to a file like this:\n";
+print "perl innotest2 > out2\n\n";
+
+print "Generating random keys\n";
+$random[$opt_loop_count] = 0;
+$rnd_str[$opt_loop_count] = "a";
+
+for ($i = 0; $i < $opt_loop_count; $i++) {
+
+ $random[$i] = ($i * 63857) % $opt_loop_count;
+
+ if (0 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khD";
+ } else { if (1 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kHd";
+ } else { if (2 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khd";
+ }}}
+
+ for ($j = 0; $j < (($i * 764877) % 20); $j++) {
+ $rnd_str[$i] = $rnd_str[$i]."k";
+ }
+}
+
+####
+#### Connect
+####
+
+$dbh = $server->connect()
+|| die $dbh->errstr;
+
+$dbh->do("set autocommit = 0");
+
+for ($i = 0; $i < 5; $i++) {
+ print "loop $i\n";
+
+ for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 1) {
+
+ $dbh->do("update innotest2a set B = '".$rnd_str[$j + 1]."' where A = ".$random[$j + 5])
+ || print $dbh->errstr;
+
+ $dbh->do("delete from innotest2a where A = ".$random[$random[$j]])
+ || print $dbh->errstr;
+
+ if (0 == ($j % 10)) {
+ $dbh->do("commit");
+ }
+
+ if (0 == ($j % 39)) {
+ $dbh->do("rollback");
+ }
+
+ if (0 == ($j % 1000)) {
+ print "round $j\n";
+ }
+ }
+
+ $dbh->do("commit");
+}
+
+$dbh->disconnect; # close connection
diff --git a/sql-bench/innotest2b.sh b/sql-bench/innotest2b.sh
index 72a71d06c73..b94325ff39e 100644
--- a/sql-bench/innotest2b.sh
+++ b/sql-bench/innotest2b.sh
@@ -1,104 +1,104 @@
-#!/usr/bin/perl
-############################################################################
-# Stress test for MySQL/Innobase combined database
-# (c) 2000 Innobase Oy & MySQL AB
-#
-############################################################################
-
+#!/usr/bin/perl
+############################################################################
+# Stress test for MySQL/Innobase combined database
+# (c) 2000 Innobase Oy & MySQL AB
+#
+############################################################################
+
use Cwd;
-use DBI;
-use Benchmark;
-
-$opt_loop_count = 100000;
-
+use DBI;
+use Benchmark;
+
+$opt_loop_count = 100000;
+
$pwd = cwd(); $pwd = "." if ($pwd eq '');
-require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
-
-print "Innotest2b: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
-print "------------------------------------------------------------\n";
-print "This is a randomized stress test for concurrent inserts,\n";
-print "updates, deletes, commits and rollbacks with foreign keys with\n";
-print "the ON DELETE ... clause. The test will generate\n";
-print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
-print "\n";
-print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
-print "The thing to watch is that the server does not crash or does not\n";
-print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
-print "warnings about MySQL lock reservations can appear in the .err log.\n";
-print "The test will run very long, even several hours. You can kill\n";
-print "the perl processes running this test at any time and do CHECK\n";
-print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
-print "\n";
-print "Some of these stress tests will print a lot of SQL errors\n";
-print "to the standard output. That is not to be worried about.\n";
-print "You can direct the output to a file like this:\n";
-print "perl innotest2 > out2\n\n";
-
-print "Generating random keys\n";
-$random[$opt_loop_count] = 0;
-$rnd_str[$opt_loop_count] = "a";
-
-for ($i = 0; $i < $opt_loop_count; $i++) {
-
- $random[$i] = ($i * 98641) % $opt_loop_count;
-
- if (0 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khD";
- } else { if (1 == ($random[$i] % 3)) {
- $rnd_str[$i] = "khd";
- } else { if (2 == ($random[$i] % 3)) {
- $rnd_str[$i] = "kHd";
- }}}
-
- for ($j = 0; $j < (($i * 764877) % 10); $j++) {
- $rnd_str[$i] = $rnd_str[$i]."k";
- }
-}
-
-####
-#### Connect
-####
-
-$dbh = $server->connect();
-
-$dbh->do("set autocommit = 0");
-
-for ($i = 0; $i < 1; $i++) {
- print "loop $i\n";
-
- for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) {
- $dbh->do(
- "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do(
- "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
- || print $dbh->errstr;
-
- $dbh->do("delete from innotest2b where A = ".$random[$random[$j]])
- || print $dbh->errstr;
-
- $dbh->do("update innotest2b set A = A + 1 where A = ".$random[$j])
- || print $dbh->errstr;
-
- if (0 == ($j % 10)) {
- $dbh->do("commit");
- }
-
- if (0 == ($j % 39)) {
- $dbh->do("rollback");
- }
-
- if (0 == ($j % 1000)) {
- print "round $j\n";
- }
- }
-
- $dbh->do("commit");
-}
-
-$dbh->disconnect; # close connection
+require "$pwd/bench-init.pl" || die "Can't read Configuration file: $!\n";
+
+print "Innotest2b: MySQL/InnoDB stress test in Perl for FOREIGN keys\n";
+print "------------------------------------------------------------\n";
+print "This is a randomized stress test for concurrent inserts,\n";
+print "updates, deletes, commits and rollbacks with foreign keys with\n";
+print "the ON DELETE ... clause. The test will generate\n";
+print "also a lot of deadlocks, duplicate key errors, and other SQL errors.\n";
+print "\n";
+print "You should run innotest2, innotest2a, and innotest2b concurrently.\n";
+print "The thing to watch is that the server does not crash or does not\n";
+print "print to the .err log anything. Currently, due to a buglet in MySQL,\n";
+print "warnings about MySQL lock reservations can appear in the .err log.\n";
+print "The test will run very long, even several hours. You can kill\n";
+print "the perl processes running this test at any time and do CHECK\n";
+print "TABLE on tables innotest2a, b, c, d in the 'test' database.\n";
+print "\n";
+print "Some of these stress tests will print a lot of SQL errors\n";
+print "to the standard output. That is not to be worried about.\n";
+print "You can direct the output to a file like this:\n";
+print "perl innotest2 > out2\n\n";
+
+print "Generating random keys\n";
+$random[$opt_loop_count] = 0;
+$rnd_str[$opt_loop_count] = "a";
+
+for ($i = 0; $i < $opt_loop_count; $i++) {
+
+ $random[$i] = ($i * 98641) % $opt_loop_count;
+
+ if (0 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khD";
+ } else { if (1 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "khd";
+ } else { if (2 == ($random[$i] % 3)) {
+ $rnd_str[$i] = "kHd";
+ }}}
+
+ for ($j = 0; $j < (($i * 764877) % 10); $j++) {
+ $rnd_str[$i] = $rnd_str[$i]."k";
+ }
+}
+
+####
+#### Connect
+####
+
+$dbh = $server->connect();
+
+$dbh->do("set autocommit = 0");
+
+for ($i = 0; $i < 1; $i++) {
+ print "loop $i\n";
+
+ for ($j = 0; $j < $opt_loop_count - 10; $j = $j + 2) {
+ $dbh->do(
+ "insert into innotest2b (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do(
+ "insert into innotest2a (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do(
+ "insert into innotest2c (D, B, C) values (5, '".$rnd_str[$j]."' ,'".$rnd_str[$j]."')")
+ || print $dbh->errstr;
+
+ $dbh->do("delete from innotest2b where A = ".$random[$random[$j]])
+ || print $dbh->errstr;
+
+ $dbh->do("update innotest2b set A = A + 1 where A = ".$random[$j])
+ || print $dbh->errstr;
+
+ if (0 == ($j % 10)) {
+ $dbh->do("commit");
+ }
+
+ if (0 == ($j % 39)) {
+ $dbh->do("rollback");
+ }
+
+ if (0 == ($j % 1000)) {
+ print "round $j\n";
+ }
+ }
+
+ $dbh->do("commit");
+}
+
+$dbh->disconnect; # close connection
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 3ad48520dfb..6aef51a5c16 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -56,12 +56,14 @@ IF(UNIX)
IF(script MATCHES ".ini")
SET(comp IniFiles)
+ SET(permissions OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
ELSE()
SET(comp Server_Scripts)
+ SET(permissions OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
ENDIF()
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${script}
DESTINATION ${inst_location} COMPONENT ${comp}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ PERMISSIONS ${permissions})
ENDFOREACH()
IF(INSTALL_SUPPORTFILESDIR)
INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
diff --git a/support-files/config.huge.ini.sh b/support-files/config.huge.ini.sh
index f98074828a7..f98074828a7 100755..100644
--- a/support-files/config.huge.ini.sh
+++ b/support-files/config.huge.ini.sh
diff --git a/support-files/config.medium.ini.sh b/support-files/config.medium.ini.sh
index 1de7f64912e..1de7f64912e 100755..100644
--- a/support-files/config.medium.ini.sh
+++ b/support-files/config.medium.ini.sh
diff --git a/support-files/config.small.ini.sh b/support-files/config.small.ini.sh
index 0af60e5dc91..0af60e5dc91 100755..100644
--- a/support-files/config.small.ini.sh
+++ b/support-files/config.small.ini.sh