Loading mysql-test/r/query_cache_merge.result +1672 −0 File changed.Preview size limit exceeded, changes collapsed. Show changes mysql-test/t/query_cache_merge.test +56 −0 Original line number Diff line number Diff line Loading @@ -38,3 +38,59 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t2 SET @@global.query_cache_size=0; # End of 4.1 tests # # Bug#33362: Query cache invalidation (truncate) may hang if cached query uses many tables # let $c= 255; while ($c) { eval CREATE TABLE t$c (a INT); eval INSERT INTO t$c VALUES ($c); dec $c; } let $c= 254; let $str= t255; while ($c) { let $str= t$c,$str; dec $c; } eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str); SET GLOBAL query_cache_size = 1048576; FLUSH STATUS; SELECT a FROM t0 WHERE a = 1; SHOW STATUS LIKE "Qcache_queries_in_cache"; let $c= 255; let $i= 1; FLUSH TABLES; while ($c) { eval TRUNCATE TABLE t$c; eval SELECT a FROM t$i; dec $c; inc $i; } SELECT a FROM t0; DROP TABLE t0; let $c= 255; while ($c) { eval DROP TABLE t$c; dec $c; } SET @@global.query_cache_size = 0; --echo End of 5.1 tests sql/sql_cache.cc +1 −1 Original line number Diff line number Diff line Loading @@ -2516,7 +2516,7 @@ my_bool Query_cache::register_all_tables(Query_cache_block *block, tmp++) unlink_table(tmp); } return (n); return test(n); } /* Loading Loading
mysql-test/r/query_cache_merge.result +1672 −0 File changed.Preview size limit exceeded, changes collapsed. Show changes
mysql-test/t/query_cache_merge.test +56 −0 Original line number Diff line number Diff line Loading @@ -38,3 +38,59 @@ drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t2 SET @@global.query_cache_size=0; # End of 4.1 tests # # Bug#33362: Query cache invalidation (truncate) may hang if cached query uses many tables # let $c= 255; while ($c) { eval CREATE TABLE t$c (a INT); eval INSERT INTO t$c VALUES ($c); dec $c; } let $c= 254; let $str= t255; while ($c) { let $str= t$c,$str; dec $c; } eval CREATE TABLE t0 (a INT) ENGINE=MERGE UNION($str); SET GLOBAL query_cache_size = 1048576; FLUSH STATUS; SELECT a FROM t0 WHERE a = 1; SHOW STATUS LIKE "Qcache_queries_in_cache"; let $c= 255; let $i= 1; FLUSH TABLES; while ($c) { eval TRUNCATE TABLE t$c; eval SELECT a FROM t$i; dec $c; inc $i; } SELECT a FROM t0; DROP TABLE t0; let $c= 255; while ($c) { eval DROP TABLE t$c; dec $c; } SET @@global.query_cache_size = 0; --echo End of 5.1 tests
sql/sql_cache.cc +1 −1 Original line number Diff line number Diff line Loading @@ -2516,7 +2516,7 @@ my_bool Query_cache::register_all_tables(Query_cache_block *block, tmp++) unlink_table(tmp); } return (n); return test(n); } /* Loading