summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-07-02 16:44:53 +0300
committerunknown <sanja@askmonty.org>2013-07-02 16:44:53 +0300
commitb7b2a7ce81bf9d1bbcac9e0b3b0b19e271f2c276 (patch)
treed4a70b1087e35a4d2599bb8d2dda403a7cd54294 /sql
parent2fac162f391a4e3cac3f63767a01b7ec882592cb (diff)
downloadmariadb-git-b7b2a7ce81bf9d1bbcac9e0b3b0b19e271f2c276.tar.gz
Pull of revision 3313 (Pre-requisite patch for Bug#11763162 (55843 - Handled condition
appears as not handled) fixed.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_class.cc11
-rw-r--r--sql/sql_error.cc3
2 files changed, 10 insertions, 4 deletions
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);
}
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index e1c4fa5ee40..a52b9bf5a14 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -452,6 +452,9 @@ Diagnostics_area::set_error_status(uint sql_errno)
@param message SQL-condition message
@param sqlstate SQL-condition state
@param error_condition SQL-condition object representing the error state
+
+ @note Note, that error_condition may be NULL. It happens if a) OOM error is
+ being reported; or b) when Warning_info is full.
*/
void