summaryrefslogtreecommitdiff
path: root/sql/net_serv.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-01-31 20:22:31 +0100
committerSergei Golubchik <serg@mariadb.org>2018-01-31 20:28:27 +0100
commitd6638586c6363fd7b914ea4d2d5e6276659e0e2a (patch)
tree5f97cd09cb7f83b49543490624a167155bccd386 /sql/net_serv.cc
parentf4414d4c4ea93b6803224735f971cd5b64ef71f7 (diff)
downloadmariadb-git-d6638586c6363fd7b914ea4d2d5e6276659e0e2a.tar.gz
don't crash debug builds on "packets out of order"
only do it in EXTRA_DEBUG builds
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r--sql/net_serv.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 90a5da6a927..225b6d9542e 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -58,9 +58,11 @@
#ifdef EXTRA_DEBUG
#define EXTRA_DEBUG_fprintf fprintf
#define EXTRA_DEBUG_fflush fflush
+#define EXTRA_DEBUG_ASSERT DBUG_ASSERT
#else
static void inline EXTRA_DEBUG_fprintf(...) {}
static int inline EXTRA_DEBUG_fflush(...) { return 0; }
+#define EXTRA_DEBUG_ASSERT(X) do {} while(0)
#endif
#ifdef MYSQL_SERVER
#define MYSQL_SERVER_my_error my_error
@@ -1071,7 +1073,7 @@ packets_out_of_order:
("Packets out of order (Found: %d, expected %u)",
(int) net->buff[net->where_b + 3],
net->pkt_nr));
- DBUG_ASSERT(0);
+ EXTRA_DEBUG_ASSERT(0);
/*
We don't make noise server side, since the client is expected
to break the protocol for e.g. --send LOAD DATA .. LOCAL where