diff options
Diffstat (limited to 'sql/thr_malloc.cc')
-rw-r--r-- | sql/thr_malloc.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/thr_malloc.cc b/sql/thr_malloc.cc index 83c4a8ee2a0..da0c25b54dd 100644 --- a/sql/thr_malloc.cc +++ b/sql/thr_malloc.cc @@ -21,8 +21,6 @@ extern "C" { void sql_alloc_error_handler(void) { - sql_print_error("%s", ER(ER_OUT_OF_RESOURCES)); - THD *thd= current_thd; if (thd) { @@ -49,6 +47,12 @@ extern "C" { ER(ER_OUT_OF_RESOURCES)); } } + + /* Skip writing to the error log to avoid mtr complaints */ + DBUG_EXECUTE_IF("simulate_out_of_memory", return;); + + sql_print_error("%s", ER(ER_OUT_OF_RESOURCES)); + } } |