mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@ -3520,9 +3520,6 @@ mysql_execute_command(THD *thd)
|
||||
thd->get_stmt_da()->opt_clear_warning_info(thd->query_id);
|
||||
}
|
||||
|
||||
if (check_dependencies_in_with_clauses(thd->lex->with_clauses_list))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (unlikely(thd->slave_thread))
|
||||
{
|
||||
@ -8212,7 +8209,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
ptr->is_fqtn= TRUE;
|
||||
ptr->db= table->db;
|
||||
}
|
||||
else if (lex->copy_db_to(&ptr->db))
|
||||
else if (!lex->with_cte_resolution && lex->copy_db_to(&ptr->db))
|
||||
DBUG_RETURN(0);
|
||||
else
|
||||
ptr->is_fqtn= FALSE;
|
||||
@ -8227,9 +8224,11 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
|
||||
if (ptr->db.length && ptr->db.str != any_db.str)
|
||||
ptr->db.length= my_casedn_str(files_charset_info, (char*) ptr->db.str);
|
||||
}
|
||||
|
||||
|
||||
ptr->table_name= table->table;
|
||||
ptr->lock_type= lock_type;
|
||||
ptr->lock_type= lock_type;
|
||||
ptr->mdl_type= mdl_type;
|
||||
ptr->table_options= table_options;
|
||||
ptr->updating= MY_TEST(table_options & TL_OPTION_UPDATING);
|
||||
/* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */
|
||||
ptr->force_index= MY_TEST(table_options & TL_OPTION_FORCE_INDEX);
|
||||
@ -8916,8 +8915,10 @@ void st_select_lex::set_lock_for_tables(thr_lock_type lock_type, bool for_update
|
||||
tables->lock_type= lock_type;
|
||||
tables->skip_locked= skip_locked;
|
||||
tables->updating= for_update;
|
||||
tables->mdl_request.set_type((lock_type >= TL_FIRST_WRITE) ?
|
||||
MDL_SHARED_WRITE : MDL_SHARED_READ);
|
||||
|
||||
if (tables->db.length)
|
||||
tables->mdl_request.set_type((lock_type >= TL_FIRST_WRITE) ?
|
||||
MDL_SHARED_WRITE : MDL_SHARED_READ);
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
Reference in New Issue
Block a user