summaryrefslogtreecommitdiff
path: root/sql/sql_error.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_error.cc')
-rw-r--r--sql/sql_error.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index a11a0f454a2..e6dcfed0412 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -744,7 +744,7 @@ void push_warning_printf(THD *thd, Sql_condition::enum_warning_level level,
DBUG_ASSERT(format != NULL);
va_start(args,format);
- my_vsnprintf_ex(&my_charset_utf8_general_ci, warning,
+ my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, warning,
sizeof(warning), format, args);
va_end(args);
push_warning(thd, level, code, warning);
@@ -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();
+}