Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5
Description
Reproduce
--source include/have_innodb.inc
|
|
create table t1 ( |
f1 int, f2 int, |
key(f1), |
foreign key (f2) references t1 (f1) on delete set null) |
with system versioning engine innodb; |
insert into t1 values (1, 1), (1, 1); |
delete from t1; |
select f1, f2, row_start, row_end from t1 for system_time all; |
# cleanup
|
drop table t1; |
Result
3 history rows (SET NULL action added one more).
select f1, f2, row_start, row_end from t1 for system_time all; |
f1 f2 row_start row_end
|
1 1 2020-12-11 19:53:57.624080 2020-12-11 19:53:57.626972
|
1 NULL 2020-12-11 19:53:57.626972 2020-12-11 19:53:57.626972 |
1 1 2020-12-11 19:53:57.624080 2020-12-11 19:53:57.626972
|
Expected
2 history rows.
select f1, f2, row_start, row_end from t1 for system_time all; |
f1 f2 row_start row_end
|
1 1 2020-12-11 19:53:57.624080 2020-12-11 19:53:57.626972
|
1 1 2020-12-11 19:53:57.624080 2020-12-11 19:53:57.626972
|
Good
Reference from other table works ok:
--source include/have_innodb.inc
|
|
create table t1 (f1 int, key(f1)) |
with system versioning engine innodb; |
|
create table t2 ( |
f2 int, |
foreign key (f2) references t1 (f1) on delete set null) |
with system versioning engine innodb; |
|
insert into t1 values (1), (1); |
insert into t2 values (1), (1); |
delete from t2; |
select f1, row_start, row_end from t1 for system_time all; |
select f2, row_start, row_end from t2 for system_time all; |
drop tables t2, t1; |
select f1, row_start, row_end from t1 for system_time all; |
f1 row_start row_end
|
1 2020-12-11 19:53:57.671806 2038-01-19 06:14:07.999999
|
1 2020-12-11 19:53:57.671806 2038-01-19 06:14:07.999999
|
select f2, row_start, row_end from t2 for system_time all; |
f2 row_start row_end
|
1 2020-12-11 19:53:57.674496 2020-12-11 19:53:57.677131
|
1 2020-12-11 19:53:57.674496 2020-12-11 19:53:57.677131
|
Attachments
Issue Links
- relates to
-
MDEV-21138 Assertion `col->ord_part' or `f.col->ord_part' failed in row_build_index_entry_low, assertion: buf != field_ref_zero in row_merge_buf_add
- Closed