summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-11-23 19:40:47 +0100
committerSergei Golubchik <serg@mariadb.org>2020-11-25 22:19:59 +0100
commit00f54b56b1eca3e4daf737107dd9097d9634f9ac (patch)
tree16cb53938925139c960d3186bf620219efd33285 /sql/sp.cc
parent08b0b70daa43a539d911238e25998f7450bab9e6 (diff)
downloadmariadb-git-00f54b56b1eca3e4daf737107dd9097d9634f9ac.tar.gz
cleanup: RAII helper for changing thd->count_cuted_rows
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 93c1f13e0d6..98e94ac06cf 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1180,8 +1180,6 @@ Sp_handler::sp_create_routine(THD *thd, const sp_head *sp) const
CHARSET_INFO *db_cs= get_default_db_collation(thd, sp->m_db.str);
- enum_check_fields saved_count_cuted_fields;
-
bool store_failed= FALSE;
DBUG_ENTER("sp_create_routine");
DBUG_PRINT("enter", ("type: %s name: %.*s",
@@ -1215,8 +1213,7 @@ Sp_handler::sp_create_routine(THD *thd, const sp_head *sp) const
/* Reset sql_mode during data dictionary operations. */
thd->variables.sql_mode= 0;
- saved_count_cuted_fields= thd->count_cuted_fields;
- thd->count_cuted_fields= CHECK_FIELD_WARN;
+ Check_level_instant_set check_level_save(thd, CHECK_FIELD_WARN);
if (!(table= open_proc_table_for_update(thd)))
{
@@ -1476,7 +1473,6 @@ log:
ret= FALSE;
done:
- thd->count_cuted_fields= saved_count_cuted_fields;
thd->variables.sql_mode= saved_mode;
DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
DBUG_RETURN(ret);