From 17245c4ce3ce9876f29fba5944e16645a4a49bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 18 Mar 2019 11:53:34 +0200 Subject: [PATCH] Fix false debug assertion Given the following query: PREPARE ps FROM 'PREPARE ps2 FROM \'SELECT 1\''; The debug assertion is hit even though this is valid, albeit unsupported, SQL. An optimization would be to ignore the query if the prepared statement type is another prepared statement. --- server/core/queryclassifier.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/core/queryclassifier.cc b/server/core/queryclassifier.cc index 2e3c2c7a2..8c5dd14fa 100644 --- a/server/core/queryclassifier.cc +++ b/server/core/queryclassifier.cc @@ -148,8 +148,6 @@ uint32_t get_prepare_type(GWBUF* buffer) } } - mxb_assert((type & (QUERY_TYPE_PREPARE_STMT | QUERY_TYPE_PREPARE_NAMED_STMT)) == 0); - return type; }