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 7696f28081d..79a6fd79d4c 100644 --- a/sql/thr_malloc.cc +++ b/sql/thr_malloc.cc @@ -24,8 +24,6 @@ extern "C" { void sql_alloc_error_handler(void) { - sql_print_error("%s", ER(ER_OUT_OF_RESOURCES)); - THD *thd= current_thd; if (thd) { @@ -53,6 +51,12 @@ extern "C" { NULL); } } + + /* 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)); + } } |