mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix a slow test
When we expect a lock wait timeout, let us override the default innodb_lock_wait_timeout=50 with the minimum timeout of 1 second.
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
|
SET @save_innodb_timeout=@@innodb_lock_wait_timeout;
|
||||||
|
SET GLOBAL innodb_lock_wait_timeout=1;
|
||||||
set session transaction isolation level read committed;
|
set session transaction isolation level read committed;
|
||||||
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
|
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
|
||||||
(what, id)) engine=innodb;
|
(what, id)) engine=innodb;
|
||||||
insert into innodb_bug52663 values ('total', 0, 0);
|
insert into innodb_bug52663 values ('total', 0, 0);
|
||||||
begin;
|
begin;
|
||||||
connect addconroot, localhost, root,,;
|
connect addconroot, localhost, root,,;
|
||||||
connection addconroot;
|
|
||||||
set session transaction isolation level read committed;
|
set session transaction isolation level read committed;
|
||||||
begin;
|
begin;
|
||||||
connection default;
|
connection default;
|
||||||
@@ -31,3 +32,4 @@ select * from innodb_bug52663;
|
|||||||
what id count
|
what id count
|
||||||
total 0 2
|
total 0 2
|
||||||
drop table innodb_bug52663;
|
drop table innodb_bug52663;
|
||||||
|
SET GLOBAL innodb_lock_wait_timeout=@save_innodb_timeout;
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
--source include/long_test.inc
|
|
||||||
--source include/have_innodb.inc
|
--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;
|
set session transaction isolation level read committed;
|
||||||
|
|
||||||
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
|
create table innodb_bug52663 (what varchar(5), id integer, count integer, primary key
|
||||||
@@ -9,7 +10,6 @@ insert into innodb_bug52663 values ('total', 0, 0);
|
|||||||
begin;
|
begin;
|
||||||
|
|
||||||
connect (addconroot, localhost, root,,);
|
connect (addconroot, localhost, root,,);
|
||||||
connection addconroot;
|
|
||||||
set session transaction isolation level read committed;
|
set session transaction isolation level read committed;
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
@@ -33,3 +33,4 @@ select * from innodb_bug52663;
|
|||||||
connection default;
|
connection default;
|
||||||
select * from innodb_bug52663;
|
select * from innodb_bug52663;
|
||||||
drop table innodb_bug52663;
|
drop table innodb_bug52663;
|
||||||
|
SET GLOBAL innodb_lock_wait_timeout=@save_innodb_timeout;
|
||||||
|
Reference in New Issue
Block a user