1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

A follow up patch for WL#5000: add a test case

and a comment for the case when a connection
issuing FLUSH TABLES <list> WITH READ LOCK
has an open handler.
This commit is contained in:
Konstantin Osipov
2010-08-12 19:29:41 +04:00
parent 8673d2b20f
commit add2913a40
3 changed files with 59 additions and 0 deletions

View File

@@ -279,3 +279,28 @@ drop temporary table v1;
unlock tables;
drop view v2, v3;
drop table t1, v1;
#
# FLUSH TABLES <list> WITH READ LOCK and HANDLER
#
drop table if exists t1;
create table t1 (a int, key a (a));
insert into t1 (a) values (1), (2), (3);
handler t1 open;
handler t1 read a next;
a
1
handler t1 read a next;
a
2
flush tables t1 with read lock;
handler t1 read a next;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
#
# Sic: lost handler position.
#
handler t1 read a next;
a
1
handler t1 close;
drop table t1;