From f6bd9fefa4b63dad51b2fb858e6058486499e4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 15 Apr 2019 12:07:48 +0300 Subject: [PATCH] Move assertion after error message Logging the internal state before the assertion makes it easier to figure out why the assertion failed in the first place. --- server/modules/protocol/MySQL/rwbackend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/rwbackend.cc b/server/modules/protocol/MySQL/rwbackend.cc index df1ed5f6d..4514b2e59 100644 --- a/server/modules/protocol/MySQL/rwbackend.cc +++ b/server/modules/protocol/MySQL/rwbackend.cc @@ -303,8 +303,8 @@ void RWBackend::process_packets(GWBUF* result) case REPLY_STATE_DONE: // This should never happen - mxb_assert(!true); MXS_ERROR("Unexpected result state. cmd: 0x%02hhx, len: %u", cmd, len); + mxb_assert(!true); break; case REPLY_STATE_RSET_COLDEF: