mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.11 into 11.0
This commit is contained in:
@ -7673,7 +7673,7 @@ static bool mysql_inplace_alter_table(THD *thd,
|
||||
THD_STAGE_INFO(thd, stage_alter_inplace);
|
||||
DBUG_EXECUTE_IF("start_alter_delay_master", {
|
||||
debug_sync_set_action(thd,
|
||||
STRING_WITH_LEN("now wait_for alter_cont"));
|
||||
STRING_WITH_LEN("now wait_for alter_cont NO_CLEAR_EVENT"));
|
||||
});
|
||||
|
||||
/* We can abort alter table for any table type */
|
||||
@ -9823,6 +9823,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
|
||||
const LEX_CSTRING *new_name,
|
||||
Table_specification_st *create_info,
|
||||
TABLE_LIST *table_list,
|
||||
Recreate_info *recreate_info,
|
||||
Alter_info *alter_info,
|
||||
uint order_num, ORDER *order, bool ignore,
|
||||
bool if_exists)
|
||||
@ -10856,7 +10857,7 @@ do_continue:;
|
||||
|
||||
DBUG_EXECUTE_IF("start_alter_delay_master", {
|
||||
debug_sync_set_action(thd,
|
||||
STRING_WITH_LEN("now wait_for alter_cont"));
|
||||
STRING_WITH_LEN("now wait_for alter_cont NO_CLEAR_EVENT"));
|
||||
});
|
||||
// It's now safe to take the table level lock.
|
||||
if (lock_tables(thd, table_list, alter_ctx.tables_opened,
|
||||
@ -11333,11 +11334,10 @@ end_temporary:
|
||||
|
||||
thd->variables.option_bits&= ~OPTION_BIN_COMMIT_OFF;
|
||||
|
||||
my_snprintf(alter_ctx.tmp_buff, sizeof(alter_ctx.tmp_buff),
|
||||
ER_THD(thd, ER_INSERT_INFO),
|
||||
(ulong) (copied + deleted), (ulong) deleted,
|
||||
(ulong) thd->get_stmt_da()->current_statement_warn_count());
|
||||
my_ok(thd, copied + deleted, 0L, alter_ctx.tmp_buff);
|
||||
*recreate_info= Recreate_info(copied, deleted);
|
||||
thd->my_ok_with_recreate_info(*recreate_info,
|
||||
(ulong) thd->get_stmt_da()->
|
||||
current_statement_warn_count());
|
||||
DEBUG_SYNC(thd, "alter_table_inplace_trans_commit");
|
||||
DBUG_RETURN(false);
|
||||
|
||||
@ -11852,7 +11852,8 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
||||
Like mysql_alter_table().
|
||||
*/
|
||||
|
||||
bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list, bool table_copy)
|
||||
bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list,
|
||||
Recreate_info *recreate_info, bool table_copy)
|
||||
{
|
||||
Table_specification_st create_info;
|
||||
Alter_info alter_info;
|
||||
@ -11877,8 +11878,11 @@ bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list, bool table_copy)
|
||||
Alter_info::ALTER_TABLE_ALGORITHM_COPY);
|
||||
|
||||
bool res= mysql_alter_table(thd, &null_clex_str, &null_clex_str, &create_info,
|
||||
table_list, &alter_info, 0,
|
||||
(ORDER *) 0, 0, 0);
|
||||
table_list, recreate_info, &alter_info, 0,
|
||||
(ORDER *) 0,
|
||||
// Ignore duplicate records on REPAIR
|
||||
thd->lex->sql_command == SQLCOM_REPAIR,
|
||||
0);
|
||||
table_list->next_global= next_table;
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
Reference in New Issue
Block a user