summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2010-03-18 14:04:19 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2010-03-18 14:04:19 +0100
commitca086708bcae0a364a1babea45b74729d287449e (patch)
treeaa2a6ca95f131e1ffb4622a23c9700d8e5997e9d /sql/sql_base.cc
parent5196beed02b8bbd2758cd8c8ac11b6b0b711d390 (diff)
downloadmariadb-git-ca086708bcae0a364a1babea45b74729d287449e.tar.gz
Additional fix for DEBUG_SYNC which failed for some rpl-tests,
due to DBUG_ASSERT. (added in bug#50561) sql/sql_base.cc: DEBUG_SYNC asserts that thd->debug_sync_control is set.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 91794e061e4..61a8d5af815 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1244,7 +1244,12 @@ void close_thread_tables(THD *thd)
table->s->table_name.str, (long) table));
#endif
- DEBUG_SYNC(thd, "before_close_thread_tables");
+#if defined(ENABLED_DEBUG_SYNC)
+ /* debug_sync may not be initialized for some slave threads */
+ if (thd->debug_sync_control)
+ DEBUG_SYNC(thd, "before_close_thread_tables");
+#endif
+
/*
We are assuming here that thd->derived_tables contains ONLY derived
tables for this substatement. i.e. instead of approach which uses