summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-09-10 16:28:18 +0300
committerunknown <bell@sanja.is.com.ua>2004-09-10 16:28:18 +0300
commit32dc386d5e256dea2ef54efcd8de1dadc0328c44 (patch)
tree573d6d013fae80ebbea92e5e615b4368be394ec1 /sql/sql_cache.cc
parente2252a49f7393076107ee5e228be79660e7faecb (diff)
downloadmariadb-git-32dc386d5e256dea2ef54efcd8de1dadc0328c44.tar.gz
information about different variables agged to query cache (BUG#5515, BUG#5394)
mysql-test/r/query_cache.result: test of QC with different variables mysql-test/t/query_cache.test: test of QC with different variables sql/mysql_priv.h: new information for query key calculation sql/sql_cache.cc: new information for query key calculation sql/sql_cache.h: removed unused definitions
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 5fe21d79aa0..235558a759d 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -787,6 +787,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
thd->variables.collation_connection->number;
flags.limit= thd->variables.select_limit;
flags.time_zone= thd->variables.time_zone;
+ flags.sql_mode= thd->variables.sql_mode;
+ flags.max_sort_length= thd->variables.max_sort_length;
+ flags.group_concat_max_len= thd->variables.group_concat_max_len;
STRUCT_LOCK(&structure_guard_mutex);
if (query_cache_size == 0)
@@ -974,8 +977,11 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
flags.collation_connection_num= thd->variables.collation_connection->number;
flags.limit= thd->variables.select_limit;
flags.time_zone= thd->variables.time_zone;
+ flags.sql_mode= thd->variables.sql_mode;
+ flags.max_sort_length= thd->variables.max_sort_length;
+ flags.group_concat_max_len= thd->variables.group_concat_max_len;
memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
- &flags, QUERY_CACHE_FLAGS_SIZE);
+ &flags, QUERY_CACHE_FLAGS_SIZE);
query_block = (Query_cache_block *) hash_search(&queries, (byte*) sql,
tot_length);
/* Quick abort on unlocked data */