Skip to content

Commit f685604

Browse files
committed
MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
add a test case
1 parent 62b5427 commit f685604

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

mysql-test/suite/versioning/r/partition.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,14 @@ i
534534
explain partitions select * from t1 for system_time all where row_end = @ts;
535535
id select_type table partitions type possible_keys key key_len ref rows Extra
536536
1 SIMPLE t1 p1_p1sp0,p1_p1sp1 # NULL NULL NULL NULL # #
537+
#
538+
# MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
539+
#
540+
create or replace table t1 (pk int primary key, f int) with system versioning
541+
partition by system_time limit 100 (partition p1 history, partition pn current);
542+
insert into t1 values (1,10), (2,20);
543+
create or replace view v1 as select * from t1;
544+
update v1 set f= 30;
537545
# Test cleanup
538546
drop database test;
539547
create database test;

mysql-test/suite/versioning/t/partition.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,15 @@ select * from t1 for system_time all where row_end = @ts;
445445
--replace_column 5 # 10 # 11 #
446446
explain partitions select * from t1 for system_time all where row_end = @ts;
447447

448+
--echo #
449+
--echo # MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW
450+
--echo #
451+
create or replace table t1 (pk int primary key, f int) with system versioning
452+
partition by system_time limit 100 (partition p1 history, partition pn current);
453+
insert into t1 values (1,10), (2,20);
454+
create or replace view v1 as select * from t1;
455+
update v1 set f= 30;
456+
448457
--echo # Test cleanup
449458
drop database test;
450459
create database test;

0 commit comments

Comments
 (0)