diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-30 09:46:52 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-01-30 09:46:52 +0100 |
commit | a576a1cea5b0f06fb8fff0fbdb9035d89510b83a (patch) | |
tree | d25987402c55bdaec0897ab28c236acfa50116ef /sql/handler.cc | |
parent | 12cad0c3468d734e041d4ef0cd5a26d2a28606fc (diff) | |
parent | 41a163ac5ccf4ac5394edc84e40b3f47acea6b08 (diff) | |
download | mariadb-git-a576a1cea5b0f06fb8fff0fbdb9035d89510b83a.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 49849f46908..4aff21851a6 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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, |