diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-02-01 20:33:04 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-02-01 20:33:04 +0100 |
commit | cf63eecef44f189ce2d221612dee9dfc1885ba4e (patch) | |
tree | 93b4e6645a1d371bd8012a0aa8e6e3a3d541b2a6 /sql/sql_base.cc | |
parent | fb40a2fabf8d8cf765c83a0b8e609dd893c75ec3 (diff) | |
parent | c04a203a10e282e1f33fd04d8a1b7ff0b076bce5 (diff) | |
download | mariadb-git-cf63eecef44f189ce2d221612dee9dfc1885ba4e.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 87d7f65fed5..0509b200842 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -4437,6 +4437,7 @@ restart: wsrep_thd_is_local(thd) && !is_stat_table(&(*start)->db, &(*start)->alias) && thd->get_command() != COM_STMT_PREPARE && + !thd->stmt_arena->is_stmt_prepare() && ((thd->lex->sql_command == SQLCOM_INSERT || thd->lex->sql_command == SQLCOM_INSERT_SELECT || thd->lex->sql_command == SQLCOM_REPLACE || @@ -6365,8 +6366,9 @@ find_field_in_tables(THD *thd, Item_ident *item, TRUE, &(item->cached_field_index)); #ifndef NO_EMBEDDED_ACCESS_CHECKS /* Check if there are sufficient access rights to the found field. */ - if (found && check_privileges && - check_column_grant_in_table_ref(thd, table_ref, name, length, found)) + if (found && check_privileges && !is_temporary_table(table_ref) && + check_column_grant_in_table_ref(thd, table_ref, name, length, + found)) found= WRONG_GRANT; #endif } @@ -6830,7 +6832,6 @@ set_new_item_local_context(THD *thd, Item_ident *item, TABLE_LIST *table_ref) if (!(context= new (thd->mem_root) Name_resolution_context)) return TRUE; context->init(); - context->select_lex= table_ref->select_lex; context->first_name_resolution_table= context->last_name_resolution_table= table_ref; item->context= context; |