1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2019-09-12 12:16:40 +03:00
51 changed files with 982 additions and 248 deletions

View File

@ -8697,13 +8697,6 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
}
}
if (table->versioned() && !(alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING) &&
new_create_list.elements == VERSIONING_FIELDS)
{
my_error(ER_VERS_TABLE_MUST_HAVE_COLUMNS, MYF(0), table->s->table_name.str);
goto err;
}
if (!create_info->comment.str)
{
create_info->comment.str= table->s->comment.str;
@ -9787,8 +9780,9 @@ do_continue:;
set_table_default_charset(thd, create_info, alter_ctx.db);
if (create_info->check_period_fields(thd, alter_info)
|| create_info->fix_period_fields(thd, alter_info))
if (create_info->check_fields(thd, alter_info,
table_list->table_name, table_list->db) ||
create_info->fix_period_fields(thd, alter_info))
DBUG_RETURN(true);
if (!opt_explicit_defaults_for_timestamp)
@ -10287,7 +10281,7 @@ do_continue:;
close_all_tables_for_name(thd, table->s,
alter_ctx.is_table_renamed() ?
HA_EXTRA_PREPARE_FOR_RENAME:
HA_EXTRA_PREPARE_FOR_RENAME:
HA_EXTRA_NOT_USED,
NULL);
table_list->table= table= NULL; /* Safety */
@ -10482,7 +10476,7 @@ bool mysql_trans_prepare_alter_copy_data(THD *thd)
/*
Turn off recovery logging since rollback of an alter table is to
delete the new table so there is no need to log the changes to it.
This needs to be done before external_lock.
*/
DBUG_RETURN(ha_enable_transaction(thd, FALSE) != 0);
@ -10640,7 +10634,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
char warn_buff[MYSQL_ERRMSG_SIZE];
bool save_abort_on_warning= thd->abort_on_warning;
thd->abort_on_warning= false;
my_snprintf(warn_buff, sizeof(warn_buff),
my_snprintf(warn_buff, sizeof(warn_buff),
"ORDER BY ignored as there is a user-defined clustered index"
" in the table '%-.192s'", from->s->table_name.str);
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
@ -11409,7 +11403,8 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
else
{
if (create_info.fix_create_fields(thd, &alter_info, *create_table) ||
create_info.check_fields(thd, &alter_info, *create_table))
create_info.check_fields(thd, &alter_info,
create_table->table_name, create_table->db))
goto end_with_restore_list;
/*