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:
@ -2237,7 +2237,6 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
uint not_found_errors= 0;
|
||||
int error= 0;
|
||||
int non_temp_tables_count= 0;
|
||||
bool non_tmp_error= 0;
|
||||
bool trans_tmp_table_deleted= 0, non_trans_tmp_table_deleted= 0;
|
||||
bool non_tmp_table_deleted= 0;
|
||||
bool is_drop_tmp_if_exists_added= 0;
|
||||
@ -2303,7 +2302,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
{
|
||||
bool is_trans= 0, temporary_table_was_dropped= 0;
|
||||
bool table_creation_was_logged= 0;
|
||||
bool local_non_tmp_error= 0, wrong_drop_sequence= 0;
|
||||
bool wrong_drop_sequence= 0;
|
||||
bool table_dropped= 0;
|
||||
const LEX_CSTRING db= table->db;
|
||||
const LEX_CSTRING table_name= table->table_name;
|
||||
@ -2468,7 +2467,6 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
*/
|
||||
wrong_drop_sequence= drop_sequence && hton;
|
||||
was_table|= wrong_drop_sequence;
|
||||
local_non_tmp_error= 1;
|
||||
error= table_type == TABLE_TYPE_UNKNOWN ? ENOENT : -1;
|
||||
tdc_remove_table(thd, db.str, table_name.str);
|
||||
}
|
||||
@ -2561,7 +2559,6 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
table_dropped= 1;
|
||||
}
|
||||
}
|
||||
local_non_tmp_error|= MY_TEST(error);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2579,8 +2576,6 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
ferror= ha_delete_table_force(thd, path, &db, &table_name);
|
||||
if (!ferror)
|
||||
{
|
||||
/* Table existed and was deleted */
|
||||
local_non_tmp_error= 0;
|
||||
table_dropped= 1;
|
||||
error= 0;
|
||||
}
|
||||
@ -2654,12 +2649,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
||||
didn't exists
|
||||
*/
|
||||
if (if_exists && non_existing_table_error(error))
|
||||
{
|
||||
error= 0;
|
||||
local_non_tmp_error= 0;
|
||||
}
|
||||
|
||||
non_tmp_error|= local_non_tmp_error;
|
||||
|
||||
if (!error && table_dropped)
|
||||
{
|
||||
@ -2773,12 +2763,10 @@ err:
|
||||
normal_tables.chop();
|
||||
built_query.append(normal_tables.ptr(), normal_tables.length());
|
||||
built_query.append(" /* generated by server */");
|
||||
int error_code = non_tmp_error ? thd->get_stmt_da()->sql_errno() : 0;
|
||||
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_query.ptr(),
|
||||
built_query.length(),
|
||||
TRUE, FALSE, FALSE,
|
||||
error_code) > 0);
|
||||
TRUE, FALSE, FALSE, 0) > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user