From b7b2a7ce81bf9d1bbcac9e0b3b0b19e271f2c276 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Jul 2013 16:44:53 +0300 Subject: Pull of revision 3313 (Pre-requisite patch for Bug#11763162 (55843 - Handled condition appears as not handled) fixed. --- sql/sql_class.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sql/sql_class.cc') diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 8a1c3e09c23..7aa4d703732 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1203,6 +1203,13 @@ Sql_condition* THD::raise_condition(uint sql_errno, if (handle_condition(sql_errno, sqlstate, level, msg, &cond)) DBUG_RETURN(cond); + /* When simulating OOM, skip writing to error log to avoid mtr errors. */ + cond= DBUG_EVALUATE_IF( + "simulate_out_of_memory", + NULL, + da->push_warning(this, sql_errno, sqlstate, level, msg)); + + if (level == Sql_condition::WARN_LEVEL_ERROR) { is_slave_error= 1; // needed to catch query errors during replication @@ -1216,10 +1223,6 @@ Sql_condition* THD::raise_condition(uint sql_errno, query_cache_abort(&query_cache_tls); - /* When simulating OOM, skip writing to error log to avoid mtr errors */ - DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_RETURN(NULL);); - - da->push_warning(this, sql_errno, sqlstate, level, msg); DBUG_RETURN(cond); } -- cgit v1.2.1