summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-02-01 20:33:04 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2022-02-01 20:33:04 +0100
commitcf63eecef44f189ce2d221612dee9dfc1885ba4e (patch)
tree93b4e6645a1d371bd8012a0aa8e6e3a3d541b2a6 /sql/protocol.cc
parentfb40a2fabf8d8cf765c83a0b8e609dd893c75ec3 (diff)
parentc04a203a10e282e1f33fd04d8a1b7ff0b076bce5 (diff)
downloadmariadb-git-cf63eecef44f189ce2d221612dee9dfc1885ba4e.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 18b41363a96..008ae13d9f0 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -466,8 +466,12 @@ bool Protocol::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);