summaryrefslogtreecommitdiff
path: root/mysql-test/r/innodb-timeout.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/innodb-timeout.result')
-rw-r--r--mysql-test/r/innodb-timeout.result10
1 files changed, 9 insertions, 1 deletions
diff --git a/mysql-test/r/innodb-timeout.result b/mysql-test/r/innodb-timeout.result
index be9a688cd72..2d34cdb1cda 100644
--- a/mysql-test/r/innodb-timeout.result
+++ b/mysql-test/r/innodb-timeout.result
@@ -23,6 +23,7 @@ select @@innodb_lock_wait_timeout;
create table t1(a int primary key)engine=innodb;
begin;
insert into t1 values(1),(2),(3);
+set innodb_lock_wait_timeout=5;
select * from t1 for update;
commit;
a
@@ -31,8 +32,15 @@ a
3
begin;
insert into t1 values(4);
+set innodb_lock_wait_timeout=2;
+set @a= current_timestamp();
select * from t1 for update;
-commit;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+set @b= current_timestamp();
+set @c= timestampdiff(SECOND, @a, @b);
+select if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c));
+if(@c >= 1 and @c <= 10, 'OK', concat("NOT OK, time passed=", @c))
+OK
+commit;
drop table t1;
set global innodb_lock_wait_timeout=50;