summaryrefslogtreecommitdiff
path: root/sql/thr_malloc.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 17:48:24 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 17:48:24 +0400
commitf84b3f5c21c62ebe3b489250a09aca0ffde1313c (patch)
treebad36a3866fc1f57ed09d6de5a590fa2e12bacfe /sql/thr_malloc.cc
parent26a034959299cb72d04d92ab330dfb83ef6082a6 (diff)
parente5cf56ef80391caca2f06b34fc1de1313196e91f (diff)
downloadmariadb-git-f84b3f5c21c62ebe3b489250a09aca0ffde1313c.tar.gz
Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.
conflicts: conflict mysys/safemalloc.c conflict sql/mysqld.cc conflict sql/sp.cc conflict sql/sql_lex.cc conflict sql/sql_lex.h conflict sql/sql_parse.cc conflict sql/sql_prepare.cc
Diffstat (limited to 'sql/thr_malloc.cc')
-rw-r--r--sql/thr_malloc.cc8
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));
+
}
}