mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
sql_cache.cc, mysql_priv.h:
Query cache now takes in account character_set_results and collation_connection sql/mysql_priv.h: Query cache now takes in account character_set_results and collation_connection sql/sql_cache.cc: Query cache now takes in account character_set_results and collation_connection
This commit is contained in:
@ -325,7 +325,9 @@ typedef compare_func_creator (*chooser_compare_func_creator)(bool invert);
|
|||||||
struct Query_cache_query_flags
|
struct Query_cache_query_flags
|
||||||
{
|
{
|
||||||
unsigned int client_long_flag:1;
|
unsigned int client_long_flag:1;
|
||||||
uint charset_num;
|
uint character_set_client_num;
|
||||||
|
uint character_set_results_num;
|
||||||
|
uint collation_connection_num;
|
||||||
ha_rows limit;
|
ha_rows limit;
|
||||||
};
|
};
|
||||||
#define QUERY_CACHE_FLAGS_SIZE sizeof(Query_cache_query_flags)
|
#define QUERY_CACHE_FLAGS_SIZE sizeof(Query_cache_query_flags)
|
||||||
|
@ -770,7 +770,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
|||||||
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
|
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
|
||||||
flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
|
flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
|
||||||
1 : 0);
|
1 : 0);
|
||||||
flags.charset_num= thd->charset()->number;
|
flags.character_set_client_num= thd->variables.character_set_client->number;
|
||||||
|
flags.character_set_results_num= thd->variables.character_set_results->number;
|
||||||
|
flags.collation_connection_num= thd->variables.collation_connection->number;
|
||||||
flags.limit= thd->variables.select_limit;
|
flags.limit= thd->variables.select_limit;
|
||||||
STRUCT_LOCK(&structure_guard_mutex);
|
STRUCT_LOCK(&structure_guard_mutex);
|
||||||
|
|
||||||
@ -950,7 +952,9 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
|
|||||||
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
|
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
|
||||||
flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
|
flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
|
||||||
1 : 0);
|
1 : 0);
|
||||||
flags.charset_num= thd->charset()->number;
|
flags.character_set_client_num= thd->variables.character_set_client->number;
|
||||||
|
flags.character_set_results_num= thd->variables.character_set_results->number;
|
||||||
|
flags.collation_connection_num= thd->variables.collation_connection->number;
|
||||||
flags.limit= thd->variables.select_limit;
|
flags.limit= thd->variables.select_limit;
|
||||||
memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
|
memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)),
|
||||||
&flags, QUERY_CACHE_FLAGS_SIZE);
|
&flags, QUERY_CACHE_FLAGS_SIZE);
|
||||||
@ -3105,7 +3109,7 @@ void Query_cache::queries_dump()
|
|||||||
str[len]= 0; // make zero ending DB name
|
str[len]= 0; // make zero ending DB name
|
||||||
DBUG_PRINT("qcache", ("F:%u C:%u L:%lu (%u) '%s' '%s'",
|
DBUG_PRINT("qcache", ("F:%u C:%u L:%lu (%u) '%s' '%s'",
|
||||||
flags.client_long_flag,
|
flags.client_long_flag,
|
||||||
flags.charset_num, (ulong)flags.limit,
|
flags.character_set_client_num, (ulong)flags.limit,
|
||||||
len, str, strend(str)+1));
|
len, str, strend(str)+1));
|
||||||
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
|
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
|
||||||
(ulong) block->next, (ulong) block->prev,
|
(ulong) block->next, (ulong) block->prev,
|
||||||
|
Reference in New Issue
Block a user