mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
Cherry-pick Bug#33362 from mysql-5.1
This commit is contained in:
parent
dd85aa78ba
commit
14887bb2ab
3 changed files with 1729 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue