2003-03-04 11:22:35 +01:00
|
|
|
drop table if exists t1,t2;
|
2001-10-08 06:24:04 +02:00
|
|
|
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;
|
2001-10-08 03:58:07 +02:00
|
|
|
n
|
|
|
|
4
|
2001-10-08 06:24:04 +02:00
|
|
|
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;
|
2001-10-08 03:58:07 +02:00
|
|
|
n
|
|
|
|
1
|
2001-10-08 06:24:04 +02:00
|
|
|
drop table t1;
|
2004-10-03 01:20:47 +02:00
|
|
|
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
|
2004-11-05 16:29:47 +01:00
|
|
|
2
|
2004-10-03 01:20:47 +02:00
|
|
|
drop table t1;
|
|
|
|
drop table t2;
|
2003-03-04 11:22:35 +01:00
|
|
|
create table t1 (a int);
|
|
|
|
create table t2 (a int);
|
|
|
|
lock table t1 write, t2 write;
|
|
|
|
insert t1 select * from t2;
|
|
|
|
drop table t2;
|
2003-06-04 17:28:51 +02:00
|
|
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
2003-03-04 11:22:35 +01:00
|
|
|
drop table t1;
|
2005-06-03 15:29:05 +02:00
|
|
|
create table t1(a int);
|
|
|
|
lock tables t1 write;
|
|
|
|
show columns from t1;
|
|
|
|
Field Type Null Key Default Extra
|
|
|
|
a int(11) YES NULL
|
|
|
|
unlock tables;
|
|
|
|
drop table t1;
|