summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/timeout.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/timeout.test
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 00000000..9f6e692b
--- /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;