mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fix bug #13424 locking view with query cache enabled crashes server
For LOCK view is opened but not prepared thus leaving 'table' field set to NULL. invalidate_locked_for_write() wasn't checking that and call to invalidate_table(NULL) crashes server. To invalidate_locked_for_write() added check that ensures that table is completely opened.
This commit is contained in:
@@ -84,4 +84,16 @@ select * from v3;
|
||||
drop view v3;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #13424 locking view with query cache enabled crashes server
|
||||
#
|
||||
create table t1(f1 int);
|
||||
insert into t1 values(1),(2),(3);
|
||||
create view v1 as select * from t1;
|
||||
set query_cache_wlock_invalidate=1;
|
||||
lock tables v1 read /*!32311 local */;
|
||||
unlock tables;
|
||||
set query_cache_wlock_invalidate=default;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
set GLOBAL query_cache_size=default;
|
||||
|
||||
Reference in New Issue
Block a user