diff options
author | unknown <jimw@mysql.com> | 2005-01-18 15:59:39 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-01-18 15:59:39 -0800 |
commit | 395137e1b209ef5542a482274691959101d0a72a (patch) | |
tree | 55383eee2e0fcc67b3beb63a6b1dab1daeeea8ad | |
parent | d2778647ae0679dff623a20419c302bad551e9aa (diff) | |
download | mariadb-git-395137e1b209ef5542a482274691959101d0a72a.tar.gz |
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
-rw-r--r-- | sql/mysql_priv.h | 1 | ||||
-rw-r--r-- | sql/sql_cache.cc | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 4b785aafc5f..314c6928c1c 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -377,6 +377,7 @@ Item *negate_expression(THD *thd, Item *expr); struct Query_cache_query_flags { unsigned int client_long_flag:1; + unsigned int client_protocol_41:1; uint character_set_client_num; uint character_set_results_num; uint collation_connection_num; 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 ? |