1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-23100 ODKU of non-versioning column inserts history row

Use vers_check_update() to avoid inserting history row for ODKU if now
versioned fields specified in update_fields.
This commit is contained in:
Aleksey Midenkov
2023-07-20 14:13:59 +03:00
parent fe618de691
commit c5a8341115
3 changed files with 32 additions and 1 deletions

View File

@ -373,6 +373,22 @@ update t1, t2 set t1.a = 3, t2.a = 3 where t1.b <= 10 and t2.b <= 10 and t1.b =
# cleanup
drop tables t1, t2;
--echo #
--echo # MDEV-23100 ODKU of non-versioning column inserts history row
--echo #
create table t1 (
x int unique,
y int without system versioning
) with system versioning;
insert into t1 (x, y) values ('1', '1');
insert into t1 (x, y) values ('1', '2')
on duplicate key update y = 3;
select x, y, check_row_ts(row_start, row_end) from t1 for system_time all order by row_end;
drop table t1;
--echo # End of 10.4 tests
source suite/versioning/common_finish.inc;