diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-27 08:45:36 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-27 08:45:36 +0100 |
commit | 9b4a179d69a1c795bef303a88f9d3195669f00ec (patch) | |
tree | 87811d81af231e2945468ead0cba58cfc5514548 /sql/protocol.cc | |
parent | 020dc54dabe64f238e8ef4f50a630a22e0f06949 (diff) | |
parent | 7db489fc7dea2b4c236807035e57f169074c6682 (diff) | |
download | mariadb-git-10.3-merge.tar.gz |
Merge branch '10.2' into bb-10.3-release10.3-merge
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index a4a70e71fa3..405b50f4971 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -467,8 +467,12 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err, coming from server to have seq_no > 0, due to missing awareness of "out-of-band" operations. Make these clients happy. */ - if (!net->pkt_nr) - net->pkt_nr= 1; + if (!net->pkt_nr && + (sql_errno == ER_CONNECTION_KILLED || sql_errno == ER_SERVER_SHUTDOWN || + sql_errno == ER_QUERY_INTERRUPTED)) + { + net->pkt_nr= 1; + } ret= net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) buff, length); |