summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5befcd6d503..0e3ca6a8c89 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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);
}