mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 03:48:13 +02:00

When we expect a lock wait timeout, let us override the default innodb_lock_wait_timeout=50 with the minimum timeout of 1 second.
36 lines
1 KiB
Text
36 lines
1 KiB
Text
--source include/have_innodb.inc
|
|
|
|
SET @save_innodb_timeout=@@innodb_lock_wait_timeout;
|
|
SET GLOBAL innodb_lock_wait_timeout=1;
|
|
set session transaction isolation level read committed;
|
|
|
|
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
|
|
(what, id)) engine=innodb;
|
|
insert into innodb_bug52663 values ('total', 0, 0);
|
|
begin;
|
|
|
|
connect (addconroot, localhost, root,,);
|
|
set session transaction isolation level read committed;
|
|
begin;
|
|
|
|
connection default;
|
|
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
|
|
select * from innodb_bug52663;
|
|
|
|
connection addconroot;
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
|
|
select * from innodb_bug52663;
|
|
|
|
connection default;
|
|
commit;
|
|
|
|
connection addconroot;
|
|
update innodb_bug52663 set count = count + 1 where what = 'total' and id = 0;
|
|
commit;
|
|
select * from innodb_bug52663;
|
|
|
|
connection default;
|
|
select * from innodb_bug52663;
|
|
drop table innodb_bug52663;
|
|
SET GLOBAL innodb_lock_wait_timeout=@save_innodb_timeout;
|