From abd3c202f6227a46f50c0d93cb621c9ed1e499c0 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Tue, 19 Feb 2019 19:20:16 +0400 Subject: [PATCH] Fixed build failure Apparently DBUG_ASSERT() can co-exist with DBUG_OFF when -DCMAKE_CXX_FLAGS="-DDBUG_ASSERT_AS_PRINTF". Removed assertion as it is useless now, since the type is unsigned. --- sql/sql_class.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 7ead7363bb1..88494f8c169 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2152,25 +2152,13 @@ extern "C" void my_message_sql(uint error, const char *str, myf MyFlags); It must be specified as a first base class of THD, so that increment is done before any other THD constructors and decrement - after any other THD destructors. + + Destructor unblocks close_conneciton() if there are no more THD's left. */ struct THD_count { THD_count() { thread_count++; } - - - /** - Decrements thread_count. - - Unblocks close_conneciton() if there are no more THD's left. - */ - ~THD_count() - { -#ifndef DBUG_OFF - uint32_t t= -#endif - thread_count--; - DBUG_ASSERT(t > 0); - } + ~THD_count() { thread_count--; } };