mariadb/mysql-test/main/timeout.test
2018-03-29 13:59:44 +03:00

60 lines
1.7 KiB
Text

--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;