summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-10-03 17:09:54 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-10-03 17:09:54 +0500
commit32ace686f31169ae116ade33396c230d22bac5db (patch)
tree16d6e83a744e591fda18c243c2f4cf91d748ffa6 /sql/sql_cache.cc
parent9a0b864a23d1d1a17e32e63a2089d67633a82957 (diff)
downloadmariadb-git-32ace686f31169ae116ade33396c230d22bac5db.tar.gz
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
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 07df0f51600..069887e689e 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -770,7 +770,9 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
bzero(&flags, QUERY_CACHE_FLAGS_SIZE);
flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
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;
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);
flags.client_long_flag= (thd->client_capabilities & CLIENT_LONG_FLAG ?
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;
memcpy((void *)(sql + (tot_length - 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
DBUG_PRINT("qcache", ("F:%u C:%u L:%lu (%u) '%s' '%s'",
flags.client_long_flag,
- flags.charset_num, (ulong)flags.limit,
+ flags.character_set_client_num, (ulong)flags.limit,
len, str, strend(str)+1));
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
(ulong) block->next, (ulong) block->prev,