mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
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
This commit is contained in:
parent
d2778647ae
commit
395137e1b2
2 changed files with 5 additions and 0 deletions
|
|
@ -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 ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue