-- source include/have_query_cache.inc # # Tests with query cache # set GLOBAL query_cache_size=1355776; --disable_query_log # Reset query cache variables. flush query cache; # This crashed in some versions flush query cache; # This crashed in some versions reset query cache; flush status; create table t1 (a int not null); insert into t1 values (1),(2),(3); create table t2 (a int not null); insert into t2 values (4),(5),(6); insert into t1 select * from t2; # 2 insert into t2 select * from t1; # 3 insert into t1 select * from t2; # 5 insert into t2 select * from t1; # 8 insert into t1 select * from t2; # 13 insert into t2 select * from t1; # 21 insert into t1 select * from t2; # 34 insert into t2 select * from t1; # 55 insert into t1 select * from t2; # 89 insert into t2 select * from t1; # 144 insert into t1 select * from t2; # 233 insert into t2 select * from t1; # 357 insert into t1 select * from t2; # 610 insert into t2 select * from t1; # 987 insert into t1 select * from t2; # 1597 insert into t2 select * from t1; # 2584 insert into t1 select * from t2; # 4181 show status like 'Qcache%'; --disable_result_log select * from t1; select * from t2; select * from t1 limit 10; select * from t2 limit 10; select * from t1 limit 100; select * from t2 limit 100; select * from t1 limit 1000; select * from t2 limit 1000; select * from t1 order by a limit 10; select * from t2 order by a limit 10; select * from t1 order by a limit 100; select * from t2 order by a limit 100; select * from t1 order by a limit 1000; select * from t2 order by a limit 1000; select * from t1 where a=1 order by a limit 10; select * from t2 where a=1 order by a limit 10; select * from t1 where a=1 order by a limit 100; select * from t2 where a=1 order by a limit 100; select * from t1 where a=1 order by a limit 1000; select * from t2 where a=1 order by a limit 1000; select * from t1 where a=2 order by a limit 10; select * from t2 where a=2 order by a limit 10; select * from t1 where a=2 order by a limit 100; select * from t2 where a=2 order by a limit 100; select * from t1 where a=2 order by a limit 1000; select * from t2 where a=2 order by a limit 1000; select * from t1 where a=3 order by a limit 10; select * from t2 where a=3 order by a limit 10; select * from t1 where a=3 order by a limit 100; select * from t2 where a=3 order by a limit 100; select * from t1 where a=3 order by a limit 1000; select * from t2 where a=3 order by a limit 1000; select * from t1 where a=4 order by a limit 10; select * from t2 where a=4 order by a limit 10; select * from t1 where a=4 order by a limit 100; select * from t2 where a=4 order by a limit 100; select * from t1 where a=4 order by a limit 1000; select * from t2 where a=4 order by a limit 1000; select * from t1 where a=5 order by a limit 10; select * from t2 where a=5 order by a limit 10; select * from t1 where a=5 order by a limit 100; select * from t2 where a=5 order by a limit 100; select * from t1 where a=5 order by a limit 1000; select * from t2 where a=5 order by a limit 1000; select * from t1 where a=6 order by a limit 10; select * from t2 where a=6 order by a limit 10; select * from t1 where a=6 order by a limit 100; select * from t2 where a=6 order by a limit 100; select * from t1 where a=6 order by a limit 1000; select * from t2 where a=6 order by a limit 1000; select * from t1 where a=1 limit 10; select * from t2 where a=1 limit 10; select * from t1 where a=1 limit 100; select * from t2 where a=1 limit 100; select * from t1 where a=1 limit 1000; select * from t2 where a=1 limit 1000; select * from t1 where a=2 limit 10; select * from t2 where a=2 limit 10; select * from t1 where a=2 limit 100; select * from t2 where a=2 limit 100; select * from t1 where a=2 limit 1000; select * from t2 where a=2 limit 1000; select * from t1 where a=3 limit 10; select * from t2 where a=3 limit 10; select * from t1 where a=3 limit 100; select * from t2 where a=3 limit 100; select * from t1 where a=3 limit 1000; select * from t2 where a=3 limit 1000; select * from t1 where a=4 limit 10; select * from t2 where a=4 limit 10; select * from t1 where a=4 limit 100; select * from t2 where a=4 limit 100; select * from t1 where a=4 limit 1000; select * from t2 where a=4 limit 1000; select * from t1 where a=5 limit 10; select * from t2 where a=5 limit 10; select * from t1 where a=5 limit 100; select * from t2 where a=5 limit 100; select * from t1 where a=5 limit 1000; select * from t2 where a=5 limit 1000; select * from t1 where a=6 limit 10; select * from t2 where a=6 limit 10; select * from t1 where a=6 limit 100; select * from t2 where a=6 limit 100; select * from t1 where a=6 limit 1000; select * from t2 where a=6 limit 1000; select * from t1 where a=1; select * from t2 where a=1; select * from t1 where a=1; select * from t2 where a=1; select * from t1 where a=1; select * from t2 where a=1; select * from t1 where a=2; select * from t2 where a=2; select * from t1 where a=2; select * from t2 where a=2; select * from t1 where a=2; select * from t2 where a=2; select * from t1 where a=3; select * from t2 where a=3; select * from t1 where a=3; select * from t2 where a=3; select * from t1 where a=3; select * from t2 where a=3; select * from t1 where a=4; select * from t2 where a=4; select * from t1 where a=4; select * from t2 where a=4; select * from t1 where a=4; select * from t2 where a=4; select * from t1 where a=5; select * from t2 where a=5; select * from t1 where a=5; select * from t2 where a=5; select * from t1 where a=5; select * from t2 where a=5; select * from t1 where a=6; select * from t2 where a=6; select * from t1 where a=6; select * from t2 where a=6; select * from t1 where a=6; select * from t2 where a=6; select a from t1; select a from t2; select a from t1 limit 10; select a from t2 limit 10; select a from t1 limit 100; select a from t2 limit 100; select a from t1 limit 1000; select a from t2 limit 1000; select a from t1 order by a limit 10; select a from t2 order by a limit 10; select a from t1 order by a limit 100; select a from t2 order by a limit 100; select a from t1 order by a limit 1000; select a from t2 order by a limit 1000; select a from t1 where a=1 order by a limit 10; select a from t2 where a=1 order by a limit 10; select a from t1 where a=1 order by a limit 100; select a from t2 where a=1 order by a limit 100; select a from t1 where a=1 order by a limit 1000; select a from t2 where a=1 order by a limit 1000; select a from t1 where a=2 order by a limit 10; select a from t2 where a=2 order by a limit 10; select a from t1 where a=2 order by a limit 100; select a from t2 where a=2 order by a limit 100; select a from t1 where a=2 order by a limit 1000; select a from t2 where a=2 order by a limit 1000; select a from t1 where a=3 order by a limit 10; select a from t2 where a=3 order by a limit 10; select a from t1 where a=3 order by a limit 100; select a from t2 where a=3 order by a limit 100; select a from t1 where a=3 order by a limit 1000; select a from t2 where a=3 order by a limit 1000; select a from t1 where a=4 order by a limit 10; select a from t2 where a=4 order by a limit 10; select a from t1 where a=4 order by a limit 100; select a from t2 where a=4 order by a limit 100; select a from t1 where a=4 order by a limit 1000; select a from t2 where a=4 order by a limit 1000; select a from t1 where a=5 order by a limit 10; select a from t2 where a=5 order by a limit 10; select a from t1 where a=5 order by a limit 100; select a from t2 where a=5 order by a limit 100; select a from t1 where a=5 order by a limit 1000; select a from t2 where a=5 order by a limit 1000; select a from t1 where a=6 order by a limit 10; select a from t2 where a=6 order by a limit 10; select a from t1 where a=6 order by a limit 100; select a from t2 where a=6 order by a limit 100; select a from t1 where a=6 order by a limit 1000; select a from t2 where a=6 order by a limit 1000; select a from t1 where a=1 limit 10; select a from t2 where a=1 limit 10; select a from t1 where a=1 limit 100; select a from t2 where a=1 limit 100; select a from t1 where a=1 limit 1000; select a from t2 where a=1 limit 1000; select a from t1 where a=2 limit 10; select a from t2 where a=2 limit 10; select a from t1 where a=2 limit 100; select a from t2 where a=2 limit 100; select a from t1 where a=2 limit 1000; select a from t2 where a=2 limit 1000; select a from t1 where a=3 limit 10; select a from t2 where a=3 limit 10; select a from t1 where a=3 limit 100; select a from t2 where a=3 limit 100; select a from t1 where a=3 limit 1000; select a from t2 where a=3 limit 1000; select a from t1 where a=4 limit 10; select a from t2 where a=4 limit 10; select a from t1 where a=4 limit 100; select a from t2 where a=4 limit 100; select a from t1 where a=4 limit 1000; select a from t2 where a=4 limit 1000; select a from t1 where a=5 limit 10; select a from t2 where a=5 limit 10; select a from t1 where a=5 limit 100; select a from t2 where a=5 limit 100; select a from t1 where a=5 limit 1000; select a from t2 where a=5 limit 1000; select a from t1 where a=6 limit 10; select a from t2 where a=6 limit 10; select a from t1 where a=6 limit 100; select a from t2 where a=6 limit 100; select a from t1 where a=6 limit 1000; select a from t2 where a=6 limit 1000; select a from t1 where a=1; select a from t2 where a=1; select a from t1 where a=1; select a from t2 where a=1; select a from t1 where a=1; select a from t2 where a=1; select a from t1 where a=2; select a from t2 where a=2; select a from t1 where a=2; select a from t2 where a=2; select a from t1 where a=2; select a from t2 where a=2; select a from t1 where a=3; select a from t2 where a=3; select a from t1 where a=3; select a from t2 where a=3; select a from t1 where a=3; select a from t2 where a=3; select a from t1 where a=4; select a from t2 where a=4; select a from t1 where a=4; select a from t2 where a=4; select a from t1 where a=4; select a from t2 where a=4; select a from t1 where a=5; select a from t2 where a=5; select a from t1 where a=5; select a from t2 where a=5; select a from t1 where a=5; select a from t2 where a=5; select a from t1 where a=6; select a from t2 where a=6; select a from t1 where a=6; select a from t2 where a=6; select a from t1 where a=6; select a from t2 where a=6; --enable_result_log --enable_query_log show status like 'Qcache%'; connect (addconroot,localhost,root,,); connection addconroot; --send update t1 set a=22 where a=2; connection default; show processlist; show status like 'Qcache%';