*** Bug #29452 - Wait Lock Timout ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
SELECT @@falcon_lock_wait_timeout INTO @previous_lock_wait_timeout;
SHOW VARIABLES LIKE 'FALCON_LOCK_WAIT_TIMEOUT';
Variable_name	Value
falcon_lock_wait_timeout	50
SET GLOBAL FALCON_LOCK_WAIT_TIMEOUT = 2;
SHOW VARIABLES LIKE 'FALCON_LOCK_WAIT_TIMEOUT';
Variable_name	Value
falcon_lock_wait_timeout	2
# Establish connection conn1
# Switch to connection default
CREATE TABLE t1 (a varchar(50), PRIMARY KEY (a));
CREATE TABLE t2 (a varchar(50)) Engine 'MyISAM';
CREATE TRIGGER bi BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES ('inserted by trigger');
BEGIN;
INSERT INTO t1 VALUES('inserted by client 1');
SELECT * FROM t1;
a
inserted by client 1
SELECT * FROM t2;
a
inserted by trigger
# Switch to connection conn1
BEGIN;
SELECT * FROM t1;
a
SELECT * FROM t2;
a
inserted by trigger
INSERT INTO t1 VALUES('inserted by client 1');
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
# Switch to connection default
COMMIT;
SELECT count(*) FROM t1;
count(*)
1
SELECT count(*) FROM t2;
count(*)
2
# Switch to connection default
DROP TABLE t1;
DROP TABLE t2;
SET GLOBAL FALCON_LOCK_WAIT_TIMEOUT = @previous_lock_wait_timeout;
SHOW VARIABLES LIKE 'FALCON_LOCK_WAIT_TIMEOUT';
Variable_name	Value
falcon_lock_wait_timeout	50
