mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-26778 row_start is not updated in current row for InnoDB
Update was skipped (need_update was false) because compare_record()
used HA_PARTIAL_COLUMN_READ branch and it skipped row_start check
has_explicit_value() was false. When we set bit for row_start in
has_value_set the row is updated with new row_start value.
The bug was caused by combination of MDEV-23446 and 3789692d17
. The
latter one says:
... But generated columns that are written to the table are always
deterministic and cannot change unless normal non-generated columns
were changed. ...
Since MDEV-23446 generated row_start can change while non-generated
columns are not changed.
Explicit value flag came from HAS_EXPLICIT_DEFAULT which was used to
distinguish default-generated value from user-supplied one.
This commit is contained in:
@ -399,3 +399,14 @@ a check_row(row_start, row_end)
|
||||
1 HISTORICAL ROW
|
||||
1 CURRENT ROW
|
||||
drop tables t1, t2, t3;
|
||||
#
|
||||
# MDEV-26778 row_start is not updated in current row for InnoDB
|
||||
#
|
||||
create or replace table t1 (x int) with system versioning;
|
||||
insert t1 values (1);
|
||||
update t1 set x= 1;
|
||||
select row_start from t1 into @r;
|
||||
select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r;
|
||||
check_row_ts(row_start, row_end)
|
||||
CURRENT ROW
|
||||
drop table t1;
|
||||
|
@ -326,4 +326,14 @@ select *, check_row(row_start, row_end) from t2 for system_time all order by row
|
||||
# cleanup
|
||||
drop tables t1, t2, t3;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-26778 row_start is not updated in current row for InnoDB
|
||||
--echo #
|
||||
create or replace table t1 (x int) with system versioning;
|
||||
insert t1 values (1);
|
||||
update t1 set x= 1;
|
||||
select row_start from t1 into @r;
|
||||
select check_row_ts(row_start, row_end) from t1 for system_time all where row_start = @r;
|
||||
drop table t1;
|
||||
|
||||
source suite/versioning/common_finish.inc;
|
||||
|
Reference in New Issue
Block a user