diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-08-04 11:02:13 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-08-09 18:31:43 +0200 |
commit | 067ee84d67247209f83805366f59791a9ac074b2 (patch) | |
tree | 43c47df0a33277bcaead03921507e1eb76df5bf6 /sql | |
parent | 86f9b7714791f45f386e9aaa6f469ada626cd69d (diff) | |
download | mariadb-git-067ee84d67247209f83805366f59791a9ac074b2.tar.gz |
MDEV-13300 Query cache doesn't take in account CLIENT_DEPRECATE_EOF capability
take into account new capabilty flag which has influence on result format.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_cache.cc | 10 | ||||
-rw-r--r-- | sql/sql_cache.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 18a75dd9024..ba4e4de937f 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1413,6 +1413,8 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG); flags.client_protocol_41= MY_TEST(thd->client_capabilities & CLIENT_PROTOCOL_41); + flags.client_depr_eof= MY_TEST(thd->client_capabilities & + CLIENT_DEPRECATE_EOF); /* Protocol influences result format, so statement results in the binary protocol (COM_EXECUTE) cannot be served to statements asking for results @@ -1443,12 +1445,13 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.div_precision_increment= thd->variables.div_precincrement; flags.default_week_format= thd->variables.default_week_format; DBUG_PRINT("qcache", ("\ -long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \ +long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ def_week_frmt: %lu, in_trans: %d, autocommit: %d", (int)flags.client_long_flag, (int)flags.client_protocol_41, + (int)flags.client_depr_eof, (int)flags.protocol_type, (int)flags.more_results_exists, flags.pkt_nr, @@ -1917,6 +1920,8 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length) flags.client_long_flag= MY_TEST(thd->client_capabilities & CLIENT_LONG_FLAG); flags.client_protocol_41= MY_TEST(thd->client_capabilities & CLIENT_PROTOCOL_41); + flags.client_depr_eof= MY_TEST(thd->client_capabilities & + CLIENT_DEPRECATE_EOF); flags.protocol_type= (unsigned int) thd->protocol->type(); flags.more_results_exists= MY_TEST(thd->server_status & SERVER_MORE_RESULTS_EXISTS); @@ -1938,12 +1943,13 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length) flags.default_week_format= thd->variables.default_week_format; flags.lc_time_names= thd->variables.lc_time_names; DBUG_PRINT("qcache", ("\ -long %d, 4.1: %d, bin_proto: %d, more results %d, pkt_nr: %d, \ +long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ def_week_frmt: %lu, in_trans: %d, autocommit: %d", (int)flags.client_long_flag, (int)flags.client_protocol_41, + (int)flags.client_depr_eof, (int)flags.protocol_type, (int)flags.more_results_exists, flags.pkt_nr, diff --git a/sql/sql_cache.h b/sql/sql_cache.h index 945de307ffb..6b8bf0b2d05 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -545,6 +545,7 @@ struct Query_cache_query_flags { unsigned int client_long_flag:1; unsigned int client_protocol_41:1; + unsigned int client_depr_eof:1; unsigned int protocol_type:2; unsigned int more_results_exists:1; unsigned int in_trans:1; |