Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.9(EOL)
-
None
Description
Test:
-- source include/have_partition.inc
|
-- source include/have_sequence.inc
|
-- source include/have_rocksdb.inc
|
|
|
create table t1 (x int) engine=rocksdb with system versioning
|
partition by system_time limit 10 auto;
|
|
insert into t1 select seq from seq_1_to_100;
|
|
delete from t1 where x<10;
|
select count(*) from t1 partition (p0);
|
update t1 set x=10 where x<25;
|
select count(*) from t1 partition (p0);
|
delete from t1;
|
select count(*) from t1 partition (p0);
|
|
select partition_name, table_rows from information_schema.partitions where table_name = 't1';
|
|
drop table t1;
|
Expected result: (according MDEV-28337)
create table t1 (x int) engine=rocksdb with system versioning
|
partition by system_time limit 10 auto;
|
insert into t1 select seq from seq_1_to_100;
|
delete from t1 where x<10;
|
select count(*) from t1 partition (p0);
|
count(*)
|
9
|
update t1 set x=10 where x<25;
|
select count(*) from t1 partition (p0);
|
count(*)
|
24
|
delete from t1;
|
select count(*) from t1 partition (p0);
|
count(*)
|
24
|
select partition_name, table_rows from information_schema.partitions where table_name = 't1';
|
partition_name table_rows
|
p0 24
|
p1 91
|
pn 0
|
drop table t1;
|
Actual result:
All history is stored in partition p0 and the statistics are incorrect.
create table t1 (x int) engine=rocksdb with system versioning
|
partition by system_time limit 10 auto;
|
insert into t1 select seq from seq_1_to_100;
|
delete from t1 where x<10;
|
select count(*) from t1 partition (p0);
|
count(*)
|
9
|
update t1 set x=10 where x<25;
|
select count(*) from t1 partition (p0);
|
count(*)
|
24
|
delete from t1;
|
select count(*) from t1 partition (p0);
|
count(*)
|
115
|
select partition_name, table_rows from information_schema.partitions where table_name = 't1';
|
partition_name table_rows
|
p0 0
|
pn 0
|
drop table t1;
|
Attachments
Issue Links
- relates to
-
MDEV-17554 Auto-create history partitions for system-versioned tables
- Closed