summaryrefslogtreecommitdiff
path: root/mysql-test/r/lock_multi.result
blob: 9eedbf5006455c5d5f1bbaa71b0cd3933d76e8b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
drop table if exists t1,t2;
create table t1(n int);
insert into t1 values (1);
lock tables t1 write;
 update low_priority t1 set n = 4;
 select n from t1;
unlock tables;
n
4
drop table t1;
create table t1(n int);
insert into t1 values (1);
lock tables t1 read;
 update low_priority t1 set n = 4;
 select n from t1;
unlock tables;
n
1
drop table t1;
create table t1 (a int, b int);
create table t2 (c int, d int);
insert into t1 values(1,1);
insert into t1 values(2,2);
insert into t2 values(1,2);
lock table t1 read;
 update t1,t2 set c=a where b=d;
select c from t2;
c
2
drop table t1;
drop table t2;
create table t1 (a int);
create table t2 (a int);
lock table t1 write, t2 write;
 insert t1 select * from t2;
drop table t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;