2
drop table if exists t1;
6
# Bug#28587 SELECT is blocked by INSERT waiting on read lock, even with low_priority_updates
8
--echo connection: default
9
set low_priority_updates=1;
11
drop table if exists t1;
13
create table t1 (a int, b int, unique key t1$a (a));
15
connect (update,localhost,root,,);
17
--echo connection: update
18
set low_priority_updates=1;
19
show variables like 'low_priority_updates';
20
let $ID= `select connection_id()`;
21
--send insert into t1 values (1, 2) ON DUPLICATE KEY UPDATE b = 2;
23
# we must wait till the insert opens and locks the table
25
select count(*) = 1 from information_schema.processlist
26
where state = "Table lock" and id = $ID;
27
--source include/wait_condition.inc
28
connect (select,localhost,root,,);
29
--echo connection: select
32
--echo connection: default
39
set low_priority_updates=default;