~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/lock_multi.test

  • Committer: Brian Aker
  • Date: 2009-04-08 06:40:24 UTC
  • mfrom: (974.1.3 dev)
  • Revision ID: brian@gaz-20090408064024-wclqe00xnchvob4n
Merge Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
drop table if exists t1,t2;
3
3
--enable_warnings
4
4
 
5
 
# Test to see if select will get the lock ahead of low priority update
6
 
 
7
5
connect (locker,localhost,root,,);
8
6
connect (reader,localhost,root,,);
9
7
connect (writer,localhost,root,,);
11
9
connection locker;
12
10
create table t1(n int);
13
11
insert into t1 values (1);
14
 
lock tables t1 write;
15
 
connection writer;
16
 
send update low_priority t1 set n = 4;
17
 
connection reader;
18
 
let $wait_condition=
19
 
  select count(*) = 1 from information_schema.processlist
20
 
  where state = "Table lock" and info = "update low_priority t1 set n = 4";
21
 
--source include/wait_condition.inc
22
 
send select n from t1;
23
 
connection locker;
24
 
let $wait_condition=
25
 
  select count(*) = 1 from information_schema.processlist
26
 
  where state = "Table lock" and info = "select n from t1";
27
 
--source include/wait_condition.inc
28
 
unlock tables;
29
 
connection writer;
30
 
reap;
31
 
connection reader;
32
 
reap;
33
 
drop table t1;
34
 
 
35
 
connection locker;
36
 
create table t1(n int);
37
 
insert into t1 values (1);
38
12
lock tables t1 read;
39
13
connection writer;
40
14
send update low_priority t1 set n = 4;