diff options
author | unknown <jimw@mysql.com> | 2005-04-29 08:46:03 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-04-29 08:46:03 -0700 |
commit | 65d0de3b7b294867292a49158456ee5d6b64ec62 (patch) | |
tree | 1131032e61953b3d7303f5fd2f4154ddc33a79a4 /mysql-test/t/query_cache.test | |
parent | 931389d5ac6855b0b7c17c0bb2bbae62d3e2f411 (diff) | |
parent | e7332e64ca5ef7208846488935a2249285212f91 (diff) | |
download | mariadb-git-65d0de3b7b294867292a49158456ee5d6b64ec62.tar.gz |
Manually resolve merge
mysql-test/r/query_cache.result:
Resolve merge
mysql-test/t/query_cache.test:
Resolve merge
Diffstat (limited to 'mysql-test/t/query_cache.test')
-rw-r--r-- | mysql-test/t/query_cache.test | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index ad36d8b425a..170f150f7aa 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -685,4 +685,49 @@ repair table t1; show status like 'qcache_queries_in_cache'; drop table t1; +# Bug #9549: Make sure cached queries that span more than one cache block +# are handled properly in the embedded server. + +# We just want a small query cache, so we can fragment it easily +set GLOBAL query_cache_size=64*1024; +# This actually gives us a usable cache size of about 48K + +# Each table is about 14K +create table t1 (a text); +insert into t1 values (repeat('abcdefghijklmnopqrstuvwxyz', 550)); +create table t2 (a text); +insert into t2 values (repeat('ijklmnopqrstuvwxyzabcdefgh', 550)); + +# Load a query from each table into the query cache +--disable_result_log +select a from t1; # Q1 +select a from t2; # Q2 +--enable_result_log +show status like 'Qcache_%_blocks'; + +# Now the cache looks like (14K for Q1)(14K for Q2)(20K free) + +# Flush Q1 from the cache by adding an out-of-order chunk to t1 +insert into t1 select reverse(a) from t1; +show status like 'Qcache_%_blocks'; + +# Now the cache looks like (14K free)(14K for Q2)(20K free) + +# Load our new data into the query cache +--disable_result_log +select a from t1; # Q3 +--enable_result_log +show status like 'Qcache_%_blocks'; + +# Now the cache should be like (14K for Q3)(14K for Q2)(14K for Q3)(6K free) + +# Note that Q3 is split across two chunks! + +# Load Q3 from the cache, and actually pay attention to the results +select a from t1; + +flush query cache; + +drop table t1, t2; + set GLOBAL query_cache_size=0; |