From 395137e1b209ef5542a482274691959101d0a72a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Jan 2005 15:59:39 -0800 Subject: Fix query cache to not respond to old clients with a 4.1-protocol response. (Bug #6511) sql/mysql_priv.h: Add bit for storing client protocol info sql/sql_cache.cc: Record whether 4.1 or old protocol is used for query --- sql/sql_cache.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/sql_cache.cc') diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index bd42a2c1720..8491457179f 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -776,6 +776,8 @@ 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.client_protocol_41= (thd->client_capabilities & CLIENT_PROTOCOL_41 ? + 1 : 0); flags.character_set_client_num= thd->variables.character_set_client->number; flags.character_set_results_num= @@ -968,6 +970,8 @@ 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.client_protocol_41= (thd->client_capabilities & CLIENT_PROTOCOL_41 ? + 1 : 0); flags.character_set_client_num= thd->variables.character_set_client->number; flags.character_set_results_num= (thd->variables.character_set_results ? -- cgit v1.2.1