summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-08-04 11:02:13 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2017-08-04 11:02:13 +0200
commitccca8487b708fae5320c295938e8266860d81281 (patch)
treec2da19c74616d11df73e3499cb4891ab71883219
parentbcc10a5a447805ce64aa13ee6a037c1618219616 (diff)
downloadmariadb-git-bb-10.2-MDEV-13300.tar.gz
MDEV-13300 Query cache doesn't take in account CLIENT_DEPRECATE_EOF capabilitybb-10.2-MDEV-13300
take into account new capabilty flag which has influence on result format.
-rw-r--r--sql/sql_cache.cc10
-rw-r--r--sql/sql_cache.h1
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;