From a179de04025443032745ee811a97d8da7afe8996 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 6 Jul 2019 11:09:06 +0400 Subject: MDEV-19991 Turn I_S tables GEOMETRY_COLUMNS and SPATIAL_REF_SYS into a plugin --- sql/sql_error.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sql/sql_error.cc') diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 9f541c775fa..e6dcfed0412 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -1009,3 +1009,13 @@ bool is_sqlstate_valid(const LEX_CSTRING *sqlstate) return true; } + + +void convert_error_to_warning(THD *thd) +{ + DBUG_ASSERT(thd->is_error()); + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, + thd->get_stmt_da()->sql_errno(), + thd->get_stmt_da()->message()); + thd->clear_error(); +} -- cgit v1.2.1