mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-21138 Assertion col->ord_part' or
f.col->ord_part' failed in row_build_index_entry_low
First part (row0mysql.cc) fixes ins_node_set_new_row() usage workflow as it is designed to operate on empty row (see row_get_prebuilt_insert_row() for example). Second part (row0ins.cc) fixes duplicate key error in FTS_DOC_ID_INDEX since history rows must not generate entries in that index. We detect FTS_DOC_ID_INDEX by a number of attributes and skip it if the row is historical. Misc fixes: row_build_index_entry_low() does not accept non-NULL tuple for FTS index (subject assertion fails), assertion (index->type != DICT_FTS) adds code understanding. Now as historical_row is copied in row_update_vers_insert() there is no need to copy the row twice: ROW_COPY_POINTERS is used to build historical_row initially. dbug_print_rec() debug functions.
This commit is contained in:
@@ -241,6 +241,26 @@ B2 salary
|
||||
1 2500
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
# Ensure FTS retains correct history
|
||||
create table t1 (
|
||||
x int, y text, fulltext (y),
|
||||
row_start SYS_DATATYPE as row start invisible,
|
||||
row_end SYS_DATATYPE as row end invisible,
|
||||
period for system_time (row_start, row_end))
|
||||
with system versioning engine innodb;
|
||||
insert into t1 values (1, repeat('LONG', 2048));
|
||||
update t1 set x= x + 1;
|
||||
select x, left(y, 4), length(y), check_row(row_start, row_end) from t1 for system_time all order by x, y;
|
||||
x left(y, 4) length(y) check_row(row_start, row_end)
|
||||
1 LONG 8192 HISTORICAL ROW
|
||||
2 LONG 8192 CURRENT ROW
|
||||
update t1 set y= 'SHORT';
|
||||
select x, left(y, 4), length(y), check_row(row_start, row_end) from t1 for system_time all order by x, y;
|
||||
x left(y, 4) length(y) check_row(row_start, row_end)
|
||||
1 LONG 8192 HISTORICAL ROW
|
||||
2 LONG 8192 HISTORICAL ROW
|
||||
2 SHOR 5 CURRENT ROW
|
||||
drop tables t1;
|
||||
### Issue tempesta-tech/mariadb#365, bug 7 (duplicate of historical row)
|
||||
create or replace table t1 (a int primary key, b int)
|
||||
with system versioning engine myisam;
|
||||
|
Reference in New Issue
Block a user