mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-30891 Assertion `!table->versioned(VERS_TRX_ID)' failed
Assertion `!table->versioned(VERS_TRX_ID)' failed in Write_rows_log_event::binlog_row_logging_function during ONLINE ALTER. trxid-versioned tables can't be replicated. ONLINE ALTER will also be forbidden for these tables.
This commit is contained in:
committed by
Sergei Golubchik
parent
5361b87093
commit
e1f5c58ac7
@ -120,3 +120,19 @@ ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock.
|
||||
alter table t2 add c int, algorithm=copy;
|
||||
alter table t2 add d int, algorithm=inplace;
|
||||
drop table t2, t1;
|
||||
#
|
||||
# MDEV-30891 Assertion `!table->versioned(VERS_TRX_ID)' failed
|
||||
# in Write_rows_log_event::binlog_row_logging_function
|
||||
#
|
||||
set system_versioning_alter_history= keep;
|
||||
create table t1 (id int,
|
||||
row_start bigint unsigned generated always as row start,
|
||||
row_end bigint unsigned generated always as row end,
|
||||
period for system_time (row_start, row_end))
|
||||
engine=innodb with system versioning;
|
||||
alter table t1 add c int, algorithm=copy, lock=none;
|
||||
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED
|
||||
alter table t1 add c int, algorithm=inplace;
|
||||
alter table t1 add d int, lock=none;
|
||||
set system_versioning_alter_history= default;
|
||||
drop table t1;
|
||||
|
@ -115,3 +115,23 @@ alter table t2 add c int, algorithm=copy;
|
||||
alter table t2 add d int, algorithm=inplace;
|
||||
# Cleanup
|
||||
drop table t2, t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30891 Assertion `!table->versioned(VERS_TRX_ID)' failed
|
||||
--echo # in Write_rows_log_event::binlog_row_logging_function
|
||||
--echo #
|
||||
set system_versioning_alter_history= keep;
|
||||
create table t1 (id int,
|
||||
row_start bigint unsigned generated always as row start,
|
||||
row_end bigint unsigned generated always as row end,
|
||||
period for system_time (row_start, row_end))
|
||||
engine=innodb with system versioning;
|
||||
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||
alter table t1 add c int, algorithm=copy, lock=none;
|
||||
alter table t1 add c int, algorithm=inplace;
|
||||
alter table t1 add d int, lock=none;
|
||||
|
||||
set system_versioning_alter_history= default;
|
||||
drop table t1;
|
||||
|
||||
|
@ -10069,7 +10069,7 @@ bool mysql_alter_table(THD *thd, const LEX_CSTRING *new_db,
|
||||
table= table_list->table;
|
||||
bool is_reg_table= table->s->tmp_table == NO_TMP_TABLE;
|
||||
|
||||
online= online && !table->s->tmp_table;
|
||||
online= online && !table->s->tmp_table && !table->versioned(VERS_TRX_ID);
|
||||
|
||||
List<FOREIGN_KEY_INFO> fk_list;
|
||||
table->file->get_foreign_key_list(thd, &fk_list);
|
||||
|
Reference in New Issue
Block a user