From c8a2ff6f533f91f9a56e8a12cba2965ebfadcc87 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Oct 2005 15:07:47 +0200 Subject: Additional fix for BUG#7049, after review. Make sure "select" aborts when finding a SP condition handler beyond the current scope. mysql-test/r/sp.result: Updated test results after fixing error handling in select. sql/mysqld.cc: Make sure "select" aborts when finding a SP condition handler beyond the current scope. sql/protocol.cc: Make sure "select" aborts when finding a SP condition handler beyond the current scope. sql/sp_rcontext.h: Added method for checking if the handler was found in the current context. sql/sql_error.cc: Make sure "select" aborts when finding a SP condition handler beyond the current scope. --- sql/sql_error.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_error.cc') diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 2e262569386..191a6e0a1fd 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -144,6 +144,8 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, thd->really_abort_on_warning()) ? MYSQL_ERROR::WARN_LEVEL_ERROR : level)) { + if (! thd->spcont->found_handler_here()) + thd->net.report_error= 1; /* Make "select" abort correctly */ DBUG_RETURN(NULL); } query_cache_abort(&thd->net); -- cgit v1.2.1