1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-17 12:02:09 +03:00

Merge branch '10.6' into 10.7

This commit is contained in:
Oleksandr Byelkin
2023-01-31 09:33:58 +01:00
140 changed files with 4096 additions and 705 deletions

View File

@ -9505,6 +9505,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
const LEX_CSTRING *new_name,
HA_CREATE_INFO *create_info,
TABLE_LIST *table_list,
Recreate_info *recreate_info,
Alter_info *alter_info,
uint order_num, ORDER *order, bool ignore,
bool if_exists)
@ -10960,11 +10961,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);
@ -11475,7 +11475,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)
{
HA_CREATE_INFO create_info;
Alter_info alter_info;
@ -11501,8 +11502,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);
}