diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ctype_utf8mb4_innodb-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/information_schema-big.test | 8 | ||||
-rw-r--r-- | mysql-test/t/partition_innodb-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/timeout.test | 60 | ||||
-rw-r--r-- | mysql-test/t/transaction_timeout.test | 54 |
5 files changed, 115 insertions, 9 deletions
diff --git a/mysql-test/t/ctype_utf8mb4_innodb-master.opt b/mysql-test/t/ctype_utf8mb4_innodb-master.opt index 56d40323eae..96f0ce3f36c 100644 --- a/mysql-test/t/ctype_utf8mb4_innodb-master.opt +++ b/mysql-test/t/ctype_utf8mb4_innodb-master.opt @@ -1,2 +1 @@ --default-storage-engine=MyISAM ---loose-innodb-large-prefix=OFF diff --git a/mysql-test/t/information_schema-big.test b/mysql-test/t/information_schema-big.test index 717c22f8f6a..9212348649e 100644 --- a/mysql-test/t/information_schema-big.test +++ b/mysql-test/t/information_schema-big.test @@ -1,18 +1,12 @@ # This test uses grants, which can't get tested for embedded server -- source include/big_test.inc -- source include/not_embedded.inc --- source include/have_xtradb.inc +-- source include/have_innodb.inc # check that CSV engine was compiled in, as the result of the test depends # on the presence of the log tables (which are CSV-based). --source include/have_csv.inc ---disable_warnings -DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5; -DROP VIEW IF EXISTS v1; ---enable_warnings - - --echo # --echo # Bug#18925: subqueries with MIN/MAX functions on INFORMATION_SCHEMA --echo # diff --git a/mysql-test/t/partition_innodb-master.opt b/mysql-test/t/partition_innodb-master.opt deleted file mode 100644 index cf94b2d7dca..00000000000 --- a/mysql-test/t/partition_innodb-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose-innodb-large-prefix=OFF diff --git a/mysql-test/t/timeout.test b/mysql-test/t/timeout.test new file mode 100644 index 00000000000..9f6e692b148 --- /dev/null +++ b/mysql-test/t/timeout.test @@ -0,0 +1,60 @@ +--echo # +--echo # MDEV-11379 - AliSQL: [Feature] Issue#8: SELECT FOR UPDATE WAIT +--echo # MDEV-11388 - AliSQL: [Feature] Issue#15 DDL FAST FAIL +--echo # +CREATE TABLE t1(a INT, b TEXT, c MULTIPOLYGON NOT NULL); +CREATE INDEX i1 ON t1(a) WAIT 1; +CREATE FULLTEXT INDEX i2 ON t1(b) WAIT 1; +CREATE SPATIAL INDEX i3 ON t1(c) WAIT 1; +ALTER TABLE t1 WAIT 1 COMMENT='test'; +OPTIMIZE TABLE t1 WAIT 1; +DROP INDEX i1 ON t1 WAIT 1; +TRUNCATE TABLE t1 WAIT 1; +RENAME TABLE t1 WAIT 1 TO t2; +RENAME TABLE t2 NOWAIT TO t1; + +connect(con1, localhost, root,,); +LOCK TABLE t1 WRITE WAIT 31536001; + +connection default; +--error ER_LOCK_WAIT_TIMEOUT +CREATE INDEX i1 ON t1(a) WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +CREATE INDEX i1 ON t1(a) NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +CREATE FULLTEXT INDEX i2 ON t1(b) WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +CREATE FULLTEXT INDEX i2 ON t1(b) NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +CREATE SPATIAL INDEX i3 ON t1(c) WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +CREATE SPATIAL INDEX i3 ON t1(c) NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t1 WAIT 0 COMMENT='test'; +--error ER_LOCK_WAIT_TIMEOUT +ALTER TABLE t1 NOWAIT COMMENT='test'; +OPTIMIZE TABLE t1 WAIT 0; +OPTIMIZE TABLE t1 NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +DROP INDEX i1 ON t1 WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +DROP INDEX i1 ON t1 NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +TRUNCATE TABLE t1 WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +TRUNCATE TABLE t1 NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +RENAME TABLE t1 WAIT 0 TO t2; +--error ER_LOCK_WAIT_TIMEOUT +RENAME TABLE t1 NOWAIT TO t2; +--error ER_LOCK_WAIT_TIMEOUT +DROP TABLE t1 WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +DROP TABLE t1 NOWAIT; +--error ER_LOCK_WAIT_TIMEOUT +LOCK TABLE t1 WRITE WAIT 0; +--error ER_LOCK_WAIT_TIMEOUT +LOCK TABLE t1 WRITE NOWAIT; + +disconnect con1; +DROP TABLE t1 WAIT 1; diff --git a/mysql-test/t/transaction_timeout.test b/mysql-test/t/transaction_timeout.test new file mode 100644 index 00000000000..36d835cc381 --- /dev/null +++ b/mysql-test/t/transaction_timeout.test @@ -0,0 +1,54 @@ +--source include/no_protocol.inc +--source include/have_innodb.inc +--source include/not_embedded.inc + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; + +--echo # Test idle_transaction_timeout +connect (c0,localhost,root,,test,,); +SHOW VARIABLES LIKE 'idle_%transaction_timeout'; +SET autocommit=0; +SET idle_transaction_timeout=1; + +BEGIN; +SELECT * FROM t1; +sleep 2; + +--error 2006,2013 +SELECT * FROM t1; +disconnect c0; + +--echo # Test idle_readonly_transaction_timeout +connect (c1,localhost,root,,test,,); +SHOW VARIABLES LIKE 'idle_%transaction_timeout'; +SET autocommit=0; +SET idle_readonly_transaction_timeout=1; + +BEGIN; +SELECT * FROM t1; +sleep 2; + +--error 2006,2013 # Gone away +SELECT * FROM t1; +disconnect c1; + +--echo # Test idle_readwrite_transaction_timeout +connect (c2,localhost,root,,test,,); +SHOW VARIABLES LIKE 'idle_%transaction_timeout'; +SET autocommit=0; +SET idle_readwrite_transaction_timeout=1; + +BEGIN; +SELECT * FROM t1; +sleep 2; + +SELECT * FROM t1; +INSERT INTO t1 VALUES (1); +sleep 2; + +--error 2006, 2013 # Gone away +SELECT * FROM t1; +disconnect c2; + +connection default; +DROP TABLE t1; |