2001-03-25 01:02:26 +02:00
|
|
|
connect (con1,localhost,root,,);
|
|
|
|
connect (con2,localhost,root,,);
|
2001-03-22 20:04:59 -07:00
|
|
|
connection con1;
|
|
|
|
drop table if exists t1;
|
2001-03-23 19:59:30 -07:00
|
|
|
create temporary table t1(n int not null primary key);
|
|
|
|
drop table if exists t2;
|
|
|
|
create table t2(n int);
|
|
|
|
insert into t2 values(3);
|
|
|
|
let $1=100;
|
|
|
|
while ($1)
|
|
|
|
{
|
|
|
|
connection con1;
|
|
|
|
send replace into t1 select n from t2;
|
|
|
|
connection con2;
|
|
|
|
send flush tables;
|
|
|
|
connection con1;
|
|
|
|
reap;
|
|
|
|
connection con2;
|
|
|
|
reap;
|
|
|
|
dec $1;
|
|
|
|
}
|
|
|
|
|
2001-03-22 20:04:59 -07:00
|
|
|
connection con1;
|
|
|
|
select * from t1;
|
2001-03-26 21:03:08 -07:00
|
|
|
connection con2;
|
|
|
|
flush tables with read lock;
|
|
|
|
--error 1099;
|
2001-03-23 19:59:30 -07:00
|
|
|
drop table t2;
|
2001-03-26 21:03:08 -07:00
|
|
|
connection con1;
|
|
|
|
send drop table t2;
|
|
|
|
connection con2;
|
|
|
|
unlock tables;
|
|
|
|
connection con1;
|
|
|
|
reap;
|
2001-06-01 17:43:32 -06:00
|
|
|
|
|
|
|
# test if dirty close releases global read lock
|
|
|
|
connection con1;
|
|
|
|
create table t1 (n int);
|
|
|
|
flush tables with read lock;
|
|
|
|
dirty_close con1;
|
|
|
|
connection con2;
|
|
|
|
insert into t1 values (345);
|
|
|
|
select * from t1;
|
|
|
|
drop table t1;
|