diff options
author | Konstantin Osipov <kostja@sun.com> | 2010-03-10 17:35:25 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2010-03-10 17:35:25 +0300 |
commit | 7fe455a6bcbb2ba528bf77fc0f718b0c240895d0 (patch) | |
tree | b667012a42bba730f604b785006dda50d6c1bbdb /mysql-test/r/flush.result | |
parent | 366a68bb460fea577719335efcfac8e14f13a077 (diff) | |
download | mariadb-git-7fe455a6bcbb2ba528bf77fc0f718b0c240895d0.tar.gz |
A fix and a test case for Bug#51710 FLUSH TABLES <view> WITH READ
LOCK kills the server.
Prohibit FLUSH TABLES WITH READ LOCK application to views or
temporary tables.
Fix a subtle bug in the implementation when we actually
did not remove table share objects from the table cache after
acquiring exclusive locks.
mysql-test/r/flush.result:
Update results (Bug#51710)
mysql-test/t/flush.test:
Add a test case for Bug#51710.
sql/sql_parse.cc:
Fix Bug#51710 "FLUSH TABLES <view> WITH READ LOCK
killes the server.
Ensure we don't open views and temporary tables.
Fix a yet another bug in the implementation which
did not actually remove the tables from cache after acquiring
exclusive locks.
Diffstat (limited to 'mysql-test/r/flush.result')
-rw-r--r-- | mysql-test/r/flush.result | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result index fd23bfa0562..3702443d04a 100644 --- a/mysql-test/r/flush.result +++ b/mysql-test/r/flush.result @@ -207,3 +207,30 @@ insert into t2 (a) values (3); unlock tables; # --> connection con1 drop table t1, t2, t3; +# +# Bug#51710 FLUSH TABLES <view> WITH READ LOCK kills the server +# +drop view if exists v1, v2, v3; +drop table if exists t1, v1; +create table t1 (a int); +create view v1 as select 1; +create view v2 as select * from t1; +create view v3 as select * from v2; +flush table v1, v2, v3 with read lock; +ERROR HY000: 'test.v1' is not BASE TABLE +flush table v1 with read lock; +ERROR HY000: 'test.v1' is not BASE TABLE +flush table v2 with read lock; +ERROR HY000: 'test.v2' is not BASE TABLE +flush table v3 with read lock; +ERROR HY000: 'test.v3' is not BASE TABLE +create temporary table v1 (a int); +flush table v1 with read lock; +ERROR HY000: 'test.v1' is not BASE TABLE +drop view v1; +create table v1 (a int); +flush table v1 with read lock; +drop temporary table v1; +unlock tables; +drop view v2, v3; +drop table t1, v1; |