summaryrefslogtreecommitdiff
path: root/mysql-test/main/timeout.test
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2018-03-09 14:05:35 +0200
committerMonty <monty@mariadb.org>2018-03-29 13:59:44 +0300
commita7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch)
tree70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/timeout.test
parentab1941266c59a19703a74b5593cf3f508a5752d7 (diff)
downloadmariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/timeout.test')
-rw-r--r--mysql-test/main/timeout.test60
1 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/main/timeout.test b/mysql-test/main/timeout.test
new file mode 100644
index 00000000000..9f6e692b148
--- /dev/null
+++ b/mysql-test/main/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;