1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -4499,12 +4499,11 @@ Prepared_statement::reprepare()
TRUE, &cur_db_changed)))
return TRUE;
sql_mode_t save_sql_mode= thd->variables.sql_mode;
thd->variables.sql_mode= m_sql_mode;
Sql_mode_instant_set sms(thd, m_sql_mode);
error= ((name.str && copy.set_name(&name)) ||
copy.prepare(query(), query_length()) ||
validate_metadata(&copy));
thd->variables.sql_mode= save_sql_mode;
if (cur_db_changed)
mysql_change_db(thd, (LEX_CSTRING*) &saved_cur_db_name, TRUE);