Commit 60b78f9f authored by kent@kent-amd64.(none)'s avatar kent@kent-amd64.(none)

Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1

into  mysql.com:/home/kent/bk/tmp3/mysql-5.1-build
parents 27f11688 00ab6d84
...@@ -58,7 +58,8 @@ tags: ...@@ -58,7 +58,8 @@ tags:
test test-force test-full test-force-full test-force-mem \ test test-force test-full test-force-full test-force-mem \
test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \ test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
test-unit test-ps test-nr test-pr test-ns test-binlog-statement \ test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
test-ext-funcs test-ext-rpl test-ext-partitions test-ext \ test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
test-ext-stress test-ext \
test-fast test-fast-cursor test-fast-view test-fast-prepare \ test-fast test-fast-cursor test-fast-view test-fast-prepare \
test-full-qa test-full-qa
...@@ -144,6 +145,8 @@ test-bt: ...@@ -144,6 +145,8 @@ test-bt:
cd mysql-test ; MTR_BUILD_THREAD=auto \ cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \ @PERL@ ./mysql-test-run.pl --comment=NIST+ps --force --suite=nist --ps-protocol ; \
fi fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
# Re-enable the "rowlock" suite when bug#28685 is fixed # Re-enable the "rowlock" suite when bug#28685 is fixed
# -cd mysql-test ; MTR_BUILD_THREAD=auto \ # -cd mysql-test ; MTR_BUILD_THREAD=auto \
...@@ -182,12 +185,17 @@ test-ext-jp: ...@@ -182,12 +185,17 @@ test-ext-jp:
cd mysql-test ; \ cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=jp @PERL@ ./mysql-test-run.pl --force --suite=jp
test-ext: test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --big-test --suite=stress
test-ext: test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress
test-fast: test-fast:
cd mysql-test ; \ cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \ @PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam @PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam
test-fast-view: test-fast-view:
$(MAKE) subset=--view-protocol test-fast $(MAKE) subset=--view-protocol test-fast
......
...@@ -33,7 +33,7 @@ noinst_HEADERS = config-win.h config-netware.h \ ...@@ -33,7 +33,7 @@ noinst_HEADERS = config-win.h config-netware.h \
mysys_err.h my_base.h help_start.h help_end.h \ mysys_err.h my_base.h help_start.h help_end.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \ my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h md5.h base64.h \ thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
mysql_version.h.in my_handler.h my_time.h \ mysql_version.h.in my_handler.h my_time.h \
my_vle.h my_user.h my_atomic.h atomic/nolock.h \ my_vle.h my_user.h my_atomic.h atomic/nolock.h \
atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h \ atomic/rwlock.h atomic/x86-gcc.h atomic/x86-msvc.h \
......
...@@ -26,7 +26,7 @@ EXTRA_SCRIPTS = mysql-test-run-shell.sh install_test_db.sh \ ...@@ -26,7 +26,7 @@ EXTRA_SCRIPTS = mysql-test-run-shell.sh install_test_db.sh \
valgrind.supp $(PRESCRIPTS) valgrind.supp $(PRESCRIPTS)
EXTRA_DIST = $(EXTRA_SCRIPTS) suite EXTRA_DIST = $(EXTRA_SCRIPTS) suite
GENSCRIPTS = mysql-test-run-shell install_test_db mtr mysql-test-run GENSCRIPTS = mysql-test-run-shell install_test_db mtr mysql-test-run
PRESCRIPTS = mysql-test-run.pl PRESCRIPTS = mysql-test-run.pl mysql-stress-test.pl
test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS) test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS)
test_DATA = std_data/client-key.pem std_data/client-cert.pem \ test_DATA = std_data/client-key.pem std_data/client-cert.pem \
std_data/cacert.pem std_data/server-cert.pem \ std_data/cacert.pem std_data/server-cert.pem \
......
...@@ -13,7 +13,8 @@ TimeBetweenGlobalCheckpoints= 500 ...@@ -13,7 +13,8 @@ TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles= 4 NoOfFragmentLogFiles= 4
FragmentLogFileSize=12M FragmentLogFileSize=12M
DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory
ODirect= 1 # O_DIRECT has issues on 2.4 whach have not been handled, Bug #29612
#ODirect= 1
# the following parametes just function as a small regression # the following parametes just function as a small regression
# test that the parameter exists # test that the parameter exists
InitialNoOfOpenFiles= 27 InitialNoOfOpenFiles= 27
......
######## include/ddl.cln ########
disconnect con2;
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
######## include/ddl.pre ########
# The variable
# $runtime -- rough intended runtime per subtest variant
# must be set within the routine sourcing this script.
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-11 mleich
#
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
--replace_result $runtime <intended_runtime>
eval SET @runtime = $runtime;
eval PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
connect (con2,localhost,root,,);
connection default;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
######## include/ddl1.inc ######
#
# Purpose of include/ddl1.inc - include/ddl8.inc:
#
# Stress storage engines with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# Real runtime without server restarts and comparison is:
# - >= $runtime
# - > runtime needed for $loop_size execution loops
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Attention:
# The test does suppress the writing of most statements, server error
# messages and result sets.
# This is needed because their number is usual not deterministic.
# The test is partially self checking. That means is prints some
# helpful hints into the protocol and aborts if something is wrong.
#
# Creation of this test:
# 2007-07-04 mleich
#
############################################################################
#
# Some details:
#
# 1. Base question of the test:
# There was just a create or drop of some object (TABLE/INDEX).
#
# Could it happen that the next statement referring to this
# object gets a somehow wrong server response (result set,
# error message, warning) because the creation or removal of
# the object is in an incomplete state?
#
# Thinkable reasons for incomplete state of creation or removal:
# The server performs the creation or removal
# - all time incomplete.
# Example:
# Bug#28309 First insert violates unique constraint
# - was "memory" table empty ?
# - asynchronous
# In that case the next statement has probably to wait till
# completion.
#
# 2. Why do we use in some scripts "--error 0,<expected error>" followed
# a check of $mysql_errno?
#
# System reactions when running with "--error 0,<expected error>":
# - RC=0 --> no error message
# - RC=<expected error> --> no error message
# - RC not in (0,<expected error>) --> error message + abort of script
# execution
#
# Requirements and tricky solution for statements which are expected
# to fail:
# 1. RC=<expected error>
# - no abort of script execution
# --> add "--error <expected error>"
# - no error message into the protocol, because the number of
# executions is NOT deterministic
# --> use "--error 0,<expected error>"
# 2. RC=0 = failure
# - abort of script execution
# "--error 0,<expected error>" prevents the automatic abort of
# execution. Therefore we do not need to code the abort.
# --> Check $mysql_errno and do an explicit abort if $mysql_errno = 0.
# 3. RC not in (0,<expected error>)
# - abort of script execution
# "--error 0,<expected error>" causes an automatic abort.
#
# 3. We do not check the correctness of the SHOW CREATE TABLE output
# in detail. This must be done within other tests.
# We only check here that
# - same CREATE TABLE/INDEX statements lead to the same
# - different CREATE TABLE/INDEX statements lead to different
# SHOW CREATE TABLE output
# (Applies to ddl4.inc. and ddl8.inc.)
#
# 4. It could be assumed that running this test with
# - PS-PROTOCOL
# There are already subtests using prepared statements contained.
# - SP/CURSOR/VIEW-PROTOCOL
# These protocol variants transform SELECTs to hopefully much
# stressing statement sequencies using SP/CURSOR/VIEW.
# The SELECTs within include/ddl*.inc are very simple.
# does not increase the coverage.
# Therefore we skip runs with these protocols.
#
# 5. The test consumes significant runtime when running on a non RAM
# based filesystem (run without "--mem").
# Therefore we adjust $runtime and $loop_size depending on "--big-test"
# option.
# $runtime and $loop_size do not influence the expected results.
# Rough runtime in seconds reported by mysql-test-run.pl:
# (engine_type = MEMORY)
# option set -> $runtime $loop_size real runtime in seconds
# 1 20 68
# --mem 1 20 32
# --big-test 5 100 200
# --mem --big-test 5 100 400
# I assume that runs with slow filesystems are as much valuable
# as runs with extreme fast filesystems.
#
# 6. Hints for analysis of test failures:
# 1. Look into the protocol and check in which ddl*.inc
# script the difference to the expected result occured.
# 2. Comment the sourcing of all other ddl*.inc scripts
# out.
# 3. Edit the ddl*.inc script where the error occured and
# remove all
# - "--disable_query_log", "--disable_result_log"
# - successful passed subtests.
# 4. Alternative:
# Have a look into VARDIR/master-data/mysql/general_log.CSV
# and construct a new testcase from that.
# 5. If the problem is not deterministic, please try the following
# - increase $runtime (important), $loop_size (most probably
# less important) within the "t/ddl_<engine>.test" and
# maybe the "--testcase-timeout" assigned to mysqltest-run.pl
# - vary the I/O performance of the testing machine by using
# a RAM or disk based filesystem for VARDIR
#
#----------------------------------------------------------------------
# Settings for Subtest 1 variants
# Scenario: CREATE with UNIQUE KEY/INSERT/DROP TABLE like in Bug#28309
let $create_table= CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = $engine_type;
let $insert_into= INSERT INTO t1 VALUES (1,1), (2,2), (3,3);
let $drop_table= DROP TABLE t1;
#----------------------------------------------------------------------
#
--echo # Subtest 1A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $insert_into
--echo # default: $drop_table
--disable_query_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
eval $insert_into;
eval $drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_query_log
#
--echo # Subtest 1B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $insert_into
--echo # default: $drop_table
--disable_query_log
connection default;
eval PREPARE create_table FROM "$create_table";
EXECUTE create_table;
eval PREPARE insert_into FROM "$insert_into";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
EXECUTE insert_into;
EXECUTE drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE insert_into;
DEALLOCATE PREPARE drop_table;
--enable_query_log
#
--echo # Subtest 1C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $insert_into
--echo # con2: $drop_table
--disable_query_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
connection con2;
eval $insert_into;
eval $drop_table;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_query_log
#
--echo # Subtest 1D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $insert_into
--echo # con2: $drop_table
--disable_query_log
connection default;
eval PREPARE create_table FROM "$create_table";
EXECUTE create_table;
connection con2;
eval PREPARE insert_into FROM "$insert_into";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
connection con2;
EXECUTE insert_into;
EXECUTE drop_table;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
connection con2;
DEALLOCATE PREPARE insert_into;
DEALLOCATE PREPARE drop_table;
connection default;
--enable_query_log
######## include/ddl2.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 2 variants (2A - 2D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 2 variants
# Scenario: CREATE TABLE AS SELECT/SELECT/DROP/SELECT(F)
let $create_table= CREATE TABLE t1 ENGINE = $engine_type AS SELECT 1 AS f1;
let $select_record= SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1;
let $drop_table= DROP TABLE t1;
#----------------------------------------------------------------------
#
--echo # Subtest 2A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $select_record
--echo # default: $drop_table
--echo # default: $select_record (expect to get ER_NO_SUCH_TABLE)
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
if (`$select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
eval $select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
eval $drop_table;
--error 0,ER_NO_SUCH_TABLE
eval $select_record;
if (!$mysql_errno)
{
--echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE
--echo # abort
exit;
}
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 2B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $select_record
--echo # default: $drop_table
--echo # default: $select_record (expect to get ER_NO_SUCH_TABLE)
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_table FROM "$create_table";
EXECUTE create_table;
eval PREPARE select_record FROM "$select_record";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
if (`EXECUTE select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
EXECUTE select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
EXECUTE drop_table;
--error 0,ER_NO_SUCH_TABLE
EXECUTE select_record;
if (!$mysql_errno)
{
--echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE
--echo # abort
exit;
}
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE select_record;
DEALLOCATE PREPARE drop_table;
--enable_result_log
--enable_query_log
#
--echo # Subtest 2C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $select_record
--echo # default: $drop_table
--echo # con2: $select_record (expect to get ER_NO_SUCH_TABLE)
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
connection con2;
if (`$select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
eval $select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
connection default;
eval $drop_table;
connection con2;
--error 0,ER_NO_SUCH_TABLE
eval $select_record;
if (!$mysql_errno)
{
--echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE
--echo # abort
exit;
}
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 2D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $select_record
--echo # default: $drop_table
--echo # con2: $select_record (expect to get ER_NO_SUCH_TABLE)
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_table FROM "$create_table";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE create_table;
connection con2;
eval PREPARE select_record FROM "$select_record";
connection default;
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
connection con2;
if (`EXECUTE select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
EXECUTE select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
connection default;
EXECUTE drop_table;
connection con2;
--error 0,ER_NO_SUCH_TABLE
EXECUTE select_record;
if (!$mysql_errno)
{
--echo # Error: SELECT was successful though we expected ER_NO_SUCH_TABLE
--echo # abort
exit;
}
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE drop_table;
connection con2;
DEALLOCATE PREPARE select_record;
connection default;
--enable_result_log
--enable_query_log
######## include/ddl3.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 3 variants (3A - 3D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl2.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 3 variants
# Scenario: CREATE TABLE/CREATE TABLE(F)/DROP TABLE/DROP TABLE(F)
let $create_table= CREATE TABLE t1 (f1 BIGINT) ENGINE=$engine_type;
let $drop_table= DROP TABLE t1;
#----------------------------------------------------------------------
#
--echo # Subtest 3A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $create_table (expect to get ER_TABLE_EXISTS_ERROR)
--echo # default: $drop_table
--echo # default: $drop_table (expect to get ER_BAD_TABLE_ERROR)
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
--error 0,ER_TABLE_EXISTS_ERROR
eval $create_table;
if (!$mysql_errno)
{
--echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR
--echo # abort
exit;
}
eval $drop_table;
--error 0,ER_BAD_TABLE_ERROR
eval $drop_table;
if (!$mysql_errno)
{
--echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR)
--echo # abort
exit;
}
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 3B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $create_table (expect to get ER_TABLE_EXISTS_ERROR)
--echo # default: $drop_table
--echo # default: $drop_table (expect to get ER_BAD_TABLE_ERROR)
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_table FROM "$create_table";
EXECUTE create_table;
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
--error 0,ER_TABLE_EXISTS_ERROR
EXECUTE create_table;
if (!$mysql_errno)
{
--echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR
--echo # abort
exit;
}
EXECUTE drop_table;
--error 0,ER_BAD_TABLE_ERROR
EXECUTE drop_table;
if (!$mysql_errno)
{
--echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR)
--echo # abort
exit;
}
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE drop_table;
--enable_result_log
--enable_query_log
#
--echo # Subtest 3C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $create_table (expect to get ER_TABLE_EXISTS_ERROR)
--echo # default: $drop_table
--echo # con2: $drop_table (expect to get ER_BAD_TABLE_ERROR)
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
connection con2;
--error 0,ER_TABLE_EXISTS_ERROR
eval $create_table;
if (!$mysql_errno)
{
--echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR
--echo # abort
exit;
}
connection default;
eval $drop_table;
connection con2;
--error 0,ER_BAD_TABLE_ERROR
eval $drop_table;
if (!$mysql_errno)
{
--echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR)
--echo # abort
exit;
}
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 3D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $create_table (expect to get ER_TABLE_EXISTS_ERROR)
--echo # default: $drop_table
--echo # con2: $drop_table (expect to get ER_BAD_TABLE_ERROR)
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_table FROM "$create_table";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE create_table;
connection con2;
eval PREPARE create_table FROM "$create_table";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
connection con2;
--error 0,ER_TABLE_EXISTS_ERROR
EXECUTE create_table;
if (!$mysql_errno)
{
--echo # Error: CREATE TABLE was successful though we expected ER_TABLE_EXISTS_ERROR
--echo # abort
exit;
}
connection default;
EXECUTE drop_table;
connection con2;
--error 0,ER_BAD_TABLE_ERROR
EXECUTE drop_table;
if (!$mysql_errno)
{
--echo # Error: DROP TABLE was successful though we expected ER_BAD_TABLE_ERROR)
--echo # abort
exit;
}
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE drop_table;
connection con2;
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE drop_table;
connection default;
--enable_result_log
--enable_query_log
######## include/ddl4.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 4 variants (4A - 4D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 4 variants
# Scenario: CREATE TABLE variant1/SHOW/DROP TABLE/SHOW(F)/
# CREATE TABLE variant2/SHOW/DROP TABLE
let $create_table1= CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=$engine_type;
let $create_table2= CREATE TABLE t1 (f1 BIGINT) ENGINE=$engine_type;
let $show_table= SHOW CREATE TABLE t1;
let $drop_table= DROP TABLE t1;
#
eval $create_table1;
let $cr_value1= INITIALIZED;
let $cr_value1= query_get_value($show_table, Create Table, 1);
eval $drop_table;
eval $create_table2;
let $cr_value2= INITIALIZED;
let $cr_value2= query_get_value($show_table, Create Table, 1);
eval $drop_table;
if (`SELECT '$cr_value1' = '$cr_value2'`)
{
--echo # Error during generation of prerequisites.
--echo # cr_value1 equals cr_value2
--echo # cr_value1: $cr_value1
--echo # cr_value2: $cr_value2
--echo # abort
exit;
}
#----------------------------------------------------------------------
#
--echo # Subtest 4A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table1
--echo # default: $show_table
--echo # default: $drop_table
--echo # default: $show_table (expect to get ER_NO_SUCH_TABLE)
--echo # default: $create_table2
--echo # default: $show_table
--echo # default: $drop_table
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table1;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
eval $drop_table;
--error 0,ER_NO_SUCH_TABLE
eval $show_table;
if (!$mysql_errno)
{
--echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE)
--echo # abort
exit;
}
eval $create_table2;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
eval $drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 4B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table1
--echo # default: $show_table
--echo # default: $drop_table
--echo # default: $show_table (expect to get ER_NO_SUCH_TABLE)
--echo # default: $create_table2
--echo # default: $show_table
--echo # default: $drop_table
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_table1 FROM "$create_table1";
eval PREPARE create_table2 FROM "$create_table2";
EXECUTE create_table1;
eval PREPARE show_table FROM "$show_table";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table1;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
EXECUTE drop_table;
--error 0,ER_NO_SUCH_TABLE
EXECUTE show_table;
if (!$mysql_errno)
{
--echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE)
--echo # abort
exit;
}
EXECUTE create_table2;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
EXECUTE drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table1;
DEALLOCATE PREPARE create_table2;
DEALLOCATE PREPARE show_table;
DEALLOCATE PREPARE drop_table;
--enable_result_log
--enable_query_log
#
--echo # Subtest 4C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table1
--echo # con2: $show_table
--echo # default: $drop_table
--echo # con2: $show_table (expect to get ER_NO_SUCH_TABLE)
--echo # default: $create_table2
--echo # con2: $show_table
--echo # default: $drop_table
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table1;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
connection default;
eval $drop_table;
connection con2;
--error 0,ER_NO_SUCH_TABLE
eval $show_table;
if (!$mysql_errno)
{
--echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE)
--echo # abort
exit;
}
connection default;
eval $create_table2;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
connection default;
eval $drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 4D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table1
--echo # con2: $show_table
--echo # default: $drop_table
--echo # con2: $show_table (expect to get ER_NO_SUCH_TABLE)
--echo # default: $create_table2
--echo # con2: $show_table
--echo # default: $drop_table
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_table1 FROM "$create_table1";
eval PREPARE create_table2 FROM "$create_table2";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE create_table1;
connection con2;
eval PREPARE show_table FROM "$show_table";
connection default;
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table1;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
connection default;
EXECUTE drop_table;
connection con2;
--error 0,ER_NO_SUCH_TABLE
EXECUTE show_table;
if (!$mysql_errno)
{
--echo # Error: SHOW CREATE TABLE was successful though we expected ER_NO_SUCH_TABLE)
--echo # abort
exit;
}
connection default;
EXECUTE create_table2;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
connection default;
EXECUTE drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table1;
DEALLOCATE PREPARE create_table2;
DEALLOCATE PREPARE drop_table;
connection con2;
DEALLOCATE PREPARE show_table;
connection default;
--enable_result_log
--enable_query_log
######## include/ddl5.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 5 variants (5A - 5D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 5 variants
# Scenario: CREATE TABLE with AUTOINC/INSERT/SELECT/DROP TABLE
let $create_table= CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = $engine_type;
let $insert_into= INSERT INTO t1 SET f2 = 9;
let $select_record= SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9;
let $drop_table= DROP TABLE t1;
#----------------------------------------------------------------------
#
--echo # Subtest 5A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $insert_into
--echo # default: $select_record
--echo # default: $drop_table
--disable_query_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
eval $insert_into;
if (`$select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
eval $select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
eval $drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_query_log
#
--echo # Subtest 5B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # default: $insert_into
--echo # default: $select_record
--echo # default: $drop_table
--disable_query_log
connection default;
eval PREPARE create_table FROM "$create_table";
EXECUTE create_table;
eval PREPARE insert_into FROM "$insert_into";
eval PREPARE select_record FROM "$select_record";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
EXECUTE insert_into;
if (`EXECUTE select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
EXECUTE select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
EXECUTE drop_table;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE insert_into;
DEALLOCATE PREPARE select_record;
DEALLOCATE PREPARE drop_table;
--enable_query_log
#
--echo # Subtest 5C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $insert_into
--echo # default: $select_record
--echo # con2: $drop_table
--disable_query_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_table;
connection con2;
eval $insert_into;
connection default;
if (`$select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
eval $select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
connection con2;
eval $drop_table;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_query_log
#
--echo # Subtest 5D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_table
--echo # con2: $insert_into
--echo # default: $select_record
--echo # con2: $drop_table
--disable_query_log
connection default;
eval PREPARE create_table FROM "$create_table";
EXECUTE create_table;
eval PREPARE select_record FROM "$select_record";
connection con2;
eval PREPARE insert_into FROM "$insert_into";
eval PREPARE drop_table FROM "$drop_table";
EXECUTE drop_table;
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_table;
connection con2;
EXECUTE insert_into;
connection default;
if (`EXECUTE select_record`)
{
--enable_result_log
--enable_query_log
--echo # Error: Unexpected content within t1.
--echo # Expected: 0
--echo # Got:
EXECUTE select_record;
SELECT * FROM t1;
--echo # abort
exit;
}
connection con2;
EXECUTE drop_table;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_table;
DEALLOCATE PREPARE select_record;
connection con2;
DEALLOCATE PREPARE insert_into;
DEALLOCATE PREPARE drop_table;
connection default;
--enable_query_log
######## include/ddl6.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 6 variants (6A - 6D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 6 variants
# Scenario: CREATE INDEX/CREATE INDEX(F)/DROP INDEX/DROP INDEX(F)
let $create_index= CREATE INDEX IDX1 ON t1 (f2);
let $drop_index= DROP INDEX IDX1 ON t1;
eval CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=$engine_type;
#----------------------------------------------------------------------
#
--echo # Subtest 6A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # default: $create_index (expect to get ER_DUP_KEYNAME)
--echo # default: $drop_index
--echo # default: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY)
--echo # default: $create_index
--echo # default: $drop_index
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_index;
--error 0,ER_DUP_KEYNAME
eval $create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME
--echo # abort
exit;
}
eval $drop_index;
--error 0,ER_CANT_DROP_FIELD_OR_KEY
eval $drop_index;
if (!$mysql_errno)
{
--echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY
--echo # abort
exit;
}
eval $create_index;
eval $drop_index;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 6B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # default: $create_index (expect to get ER_DUP_KEYNAME)
--echo # default: $drop_index
--echo # default: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY)
--echo # default: $create_index
--echo # default: $drop_index
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_index FROM "$create_index";
EXECUTE create_index;
eval PREPARE drop_index FROM "$drop_index";
EXECUTE drop_index;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_index;
--error 0,ER_DUP_KEYNAME
EXECUTE create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME
--echo # abort
exit;
}
EXECUTE drop_index;
--error 0,ER_CANT_DROP_FIELD_OR_KEY
EXECUTE drop_index;
if (!$mysql_errno)
{
--echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY
--echo # abort
exit;
}
EXECUTE create_index;
EXECUTE drop_index;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_index;
DEALLOCATE PREPARE drop_index;
--enable_result_log
--enable_query_log
#
--echo # Subtest 6C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # con2: $create_index (expect to get ER_DUP_KEYNAME)
--echo # default: $drop_index
--echo # con2: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY)
--echo # default: $create_index
--echo # con2: $drop_index
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_index;
connection con2;
--error 0,ER_DUP_KEYNAME
eval $create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME
--echo # abort
exit;
}
connection default;
eval $drop_index;
connection con2;
--error 0,ER_CANT_DROP_FIELD_OR_KEY
eval $drop_index;
if (!$mysql_errno)
{
--echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY
--echo # abort
exit;
}
connection default;
eval $create_index;
connection con2;
eval $drop_index;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 6D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # con2: $create_index (expect to get ER_DUP_KEYNAME)
--echo # default: $drop_index
--echo # con2: $drop_index (expect to get ER_CANT_DROP_FIELD_OR_KEY)
--echo # default: $create_index
--echo # con2: $drop_index
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_index FROM "$create_index";
eval PREPARE drop_index FROM "$drop_index";
EXECUTE create_index;
connection con2;
eval PREPARE create_index FROM "$create_index";
eval PREPARE drop_index FROM "$drop_index";
EXECUTE drop_index;
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_index;
connection con2;
--error 0,ER_DUP_KEYNAME
EXECUTE create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_KEYNAME
--echo # abort
exit;
}
connection default;
EXECUTE drop_index;
connection con2;
--error 0,ER_CANT_DROP_FIELD_OR_KEY
EXECUTE drop_index;
if (!$mysql_errno)
{
--echo # Error: DROP INDEX was successful though we expected ER_CANT_DROP_FIELD_OR_KEY
--echo # abort
exit;
}
connection default;
EXECUTE create_index;
connection con2;
EXECUTE drop_index;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_index;
DEALLOCATE PREPARE drop_index;
connection con2;
DEALLOCATE PREPARE create_index;
DEALLOCATE PREPARE drop_index;
connection default;
--enable_result_log
--enable_query_log
DROP TABLE t1;
######## include/ddl7.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 7 variants (7A - 7D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 7 variants
# Scenario: CREATE INDEX/INSERT(F)/DROP INDEX/INSERT/CREATE INDEX(F)/DELETE
let $create_index= CREATE UNIQUE INDEX IDX1 ON t1 (f2);
let $insert_record= INSERT INTO t1 VALUES(1,1);
let $drop_index= DROP INDEX IDX1 ON t1;
let $delete_record= DELETE FROM t1 WHERE f1 = 1;
eval CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=$engine_type;
INSERT INTO t1 VALUES(0,1);
#----------------------------------------------------------------------
#
--echo # Subtest 7A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # default: $insert_record (expect to get ER_DUP_ENTRY)
--echo # default: $drop_index
--echo # default: $insert_record
--echo # default: $create_index (expect to get ER_DUP_ENTRY)
--echo # default: $delete_record
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
let $counter= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_index;
--error 0,ER_DUP_ENTRY
eval $insert_record;
if (!$mysql_errno)
{
--echo # Error: INSERT was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
eval $drop_index;
eval $insert_record;
# NDB: ER_DUP_UNIQUE, others: ER_DUP_ENTRY
--error 0,ER_DUP_ENTRY,ER_DUP_UNIQUE
eval $create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY
--echo # Error: or ER_DUP_UNIQUE (NDB only)
--echo # abort
exit;
}
eval $delete_record;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 7B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # default: $insert_record (expect to get ER_DUP_ENTRY)
--echo # default: $drop_index
--echo # default: $insert_record
--echo # default: $create_index (expect to get ER_DUP_ENTRY)
--echo # default: $delete_record
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_index FROM "$create_index";
eval PREPARE insert_record FROM "$insert_record";
eval PREPARE delete_record FROM "$delete_record";
eval PREPARE drop_index FROM "$drop_index";
let $run= 1;
let $counter= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_index;
--error 0,ER_DUP_ENTRY
EXECUTE insert_record;
if (!$mysql_errno)
{
--echo # Error: INSERT was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
EXECUTE drop_index;
EXECUTE insert_record;
--error 0,ER_DUP_ENTRY
EXECUTE create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
EXECUTE delete_record;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_index;
DEALLOCATE PREPARE insert_record;
DEALLOCATE PREPARE delete_record;
DEALLOCATE PREPARE drop_index;
--enable_result_log
--enable_query_log
#
--echo # Subtest 7C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # default: $insert_record (expect to get ER_DUP_ENTRY)
--echo # con2: $drop_index
--echo # default: $insert_record
--echo # con2: $create_index (expect to get ER_DUP_ENTRY)
--echo # con2: $delete_record
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
let $counter= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_index;
--error 0,ER_DUP_ENTRY
eval $insert_record;
if (!$mysql_errno)
{
--echo # Error: INSERT was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
connection con2;
eval $drop_index;
connection default;
eval $insert_record;
connection con2;
--error 0,ER_DUP_ENTRY
eval $create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
eval $delete_record;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 7D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index
--echo # default: $insert_record (expect to get ER_DUP_ENTRY)
--echo # con2: $drop_index
--echo # default: $insert_record
--echo # con2: $create_index (expect to get ER_DUP_ENTRY)
--echo # con2: $delete_record
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_index FROM "$create_index";
eval PREPARE insert_record FROM "$insert_record";
EXECUTE create_index;
connection con2;
eval PREPARE create_index FROM "$create_index";
eval PREPARE drop_index FROM "$drop_index";
eval PREPARE delete_record FROM "$delete_record";
EXECUTE drop_index;
connection default;
let $run= 1;
let $counter= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_index;
--error 0,ER_DUP_ENTRY
EXECUTE insert_record;
if (!$mysql_errno)
{
--echo # Error: INSERT was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
connection con2;
EXECUTE drop_index;
connection default;
EXECUTE insert_record;
connection con2;
--error 0,ER_DUP_ENTRY
EXECUTE create_index;
if (!$mysql_errno)
{
--echo # Error: CREATE INDEX was successful though we expected ER_DUP_ENTRY
--echo # abort
exit;
}
EXECUTE delete_record;
connection default;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_index;
DEALLOCATE PREPARE insert_record;
connection con2;
DEALLOCATE PREPARE create_index;
DEALLOCATE PREPARE drop_index;
DEALLOCATE PREPARE delete_record;
connection default;
--enable_result_log
--enable_query_log
DROP TABLE t1;
######## include/ddl8.inc ######
#
# Stress the storage engine with rapid CREATE/DROP TABLE/INDEX
# and following SELECT/INSERT/SHOW etc.
# Subtest 8 variants (8A - 8D)
#
# The variables
# $loop_size -- number of rounds till we look at the clock again
# $runtime -- rough intended runtime per subtest variant
# $engine_type -- storage engine to be used in CREATE TABLE
# must be set within the routine sourcing this script.
#
# Other stuff which must already exist:
# - connection con2
# - stmt_start and stmt_break prepared by the default connection
#
# Please look for more details within include/ddl1.inc.
#
# Creation of this test:
# 2007-07-04 mleich
#
#----------------------------------------------------------------------
# Settings for Subtest 8 variants
# Scenario: CREATE INDEX variant1/SHOW/DROP INDEX/
# CREATE INDEX variant2/SHOW/DROP INDEX
let $create_index1= CREATE INDEX IDX ON t1 (f2);
let $create_index2= CREATE UNIQUE INDEX IDX ON t1 (f2);
let $show_table= SHOW CREATE TABLE t1;
let $drop_index= DROP INDEX IDX ON t1;
eval CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=$engine_type;
INSERT INTO t1 VALUES(1,1);
eval $create_index1;
let $cr_value1= INITIALIZED;
let $cr_value1= query_get_value($show_table, Create Table, 1);
eval $drop_index;
eval $create_index2;
let $cr_value2= INITIALIZED;
let $cr_value2= query_get_value($show_table, Create Table, 1);
eval $drop_index;
if (`SELECT '$cr_value1' = '$cr_value2'`)
{
--echo # Error during generation of prerequisites.
--echo # cr_value1 equals cr_value2
--echo # cr_value1: $cr_value1
--echo # cr_value2: $cr_value2
--echo # abort
exit;
}
#----------------------------------------------------------------------
#
--echo # Subtest 8A (one connection, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index1
--echo # default: $show_table
--echo # default: $drop_index
--echo # default: $create_index2
--echo # default: $show_table
--echo # default: $drop_index
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_index1;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
eval $drop_index;
eval $create_index2;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
eval $drop_index;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 8B (one connection, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index1
--echo # default: $show_table
--echo # default: $drop_index
--echo # default: $create_index2
--echo # default: $show_table
--echo # default: $drop_index
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_index1 FROM "$create_index1";
eval PREPARE create_index2 FROM "$create_index2";
EXECUTE create_index1;
eval PREPARE show_table FROM "$show_table";
eval PREPARE drop_index FROM "$drop_index";
EXECUTE drop_index;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_index1;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
EXECUTE drop_index;
EXECUTE create_index2;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
EXECUTE drop_index;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_index1;
DEALLOCATE PREPARE create_index2;
DEALLOCATE PREPARE show_table;
DEALLOCATE PREPARE drop_index;
--enable_result_log
--enable_query_log
#
--echo # Subtest 8C (two connections, no PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index1
--echo # con2: $show_table
--echo # default: $drop_index
--echo # default: $create_index2
--echo # con2: $show_table
--echo # default: $drop_index
--disable_query_log
--disable_result_log
connection default;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
eval $create_index1;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
connection default;
eval $drop_index;
eval $create_index2;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value($show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
connection default;
eval $drop_index;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
--enable_result_log
--enable_query_log
#
--echo # Subtest 8D (two connections, use PREPARE/EXECUTE)
--echo # connection action
--echo # default: $create_index1
--echo # con2: $show_table
--echo # default: $drop_index
--echo # default: $create_index2
--echo # con2: $show_table
--echo # default: $drop_index
--disable_query_log
--disable_result_log
connection default;
eval PREPARE create_index1 FROM "$create_index1";
eval PREPARE create_index2 FROM "$create_index2";
eval PREPARE drop_index FROM "$drop_index";
EXECUTE create_index1;
connection con2;
eval PREPARE show_table FROM "$show_table";
connection default;
EXECUTE drop_index;
let $run= 1;
# Determine the current time.
EXECUTE stmt_start;
# Run execution loops till the planned runtime is reached
while ($run)
{
let $loop_run= $loop_size;
while ($loop_run)
{
EXECUTE create_index1;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value1'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value1
--echo # abort
exit;
}
connection default;
EXECUTE drop_index;
EXECUTE create_index2;
connection con2;
let $value= INITIALIZED;
let $value= query_get_value(EXECUTE show_table, Create Table, 1);
if (`SELECT '$value' <> '$cr_value2'`)
{
--echo # Error: Unexpected SHOW CREATE TABLE output
--echo # Got: $value
--echo # Expected: $cr_value2
--echo # abort
exit;
}
connection default;
EXECUTE drop_index;
dec $loop_run;
}
if (`EXECUTE stmt_break`)
{
let $run= 0;
}
}
DEALLOCATE PREPARE create_index1;
DEALLOCATE PREPARE create_index2;
DEALLOCATE PREPARE drop_index;
connection con2;
DEALLOCATE PREPARE show_table;
connection default;
--enable_result_log
--enable_query_log
DROP TABLE t1;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
SET @runtime = <intended_runtime>;
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
DROP TABLE IF EXISTS t1;
# Subtest 2A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = ARCHIVE AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 3A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 5A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
# Subtest 5D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = ARCHIVE
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
SET @runtime = <intended_runtime>;
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
DROP TABLE IF EXISTS t1;
# Subtest 2A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = CSV AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 3A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
SET @runtime = <intended_runtime>;
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
DROP TABLE IF EXISTS t1;
# Subtest 1A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = InnoDB
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = InnoDB
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = InnoDB
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 1D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = InnoDB
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 2A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = InnoDB AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 3A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB;
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB;
DROP TABLE t1;
# Subtest 4A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=InnoDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 5A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
# Subtest 5D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = InnoDB
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=InnoDB;
# Subtest 6A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
# Subtest 6D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(0,1);
# Subtest 7A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# default: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# default: DELETE FROM t1 WHERE f1 = 1
# Subtest 7B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# default: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# default: DELETE FROM t1 WHERE f1 = 1
# Subtest 7C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# con2: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# con2: DELETE FROM t1 WHERE f1 = 1
# Subtest 7D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# con2: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# con2: DELETE FROM t1 WHERE f1 = 1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1,1);
CREATE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
CREATE UNIQUE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
# Subtest 8A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
DROP TABLE t1;
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
SET @runtime = <intended_runtime>;
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
DROP TABLE IF EXISTS t1;
# Subtest 1A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MEMORY
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MEMORY
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MEMORY
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 1D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MEMORY
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 2A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MEMORY AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 3A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY;
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY;
DROP TABLE t1;
# Subtest 4A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MEMORY
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 5A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
# Subtest 5D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MEMORY
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MEMORY;
# Subtest 6A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
# Subtest 6D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(0,1);
# Subtest 7A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# default: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# default: DELETE FROM t1 WHERE f1 = 1
# Subtest 7B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# default: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# default: DELETE FROM t1 WHERE f1 = 1
# Subtest 7C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# con2: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# con2: DELETE FROM t1 WHERE f1 = 1
# Subtest 7D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# con2: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# con2: DELETE FROM t1 WHERE f1 = 1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(1,1);
CREATE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
CREATE UNIQUE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
# Subtest 8A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
DROP TABLE t1;
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
SET @runtime = <intended_runtime>;
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
DROP TABLE IF EXISTS t1;
# Subtest 1A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MyISAM
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MyISAM
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MyISAM
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 1D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = MyISAM
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 2A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = MyISAM AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 3A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM;
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM;
DROP TABLE t1;
# Subtest 4A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=MyISAM
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 5A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
# Subtest 5D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = MyISAM
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MyISAM;
# Subtest 6A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
# Subtest 6D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, PRIMARY KEY(f1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES(0,1);
# Subtest 7A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# default: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# default: DELETE FROM t1 WHERE f1 = 1
# Subtest 7B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# default: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# default: DELETE FROM t1 WHERE f1 = 1
# Subtest 7C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# con2: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# con2: DELETE FROM t1 WHERE f1 = 1
# Subtest 7D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE UNIQUE INDEX IDX1 ON t1 (f2)
# default: INSERT INTO t1 VALUES(1,1) (expect to get ER_DUP_ENTRY)
# con2: DROP INDEX IDX1 ON t1
# default: INSERT INTO t1 VALUES(1,1)
# con2: CREATE UNIQUE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_ENTRY)
# con2: DELETE FROM t1 WHERE f1 = 1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1,1);
CREATE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
CREATE UNIQUE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
# Subtest 8A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
DROP TABLE t1;
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
PREPARE stmt_start FROM "SELECT UNIX_TIMESTAMP() INTO @start";
SET @runtime = <intended_runtime>;
PREPARE stmt_break FROM "SELECT UNIX_TIMESTAMP() - @start > @runtime - 1";
DROP TABLE IF EXISTS t1;
# Subtest 1A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = NDB
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = NDB
# default: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# default: DROP TABLE t1
# Subtest 1C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = NDB
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 1D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT,f2 BIGINT,UNIQUE(f1),UNIQUE(f2))
ENGINE = NDB
# con2: INSERT INTO t1 VALUES (1,1), (2,2), (3,3)
# con2: DROP TABLE t1
# Subtest 2A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# default: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 2D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 ENGINE = NDB AS SELECT 1 AS f1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1
# default: DROP TABLE t1
# con2: SELECT COUNT(*) <> 1 FROM t1 WHERE f1 = 1 (expect to get ER_NO_SUCH_TABLE)
# Subtest 3A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# default: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
# Subtest 3D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR)
# default: DROP TABLE t1
# con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR)
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB;
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB;
DROP TABLE t1;
# Subtest 4A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# default: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# default: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 4D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1), UNIQUE (f2)) ENGINE=NDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# con2: SHOW CREATE TABLE t1 (expect to get ER_NO_SUCH_TABLE)
# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB
# con2: SHOW CREATE TABLE t1
# default: DROP TABLE t1
# Subtest 5A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB
# default: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# default: DROP TABLE t1
# Subtest 5C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
# Subtest 5D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE TABLE t1 (f1 MEDIUMINT NOT NULL AUTO_INCREMENT,f2 BIGINT, UNIQUE(f1)) ENGINE = NDB
# con2: INSERT INTO t1 SET f2 = 9
# default: SELECT f1 <> 1 OR f1 IS NULL FROM t1 WHERE f2 = 9
# con2: DROP TABLE t1
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB;
# Subtest 6A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# default: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# default: DROP INDEX IDX1 ON t1
# Subtest 6C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
# Subtest 6D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: CREATE INDEX IDX1 ON t1 (f2) (expect to get ER_DUP_KEYNAME)
# default: DROP INDEX IDX1 ON t1
# con2: DROP INDEX IDX1 ON t1 (expect to get ER_CANT_DROP_FIELD_OR_KEY)
# default: CREATE INDEX IDX1 ON t1 (f2)
# con2: DROP INDEX IDX1 ON t1
DROP TABLE t1;
CREATE TABLE t1 (f1 BIGINT, f2 BIGINT, UNIQUE(f1)) ENGINE=NDB;
INSERT INTO t1 VALUES(1,1);
CREATE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
CREATE UNIQUE INDEX IDX ON t1 (f2);
DROP INDEX IDX ON t1;
# Subtest 8A (one connection, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8B (one connection, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# default: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8C (two connections, no PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# Subtest 8D (two connections, use PREPARE/EXECUTE)
# connection action
# default: CREATE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
# default: CREATE UNIQUE INDEX IDX ON t1 (f2)
# con2: SHOW CREATE TABLE t1
# default: DROP INDEX IDX ON t1
DROP TABLE t1;
DEALLOCATE PREPARE stmt_start;
DEALLOCATE PREPARE stmt_break;
######## 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;
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
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
######## 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;
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
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
######## 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;
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
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
######## 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;
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
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
######## 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;
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
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
######## t/ddl_ndb.test ######
#
# Stress the storage engine NDB 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_ndb.inc
let $engine_type= NDB;
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`)
{
--skip Test requires: ps-protocol/sp-protocol/cursor-protocol/view-protocol disabled
}
# Attention: We set here much smaller values for $runtime and $loop_size compared
# to the other storage engines.
# The reason is that NDB is extreme slow and should not exceed
# the "testcase-timeout".
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= 3;
}
if (!$run)
{
let $runtime = 1;
let $loop_size= 1;
}
##### 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
# The following test suffers from
# Bug#26043 UNIQUE INDEX create always fails after constraint violation
# and is therefore set to comment.
# --source suite/stress/include/ddl7.inc
--source suite/stress/include/ddl8.inc
##### Cleanup
--source suite/stress/include/ddl.cln
...@@ -45,7 +45,7 @@ documentation and/or software. ...@@ -45,7 +45,7 @@ documentation and/or software.
#include <my_global.h> #include <my_global.h>
#include <m_string.h> #include <m_string.h>
#include "md5.h" #include "my_md5.h"
/* Constants for MD5Transform routine. */ /* Constants for MD5Transform routine. */
......
...@@ -301,7 +301,8 @@ rm -f $MYSQL_SHARE/Makefile* $MYSQL_SHARE/*/*.OLD ...@@ -301,7 +301,8 @@ rm -f $MYSQL_SHARE/Makefile* $MYSQL_SHARE/*/*.OLD
copyfileto $BASE/mysql-test \ copyfileto $BASE/mysql-test \
mysql-test/mysql-test-run mysql-test/install_test_db \ mysql-test/mysql-test-run mysql-test/install_test_db \
mysql-test/mysql-test-run.pl mysql-test/README \ mysql-test/mysql-test-run.pl mysql-test/README \
mysql-test/valgrind.supp \ mysql-test/mysql-stress-test.pl \
mysql-test/valgrind.supp \
netware/mysql_test_run.nlm netware/install_test_db.ncf netware/mysql_test_run.nlm netware/install_test_db.ncf
MCP mysql-test/lib/*.pl $BASE/mysql-test/lib MCP mysql-test/lib/*.pl $BASE/mysql-test/lib
......
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake") INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR") "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_C_FLAGS_DEBUG SET(CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR") "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /MAP /MAPINFO:EXPORTS")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/extra/yassl/include
...@@ -40,7 +41,8 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc ...@@ -40,7 +41,8 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc
ADD_DEFINITIONS(-DMYSQL_SERVER -D_CONSOLE -DHAVE_DLOPEN) ADD_DEFINITIONS(-DMYSQL_SERVER -D_CONSOLE -DHAVE_DLOPEN)
ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc ADD_EXECUTABLE(mysqld${MYSQLD_EXE_SUFFIX}
../sql-common/client.c derror.cc des_key_file.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
filesort.cc gstream.cc filesort.cc gstream.cc
ha_partition.cc ha_partition.cc
...@@ -81,7 +83,8 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc ...@@ -81,7 +83,8 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
${PROJECT_SOURCE_DIR}/include/mysql_version.h ${PROJECT_SOURCE_DIR}/include/mysql_version.h
${PROJECT_SOURCE_DIR}/sql/sql_builtin.cc ${PROJECT_SOURCE_DIR}/sql/sql_builtin.cc
${PROJECT_SOURCE_DIR}/sql/lex_hash.h) ${PROJECT_SOURCE_DIR}/sql/lex_hash.h)
TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg mysys yassl zlib dbug yassl TARGET_LINK_LIBRARIES(mysqld${MYSQLD_EXE_SUFFIX}
heap myisam myisammrg mysys yassl zlib dbug yassl
taocrypt strings vio regex wsock32 ws2_32) taocrypt strings vio regex wsock32 ws2_32)
IF(EMBED_MANIFESTS) IF(EMBED_MANIFESTS)
...@@ -97,16 +100,16 @@ IF(WITH_CSV_STORAGE_ENGINE) ...@@ -97,16 +100,16 @@ IF(WITH_CSV_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld csv) TARGET_LINK_LIBRARIES(mysqld csv)
ENDIF(WITH_CSV_STORAGE_ENGINE) ENDIF(WITH_CSV_STORAGE_ENGINE)
IF(WITH_EXAMPLE_STORAGE_ENGINE) IF(WITH_EXAMPLE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld example) TARGET_LINK_LIBRARIES(mysqld${MYSQLD_EXE_SUFFIX} example)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE) ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)
IF(WITH_FEDERATED_STORAGE_ENGINE) IF(WITH_FEDERATED_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld federated) TARGET_LINK_LIBRARIES(mysqld federated)
ENDIF(WITH_FEDERATED_STORAGE_ENGINE) ENDIF(WITH_FEDERATED_STORAGE_ENGINE)
IF(WITH_INNOBASE_STORAGE_ENGINE) IF(WITH_INNOBASE_STORAGE_ENGINE)
TARGET_LINK_LIBRARIES(mysqld innobase) TARGET_LINK_LIBRARIES(mysqld${MYSQLD_EXE_SUFFIX} innobase)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE) ENDIF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_DEPENDENCIES(mysqld GenError) ADD_DEPENDENCIES(mysqld${MYSQLD_EXE_SUFFIX} GenError)
# Sql Parser custom command # Sql Parser custom command
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
...@@ -138,8 +141,7 @@ ADD_CUSTOM_COMMAND( ...@@ -138,8 +141,7 @@ ADD_CUSTOM_COMMAND(
COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h
DEPENDS ${GEN_LEX_HASH_EXE} DEPENDS ${GEN_LEX_HASH_EXE}
) )
ADD_DEPENDENCIES(mysqld${MYSQLD_EXE_SUFFIX} gen_lex_hash)
ADD_DEPENDENCIES(mysqld gen_lex_hash)
ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def) ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def)
ADD_DEPENDENCIES(udf_example strings) ADD_DEPENDENCIES(udf_example strings)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "mysql_priv.h" #include "mysql_priv.h"
#include <m_ctype.h> #include <m_ctype.h>
#include "md5.h" #include "my_md5.h"
#include "sha1.h" #include "sha1.h"
#include "my_aes.h" #include "my_aes.h"
#include <zlib.h> #include <zlib.h>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "mysql_priv.h" #include "mysql_priv.h"
#include <errno.h> #include <errno.h>
#include <m_ctype.h> #include <m_ctype.h>
#include "md5.h" #include "my_md5.h"
#ifdef WITH_PARTITION_STORAGE_ENGINE #ifdef WITH_PARTITION_STORAGE_ENGINE
#include "ha_partition.h" #include "ha_partition.h"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "mysql_priv.h" #include "mysql_priv.h"
#include "sql_trigger.h" #include "sql_trigger.h"
#include <m_ctype.h> #include <m_ctype.h>
#include "md5.h" #include "my_md5.h"
/* Functions defined in this file */ /* Functions defined in this file */
......
...@@ -25,6 +25,7 @@ EXTRA_DIST = mysql.spec.sh \ ...@@ -25,6 +25,7 @@ EXTRA_DIST = mysql.spec.sh \
my-innodb-heavy-4G.cnf.sh \ my-innodb-heavy-4G.cnf.sh \
mysql-log-rotate.sh \ mysql-log-rotate.sh \
mysql.server.sh \ mysql.server.sh \
mysqld_multi.server.sh \
binary-configure.sh \ binary-configure.sh \
magic mysql.m4 \ magic mysql.m4 \
MySQL-shared-compat.spec.sh \ MySQL-shared-compat.spec.sh \
...@@ -42,7 +43,8 @@ pkgdata_DATA = my-small.cnf \ ...@@ -42,7 +43,8 @@ pkgdata_DATA = my-small.cnf \
binary-configure \ binary-configure \
ndb-config-2-node.ini ndb-config-2-node.ini
pkgdata_SCRIPTS = mysql.server pkgdata_SCRIPTS = mysql.server \
mysqld_multi.server
aclocaldir = $(datadir)/aclocal aclocaldir = $(datadir)/aclocal
aclocal_DATA = mysql.m4 aclocal_DATA = mysql.m4
...@@ -59,6 +61,7 @@ CLEANFILES = my-small.cnf \ ...@@ -59,6 +61,7 @@ CLEANFILES = my-small.cnf \
mysql-@VERSION@.spec \ mysql-@VERSION@.spec \
mysql-log-rotate \ mysql-log-rotate \
mysql.server \ mysql.server \
mysqld_multi.server \
binary-configure \ binary-configure \
MySQL-shared-compat.spec \ MySQL-shared-compat.spec \
ndb-config-2-node.ini ndb-config-2-node.ini
......
...@@ -51,6 +51,7 @@ try ...@@ -51,6 +51,7 @@ try
configfile.WriteLine("SET (" + args.Item(i) + " TRUE)"); configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
break; break;
case "MYSQL_SERVER_SUFFIX": case "MYSQL_SERVER_SUFFIX":
case "MYSQLD_EXE_SUFFIX":
configfile.WriteLine("SET (" + parts[0] + " \"" configfile.WriteLine("SET (" + parts[0] + " \""
+ parts[1] + "\")"); + parts[1] + "\")");
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment