From e218ac06ed3721e6b5496e1954fc9afd9d95cf24 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Wed, 30 Sep 2009 19:14:55 -0300 Subject: [PATCH] Post-merge fix: DBUG macros are wrapped inside a loop. sql/sql_parse.cc: DBUG macros are wrapped inside a loop. Allow to break the command switch from within a DBUG macro. --- sql/sql_parse.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 62cca71ee97..88e70a129c4 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2177,7 +2177,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, my_pthread_setspecific_ptr(THR_THD, thd); if (!res) send_ok(thd); - break; + goto end; } ); #endif @@ -2318,6 +2318,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd, my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0)); break; } + + /* Break the switch for DBUG wrapped code. */ +#ifndef DBUG_OFF +end: +#endif + if (thd->lock || thd->open_tables || thd->derived_tables || thd->prelocked_mode) {