1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

store SERVER_MORE_RESULTS_EXISTS in key of query cache (BUG#6897)

mysql-test/r/query_cache.result:
  query in QC from normal execution and SP
mysql-test/t/query_cache.test:
  environment restoring fix
  layout fix
  query in QC from normal execution and SP
sql/mysql_priv.h:
  store SERVER_MORE_RESULTS_EXISTS
sql/sql_cache.cc:
  store SERVER_MORE_RESULTS_EXISTS in key of query cache
BitKeeper/etc/config:
  switching logging off
This commit is contained in:
unknown
2005-07-23 07:51:25 +03:00
parent 5ae1fd9d0d
commit cebe1b5db7
5 changed files with 163 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -616,6 +616,7 @@ set character_set_results=cp1251;
SELECT a,'<27>','<27>'='<27>' FROM t1;
show status like "Qcache_hits";
show status like "Qcache_queries_in_cache";
SET NAMES default;
DROP TABLE t1;
@ -711,9 +712,10 @@ 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
@ -755,6 +757,8 @@ select a from t1;
flush query cache;
drop table t1, t2;
set GLOBAL query_cache_size=1355776
#
# SP cursors and selects with query cache (BUG#9715)
@ -788,4 +792,43 @@ drop procedure p1//
drop table t1//
delimiter ;//
#
# query in QC from normal execution and SP (BUG#6897)
#
flush query cache;
reset query cache;
flush status;
delimiter //;
create table t1 (s1 int)//
create procedure f1 () begin
select sql_cache * from t1;
select sql_cache * from t1;
end;//
delimiter ;//
call f1();
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
call f1();
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
call f1();
select sql_cache * from t1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
insert into t1 values (1);
select sql_cache * from t1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
call f1();
call f1();
select sql_cache * from t1;
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
drop procedure f1;
drop table t1;
set GLOBAL query_cache_size=0;