mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge
This commit is contained in:
@ -5898,7 +5898,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
ptr->db= empty_c_string;
|
||||
ptr->db_length= 0;
|
||||
}
|
||||
if (thd->current_arena->is_stmt_prepare())
|
||||
if (thd->current_arena->is_stmt_prepare_or_first_sp_execute())
|
||||
ptr->db= thd->strdup(ptr->db);
|
||||
|
||||
ptr->alias= alias_str;
|
||||
@ -6976,7 +6976,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
|
||||
against the opened tables to ensure we don't use a table that is part
|
||||
of the view (which can only be done after the table has been opened).
|
||||
*/
|
||||
if (thd->current_arena->is_stmt_prepare())
|
||||
if (thd->current_arena->is_stmt_prepare_or_first_sp_execute())
|
||||
{
|
||||
/*
|
||||
For temporary tables we don't have to check if the created table exists
|
||||
|
Reference in New Issue
Block a user