1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Using more of Sql_mode_save. Adding a similar class for THD::abort_on_warnings.

This commit is contained in:
Alexander Barkov
2019-05-28 10:26:08 +04:00
parent c0cd662b98
commit d1d6fe9abf
17 changed files with 65 additions and 71 deletions

View File

@@ -1061,7 +1061,6 @@ Event_db_repository::load_named_event(THD *thd, const LEX_CSTRING *dbname,
Event_basic *etn)
{
bool ret;
ulonglong saved_mode= thd->variables.sql_mode;
Open_tables_backup open_tables_backup;
TABLE_LIST event_table;
@@ -1072,7 +1071,7 @@ Event_db_repository::load_named_event(THD *thd, const LEX_CSTRING *dbname,
event_table.init_one_table(&MYSQL_SCHEMA_NAME, &MYSQL_EVENT_NAME, 0, TL_READ);
/* Reset sql_mode during data dictionary operations. */
thd->variables.sql_mode= 0;
Sql_mode_instant_set sms(thd, 0);
/*
We don't use open_event_table() here to make sure that SHOW
@@ -1097,7 +1096,6 @@ Event_db_repository::load_named_event(THD *thd, const LEX_CSTRING *dbname,
close_system_tables(thd, &open_tables_backup);
}
thd->variables.sql_mode= saved_mode;
DBUG_RETURN(ret);
}