1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-11 05:52:26 +03:00

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.
This commit is contained in:
unknown
2005-10-17 15:07:47 +02:00
parent c41dc78dbc
commit c8a2ff6f53
5 changed files with 15 additions and 2 deletions

View File

@@ -2342,6 +2342,8 @@ static int my_message_sql(uint error, const char *str, myf MyFlags)
if (thd->spcont &&
thd->spcont->find_handler(error, MYSQL_ERROR::WARN_LEVEL_ERROR))
{
if (! thd->spcont->found_handler_here())
thd->net.report_error= 1; /* Make "select" abort correctly */
DBUG_RETURN(0);
}