summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/stress/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/stress/t')
-rw-r--r--mysql-test/suite/stress/t/ddl_archive.test48
-rw-r--r--mysql-test/suite/stress/t/ddl_csv.test48
-rw-r--r--mysql-test/suite/stress/t/ddl_innodb.test47
-rw-r--r--mysql-test/suite/stress/t/ddl_memory.test45
-rw-r--r--mysql-test/suite/stress/t/ddl_myisam.test45
-rw-r--r--mysql-test/suite/stress/t/deadlock_drop_table.test37
-rw-r--r--mysql-test/suite/stress/t/misc.test32
-rw-r--r--mysql-test/suite/stress/t/wrapper.test29
8 files changed, 331 insertions, 0 deletions
diff --git a/mysql-test/suite/stress/t/ddl_archive.test b/mysql-test/suite/stress/t/ddl_archive.test
new file mode 100644
index 00000000..c688ae19
--- /dev/null
+++ b/mysql-test/suite/stress/t/ddl_archive.test
@@ -0,0 +1,48 @@
+######## t/ddl_archive.test ######
+#
+# Stress the storage engine ARCHIVE with CREATE/DROP TABLE/INDEX
+#
+# Please look for details within include/ddl1.inc.
+#
+# Creation of this test:
+# 2007-07-04 mleich
+#
+
+# Storage engine to be used in CREATE TABLE
+--source include/have_archive.inc
+let $engine_type= ARCHIVE;
+
+--source include/no_protocol.inc
+
+let $run= `SELECT '$BIG_TEST' = '1'`;
+if ($run)
+{
+ # A run started with "--big-test" should be allowed to consume more time.
+ # Rough intended runtime per subtest variant in seconds
+ let $runtime = 5;
+ # number of rounds till we look at the clock again
+ let $loop_size= 100;
+}
+if (!$run)
+{
+ let $runtime = 1;
+ let $loop_size= 20;
+}
+
+
+##### Some preparations needed for the ddl*.inc scripts
+--source suite/stress/include/ddl.pre
+
+# Tests set to comment fail because of CSV limitations
+# (limited number of keys, NULL within index not supported)
+# --source suite/stress/include/ddl1.inc
+--source suite/stress/include/ddl2.inc
+--source suite/stress/include/ddl3.inc
+# --source suite/stress/include/ddl4.inc
+--source suite/stress/include/ddl5.inc
+# --source suite/stress/include/ddl6.inc
+# --source suite/stress/include/ddl7.inc
+# --source suite/stress/include/ddl8.inc
+
+##### Cleanup
+--source suite/stress/include/ddl.cln
diff --git a/mysql-test/suite/stress/t/ddl_csv.test b/mysql-test/suite/stress/t/ddl_csv.test
new file mode 100644
index 00000000..3e0f8acb
--- /dev/null
+++ b/mysql-test/suite/stress/t/ddl_csv.test
@@ -0,0 +1,48 @@
+######## t/ddl_csv.test ######
+#
+# Stress the storage engine CSV with CREATE/DROP TABLE/INDEX
+#
+# Please look for details within include/ddl1.inc.
+#
+# Creation of this test:
+# 2007-07-04 mleich
+#
+
+# Storage engine to be used in CREATE TABLE
+--source include/have_csv.inc
+let $engine_type= CSV;
+
+--source include/no_protocol.inc
+
+let $run= `SELECT '$BIG_TEST' = '1'`;
+if ($run)
+{
+ # A run started with "--big-test" should be allowed to consume more time.
+ # Rough intended runtime per subtest variant in seconds
+ let $runtime = 5;
+ # number of rounds till we look at the clock again
+ let $loop_size= 100;
+}
+if (!$run)
+{
+ let $runtime = 1;
+ let $loop_size= 20;
+}
+
+
+##### Some preparations needed for the ddl*.inc scripts
+--source suite/stress/include/ddl.pre
+
+# Tests set to comment fail because of CSV limitations
+# (limited number of keys, AUTOINC not supported)
+# --source suite/stress/include/ddl1.inc
+--source suite/stress/include/ddl2.inc
+--source suite/stress/include/ddl3.inc
+# --source suite/stress/include/ddl4.inc
+# --source suite/stress/include/ddl5.inc
+# --source suite/stress/include/ddl6.inc
+# --source suite/stress/include/ddl7.inc
+# --source suite/stress/include/ddl8.inc
+
+##### Cleanup
+--source suite/stress/include/ddl.cln
diff --git a/mysql-test/suite/stress/t/ddl_innodb.test b/mysql-test/suite/stress/t/ddl_innodb.test
new file mode 100644
index 00000000..d5e23124
--- /dev/null
+++ b/mysql-test/suite/stress/t/ddl_innodb.test
@@ -0,0 +1,47 @@
+--source include/no_valgrind_without_big.inc
+######## t/ddl_innodb.test ######
+#
+# Stress the storage engine InnoDB with CREATE/DROP TABLE/INDEX
+#
+# Please look for details within include/ddl1.inc.
+#
+# Creation of this test:
+# 2007-07-04 mleich
+#
+
+# Storage engine to be used in CREATE TABLE
+--source include/have_innodb.inc
+let $engine_type= InnoDB;
+
+--source include/no_protocol.inc
+
+let $run= `SELECT '$BIG_TEST' = '1'`;
+if ($run)
+{
+ # A run started with "--big-test" should be allowed to consume more time.
+ # Rough intended runtime per subtest variant in seconds
+ let $runtime = 5;
+ # number of rounds till we look at the clock again
+ let $loop_size= 100;
+}
+if (!$run)
+{
+ let $runtime = 1;
+ let $loop_size= 20;
+}
+
+
+##### Some preparations needed for the ddl*.inc scripts
+--source suite/stress/include/ddl.pre
+
+--source suite/stress/include/ddl1.inc
+--source suite/stress/include/ddl2.inc
+--source suite/stress/include/ddl3.inc
+--source suite/stress/include/ddl4.inc
+--source suite/stress/include/ddl5.inc
+--source suite/stress/include/ddl6.inc
+--source suite/stress/include/ddl7.inc
+--source suite/stress/include/ddl8.inc
+
+##### Cleanup
+--source suite/stress/include/ddl.cln
diff --git a/mysql-test/suite/stress/t/ddl_memory.test b/mysql-test/suite/stress/t/ddl_memory.test
new file mode 100644
index 00000000..bcca77a7
--- /dev/null
+++ b/mysql-test/suite/stress/t/ddl_memory.test
@@ -0,0 +1,45 @@
+######## t/ddl_memory.test ######
+#
+# Stress the storage engine MEMORY with CREATE/DROP TABLE/INDEX
+#
+# Please look for details within include/ddl1.inc.
+#
+# Creation of this test:
+# 2007-07-04 mleich
+#
+
+# Storage engine to be used in CREATE TABLE
+let $engine_type= MEMORY;
+
+--source include/no_protocol.inc
+
+let $run= `SELECT '$BIG_TEST' = '1'`;
+if ($run)
+{
+ # A run started with "--big-test" should be allowed to consume more time.
+ # Rough intended runtime per subtest variant in seconds
+ let $runtime = 5;
+ # number of rounds till we look at the clock again
+ let $loop_size= 100;
+}
+if (!$run)
+{
+ let $runtime = 1;
+ let $loop_size= 20;
+}
+
+
+##### Some preparations needed for the ddl*.inc scripts
+--source suite/stress/include/ddl.pre
+
+--source suite/stress/include/ddl1.inc
+--source suite/stress/include/ddl2.inc
+--source suite/stress/include/ddl3.inc
+--source suite/stress/include/ddl4.inc
+--source suite/stress/include/ddl5.inc
+--source suite/stress/include/ddl6.inc
+--source suite/stress/include/ddl7.inc
+--source suite/stress/include/ddl8.inc
+
+##### Cleanup
+--source suite/stress/include/ddl.cln
diff --git a/mysql-test/suite/stress/t/ddl_myisam.test b/mysql-test/suite/stress/t/ddl_myisam.test
new file mode 100644
index 00000000..a9b14690
--- /dev/null
+++ b/mysql-test/suite/stress/t/ddl_myisam.test
@@ -0,0 +1,45 @@
+######## t/ddl_myisam.test ######
+#
+# Stress the storage engine MyISAM with CREATE/DROP TABLE/INDEX
+#
+# Please look for details within include/ddl1.inc.
+#
+# Creation of this test:
+# 2007-07-04 mleich
+#
+
+# Storage engine to be used in CREATE TABLE
+let $engine_type= MyISAM;
+
+--source include/no_protocol.inc
+
+let $run= `SELECT '$BIG_TEST' = '1'`;
+if ($run)
+{
+ # A run started with "--big-test" should be allowed to consume more time.
+ # Rough intended runtime per subtest variant in seconds
+ let $runtime = 5;
+ # number of rounds till we look at the clock again
+ let $loop_size= 100;
+}
+if (!$run)
+{
+ let $runtime = 1;
+ let $loop_size= 20;
+}
+
+
+##### Some preparations needed for the ddl*.inc scripts
+--source suite/stress/include/ddl.pre
+
+--source suite/stress/include/ddl1.inc
+--source suite/stress/include/ddl2.inc
+--source suite/stress/include/ddl3.inc
+--source suite/stress/include/ddl4.inc
+--source suite/stress/include/ddl5.inc
+--source suite/stress/include/ddl6.inc
+--source suite/stress/include/ddl7.inc
+--source suite/stress/include/ddl8.inc
+
+##### Cleanup
+--source suite/stress/include/ddl.cln
diff --git a/mysql-test/suite/stress/t/deadlock_drop_table.test b/mysql-test/suite/stress/t/deadlock_drop_table.test
new file mode 100644
index 00000000..b4f8f220
--- /dev/null
+++ b/mysql-test/suite/stress/t/deadlock_drop_table.test
@@ -0,0 +1,37 @@
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+create or replace table t1 (a int primary key, b int, c int, key(b),key(c)) engine=myisam;
+insert into t1 (a) values(1);
+
+set debug_sync='RESET';
+connect (con1, localhost, root,,);
+connect (con2, localhost, root,,);
+connection default;
+
+backup stage start;
+backup stage flush;
+select * from t1;
+set debug_sync='after_purge_tables SIGNAL parked WAIT_FOR go';
+set debug_sync='before_tc_release_table SIGNAL parked2 WAIT_FOR go2';
+--send backup stage BLOCK_DDL
+--connection con1
+set debug_sync='now WAIT_FOR parked';
+select * from t1;
+set debug_sync='now SIGNAL go';
+set debug_sync='now WAIT_FOR parked2';
+set debug_sync='before_wait_for_refs SIGNAL waiting WAIT_FOR go3';
+--send drop table t1;
+--connection con2
+set debug_sync='now WAIT_FOR waiting';
+set debug_sync='now SIGNAL go2';
+set debug_sync='now SIGNAL go3';
+
+--connection default
+--reap
+--connection con1
+--reap
+connection default;
+disconnect con1;
+disconnect con2;
+set debug_sync='RESET';
diff --git a/mysql-test/suite/stress/t/misc.test b/mysql-test/suite/stress/t/misc.test
new file mode 100644
index 00000000..e8255cb3
--- /dev/null
+++ b/mysql-test/suite/stress/t/misc.test
@@ -0,0 +1,32 @@
+--echo #
+--echo # MDEV-22339 - Assertion `str_length < len' failed in
+--echo # Binary_string::realloc_raw
+--echo #
+CREATE TABLE t1(a INT) ENGINE=MyISAM;
+connect con1, localhost, root;
+let $i=1000;
+disable_query_log;
+disable_result_log;
+while ($i)
+{
+ connection default;
+ HANDLER t1 OPEN;
+ send SELECT * FROM t1, t1 t1a1over8, t1 t1a2over8, t1 t1a3over8, t1 t1a4over8, t1 t1a5over8, t1 t1a6over8;
+
+ connection con1;
+ send REPAIR TABLE t1;
+
+ connection default;
+ reap;
+ HANDLER t1 CLOSE;
+
+ connection con1;
+ reap;
+ dec $i;
+}
+enable_query_log;
+enable_result_log;
+disconnect con1;
+
+connection default;
+DROP TABLE t1;
diff --git a/mysql-test/suite/stress/t/wrapper.test b/mysql-test/suite/stress/t/wrapper.test
new file mode 100644
index 00000000..7a468985
--- /dev/null
+++ b/mysql-test/suite/stress/t/wrapper.test
@@ -0,0 +1,29 @@
+#
+# This is a wrapper "pseudo" test for mtr --stress execution.
+# It should not be run directly (will be skipped)
+# Do not create a result file!
+#
+
+if (!$MST_OPTIONS) {
+ skip Only to be run with mtr --stress;
+}
+
+# echo Running MST with options $MST_OPTIONS;
+
+perl;
+ my ($mtest)= split " ", $ENV{MYSQL_TEST};
+ open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mtest.inc") or die;
+ print FILE "let \$MYSQLTEST_BIN= $mtest;\n";
+ close FILE;
+EOF
+
+--source $MYSQL_TMP_DIR/mtest.inc
+--remove_file $MYSQL_TMP_DIR/mtest.inc
+
+exec perl mariadb-stress-test.pl --mysqltest=$MYSQLTEST_BIN
+ --server-port=$MASTER_MYPORT --server-socket=$MASTER_MYSOCK
+ --server-user=root --cleanup
+ --server-logs-dir=$MYSQLTEST_VARDIR/log
+ --stress-basedir=$MYSQLTEST_VARDIR
+ $MST_OPTIONS
+;