mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user