1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-4520: Assertion `0' fails in Query_cache::end_of_result on concurrent drop event and event execution

If there is no net.vio then query cache cant't get data via net_real_write() so it is better just do not try to cache such query.
This commit is contained in:
unknown
2013-05-23 17:05:31 +03:00
parent 7ba2ff93ac
commit b9ce8572d9
5 changed files with 52 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
#
# MDEV-4520: Assertion `0' fails in Query_cache::end_of_result on
# concurrent drop event and event execution
#
set GLOBAL query_cache_size=1355776;
create user mysqltest1@localhost;
grant SELECT on test.* to mysqltest1@localhost;
create table t1 (a int);
# This explain put here to be sure that init connection query
# has 'Impossible WHERE'.
explain extended select * from test.t1 where 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost;
drop table t1;
set GLOBAL query_cache_size=default;

View File

@@ -0,0 +1 @@
--init_connect="select * from test.t1 where 0"

View File

@@ -0,0 +1,26 @@
-- source include/have_query_cache.inc
--echo #
--echo # MDEV-4520: Assertion `0' fails in Query_cache::end_of_result on
--echo # concurrent drop event and event execution
--echo #
set GLOBAL query_cache_size=1355776;
create user mysqltest1@localhost;
grant SELECT on test.* to mysqltest1@localhost;
create table t1 (a int);
connect (con1,localhost,mysqltest1,,);
connection con1;
--echo # This explain put here to be sure that init connection query
--echo # has 'Impossible WHERE'.
explain extended select * from test.t1 where 0;
connection default;
disconnect con1;
revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost;
drop table t1;
set GLOBAL query_cache_size=default;