diff options
author | unknown <thek@adventure.(none)> | 2007-05-08 11:24:07 +0200 |
---|---|---|
committer | unknown <thek@adventure.(none)> | 2007-05-08 11:24:07 +0200 |
commit | 2c3a4641077264b54f894782170ba58129ee547f (patch) | |
tree | aed0bdd6b0644b860e30dbbe021221fe804abe48 /sql/sql_cache.cc | |
parent | 625c2b1de2049b117c003453e41693a156f35255 (diff) | |
download | mariadb-git-2c3a4641077264b54f894782170ba58129ee547f.tar.gz |
4.1 -> 5.0 Manual merge for Bug #27792
mysql-test/r/query_cache.result:
Added 5.0 testcase
mysql-test/t/query_cache.test:
Added 5.0 test case
sql/mysql_priv.h:
Added support for div_precision_increment
sql/set_var.cc:
- Added query cache flush when system variable ft_boolean_syntax is
updated since this also invalidates all cached result sets using this
variable.
sql/sql_cache.cc:
- Added the local system variable div_precision_increment as an identification flag
for cached queries.
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 795711b34d8..96a8dc577df 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -865,10 +865,12 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.max_sort_length= thd->variables.max_sort_length; flags.lc_time_names= thd->variables.lc_time_names; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.div_precision_increment= thd->variables.div_precincrement; + flags.default_week_format= thd->variables.default_week_format; DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ -sql mode: 0x%lx, sort len: %lu, conncat len: %lu", - (int)flags.client_long_flag, +sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ +def_week_frmt: %lu", (int)flags.client_protocol_41, (int)flags.more_results_exists, flags.pkt_nr, @@ -879,7 +881,9 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu", (ulong) flags.time_zone, flags.sql_mode, flags.max_sort_length, - flags.group_concat_max_len)); + flags.group_concat_max_len, + flags.div_precision_increment, + flags.default_week_format)); /* Make InnoDB to release the adaptive hash index latch before acquiring the query cache mutex. @@ -1107,10 +1111,13 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) 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; + flags.div_precision_increment= thd->variables.div_precincrement; + flags.default_week_format= thd->variables.default_week_format; flags.lc_time_names= thd->variables.lc_time_names; DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ -sql mode: 0x%lx, sort len: %lu, conncat len: %lu", +sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ +def_week_frmt: %lu", (int)flags.client_long_flag, (int)flags.client_protocol_41, (int)flags.more_results_exists, @@ -1122,7 +1129,9 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu", (ulong) flags.time_zone, flags.sql_mode, flags.max_sort_length, - flags.group_concat_max_len)); + flags.group_concat_max_len, + flags.div_precision_increment, + flags.default_week_format)); memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), &flags, QUERY_CACHE_FLAGS_SIZE); query_block = (Query_cache_block *) hash_search(&queries, (byte*) sql, |