summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-01-18 15:59:39 -0800
committerjimw@mysql.com <>2005-01-18 15:59:39 -0800
commitaa414896f00f6e24261dffec507162902244eb3a (patch)
tree55383eee2e0fcc67b3beb63a6b1dab1daeeea8ad /sql/sql_cache.cc
parent06f60f6d659c681de6b17bc8a887e03d85bc8110 (diff)
downloadmariadb-git-aa414896f00f6e24261dffec507162902244eb3a.tar.gz
Fix query cache to not respond to old clients with a 4.1-protocol
response. (Bug #6511)
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc4
1 files changed, 4 insertions, 0 deletions
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 ?