mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.3' into 10.4
This commit is contained in:
@ -4013,6 +4013,9 @@ void handler::print_error(int error, myf errflag)
|
||||
case HA_ERR_TABLE_IN_FK_CHECK:
|
||||
textno= ER_TABLE_IN_FK_CHECK;
|
||||
break;
|
||||
case HA_ERR_PARTITION_LIST:
|
||||
my_error(ER_VERS_NOT_ALLOWED, errflag, table->s->db.str, table->s->table_name.str);
|
||||
DBUG_VOID_RETURN;
|
||||
default:
|
||||
{
|
||||
/* The error was "unknown" to this function.
|
||||
@ -7545,6 +7548,8 @@ bool Table_scope_and_contents_source_st::vers_fix_system_fields(
|
||||
List_iterator<Create_field> it(alter_info->create_list);
|
||||
while (Create_field *f= it++)
|
||||
{
|
||||
if (f->vers_sys_field())
|
||||
continue;
|
||||
if ((f->versioning == Column_definition::VERSIONING_NOT_SET && !add_versioning) ||
|
||||
f->versioning == Column_definition::WITHOUT_VERSIONING)
|
||||
{
|
||||
@ -7566,9 +7571,10 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields(
|
||||
if (!(options & HA_VERSIONED_TABLE))
|
||||
return false;
|
||||
|
||||
uint versioned_fields= 0;
|
||||
|
||||
if (!(alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING))
|
||||
{
|
||||
uint versioned_fields= 0;
|
||||
uint fieldnr= 0;
|
||||
List_iterator<Create_field> field_it(alter_info->create_list);
|
||||
while (Create_field *f= field_it++)
|
||||
@ -7599,7 +7605,7 @@ bool Table_scope_and_contents_source_st::vers_check_system_fields(
|
||||
}
|
||||
}
|
||||
|
||||
if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING))
|
||||
if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING) && !versioned_fields)
|
||||
return false;
|
||||
|
||||
bool can_native= ha_check_storage_engine_flag(db_type,
|
||||
|
Reference in New Issue
Block a user