2004-08-20 16:35:23 +02:00
|
|
|
drop table if exists t1;
|
2004-08-20 22:54:42 +02:00
|
|
|
create table t1 (a int) engine=innodb;
|
2004-08-20 16:35:23 +02:00
|
|
|
begin;
|
|
|
|
insert into t1 values(1);
|
|
|
|
flush tables with read lock;
|
|
|
|
select * from t1;
|
|
|
|
a
|
2006-10-03 15:33:44 +02:00
|
|
|
commit;
|
2004-08-20 16:35:23 +02:00
|
|
|
select * from t1;
|
|
|
|
a
|
|
|
|
unlock tables;
|
|
|
|
begin;
|
|
|
|
select * from t1 for update;
|
|
|
|
a
|
|
|
|
1
|
|
|
|
begin;
|
2006-10-03 15:33:44 +02:00
|
|
|
select * from t1 for update;
|
|
|
|
flush tables with read lock;
|
2004-08-20 16:35:23 +02:00
|
|
|
commit;
|
|
|
|
a
|
|
|
|
1
|
|
|
|
unlock tables;
|
2004-11-30 22:20:52 +01:00
|
|
|
commit;
|
|
|
|
begin;
|
|
|
|
insert into t1 values(10);
|
|
|
|
flush tables with read lock;
|
|
|
|
commit;
|
|
|
|
unlock tables;
|
|
|
|
flush tables with read lock;
|
|
|
|
unlock tables;
|
2004-12-17 23:37:43 +01:00
|
|
|
begin;
|
|
|
|
select * from t1;
|
|
|
|
a
|
|
|
|
1
|
|
|
|
10
|
|
|
|
show create database test;
|
|
|
|
Database Create Database
|
|
|
|
test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
|
2004-08-20 16:35:23 +02:00
|
|
|
drop table t1;
|