summaryrefslogtreecommitdiff
path: root/sql/sql_error.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r--sql/sql_error.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index 2fb16a49c2b..e1c4fa5ee40 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -327,8 +327,9 @@ Diagnostics_area::Diagnostics_area(bool initialize)
}
Diagnostics_area::Diagnostics_area(ulonglong warning_info_id,
- bool allow_unlimited_warnings)
- : m_main_wi(warning_info_id, allow_unlimited_warnings, true)
+ bool allow_unlimited_warnings,
+ bool initialize)
+ : m_main_wi(warning_info_id, allow_unlimited_warnings, initialize)
{
push_warning_info(&m_main_wi);
@@ -527,6 +528,7 @@ Warning_info::Warning_info(ulonglong warn_id_arg,
void Warning_info::init()
{
/* Initialize sub structures */
+ DBUG_ASSERT(initialized == 0);
init_sql_alloc(&m_warn_root, WARN_ALLOC_BLOCK_SIZE,
WARN_ALLOC_PREALLOC_SIZE, MYF(MY_THREAD_SPECIFIC));
initialized= 1;