1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch 'github/10.1' into 10.2

This commit is contained in:
Sergei Golubchik
2018-02-06 14:50:50 +01:00
466 changed files with 9366 additions and 3618 deletions

View File

@ -1357,11 +1357,12 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
List_iterator_fast<LEX_STRING> it_connection_cl_name(trigger_list->connection_cl_names);
List_iterator_fast<LEX_STRING> it_db_cl_name(trigger_list->db_cl_names);
List_iterator_fast<ulonglong> it_create_times(trigger_list->create_times);
LEX *old_lex= thd->lex, lex;
LEX *old_lex= thd->lex, *old_stmt_lex= thd->stmt_lex;
LEX lex;
sp_rcontext *save_spcont= thd->spcont;
sql_mode_t save_sql_mode= thd->variables.sql_mode;
thd->lex= &lex;
thd->lex= thd->stmt_lex= &lex;
save_db.str= thd->db;
save_db.length= thd->db_length;
@ -1579,6 +1580,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
}
thd->reset_db(save_db.str, save_db.length);
thd->lex= old_lex;
thd->stmt_lex= old_stmt_lex;
thd->spcont= save_spcont;
thd->variables.sql_mode= save_sql_mode;
@ -1592,6 +1594,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
err_with_lex_cleanup:
lex_end(&lex);
thd->lex= old_lex;
thd->stmt_lex= old_stmt_lex;
thd->spcont= save_spcont;
thd->variables.sql_mode= save_sql_mode;
thd->reset_db(save_db.str, save_db.length);