mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
test case for low priority updates race bug
not yet fixed mysql-test/r/lock.result: updated result mysql-test/t/lock.test: test case for low prior updates bug
This commit is contained in:
parent
13448d1089
commit
959c180b5a
2 changed files with 24 additions and 0 deletions
|
|
@ -4,3 +4,5 @@ Table Op Msg_type Msg_text
|
|||
test.t1 check status OK
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 check error Table 't2' was not locked with LOCK TABLES
|
||||
n
|
||||
1
|
||||
|
|
|
|||
|
|
@ -53,3 +53,25 @@ lock tables t1 write;
|
|||
check table t2;
|
||||
unlock tables;
|
||||
drop table t1,t2;
|
||||
|
||||
#test to see if select will get the lock ahead of low priority update
|
||||
connect (locker,localhost,root,,);
|
||||
connect (reader,localhost,root,,);
|
||||
connect (writer,localhost,root,,);
|
||||
|
||||
connection locker;
|
||||
create table t1(n int);
|
||||
insert into t1 values (1);
|
||||
lock tables t1 write;
|
||||
connection writer;
|
||||
send update low_priority t1 set n = 4;
|
||||
connection reader;
|
||||
send select n from t1;
|
||||
connection locker;
|
||||
unlock tables;
|
||||
connection writer;
|
||||
reap;
|
||||
connection reader;
|
||||
reap;
|
||||
drop table t1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue