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;
|
- relates to
-
MDEV-17554
Auto-create history partitions for system-versioned tables
-
-
Closed
{"report":{"fcp":1002.5,"ttfb":175.89999985694885,"pageVisibility":"visible","entityId":110029,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"873570d5-b028-4b69-9c57-0d42204294be","navigationType":0,"readyForUser":1067,"redirectCount":0,"resourceLoadedEnd":744.5999999046326,"resourceLoadedStart":181,"resourceTiming":[{"duration":353.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":181,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":534.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":353.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":181.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":534.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":362.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":181.29999995231628,"connectEnd":181.29999995231628,"connectStart":181.29999995231628,"domainLookupEnd":181.29999995231628,"domainLookupStart":181.29999995231628,"fetchStart":181.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":181.29999995231628,"responseEnd":543.5999999046326,"responseStart":543.5999999046326,"secureConnectionStart":181.29999995231628},{"duration":438.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":181.39999985694885,"connectEnd":181.39999985694885,"connectStart":181.39999985694885,"domainLookupEnd":181.39999985694885,"domainLookupStart":181.39999985694885,"fetchStart":181.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":181.39999985694885,"responseEnd":619.5,"responseStart":619.5,"secureConnectionStart":181.39999985694885},{"duration":441.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":181.5,"connectEnd":181.5,"connectStart":181.5,"domainLookupEnd":181.5,"domainLookupStart":181.5,"fetchStart":181.5,"redirectEnd":0,"redirectStart":0,"requestStart":181.5,"responseEnd":622.8999998569489,"responseStart":622.8999998569489,"secureConnectionStart":181.5},{"duration":441.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":181.59999990463257,"connectEnd":181.59999990463257,"connectStart":181.59999990463257,"domainLookupEnd":181.59999990463257,"domainLookupStart":181.59999990463257,"fetchStart":181.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":181.59999990463257,"responseEnd":623.3999998569489,"responseStart":623.3999998569489,"secureConnectionStart":181.59999990463257},{"duration":442.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":181.59999990463257,"connectEnd":181.59999990463257,"connectStart":181.59999990463257,"domainLookupEnd":181.59999990463257,"domainLookupStart":181.59999990463257,"fetchStart":181.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":181.59999990463257,"responseEnd":623.7999999523163,"responseStart":623.7999999523163,"secureConnectionStart":181.59999990463257},{"duration":442.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":181.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":624.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":442.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":181.89999985694885,"connectEnd":181.89999985694885,"connectStart":181.89999985694885,"domainLookupEnd":181.89999985694885,"domainLookupStart":181.89999985694885,"fetchStart":181.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":181.89999985694885,"responseEnd":624.2999999523163,"responseStart":624.2999999523163,"secureConnectionStart":181.89999985694885},{"duration":442.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":182,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":624.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":442.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":182.09999990463257,"connectEnd":182.09999990463257,"connectStart":182.09999990463257,"domainLookupEnd":182.09999990463257,"domainLookupStart":182.09999990463257,"fetchStart":182.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":182.09999990463257,"responseEnd":625,"responseStart":625,"secureConnectionStart":182.09999990463257},{"duration":533.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":188.29999995231628,"connectEnd":188.29999995231628,"connectStart":188.29999995231628,"domainLookupEnd":188.29999995231628,"domainLookupStart":188.29999995231628,"fetchStart":188.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":188.29999995231628,"responseEnd":721.5999999046326,"responseStart":721.5999999046326,"secureConnectionStart":188.29999995231628},{"duration":554.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":189.69999980926514,"connectEnd":189.69999980926514,"connectStart":189.69999980926514,"domainLookupEnd":189.69999980926514,"domainLookupStart":189.69999980926514,"fetchStart":189.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":189.69999980926514,"responseEnd":744.5999999046326,"responseStart":744.5999999046326,"secureConnectionStart":189.69999980926514},{"duration":286.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":771.5999999046326,"connectEnd":771.5999999046326,"connectStart":771.5999999046326,"domainLookupEnd":771.5999999046326,"domainLookupStart":771.5999999046326,"fetchStart":771.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":771.5999999046326,"responseEnd":1057.6999998092651,"responseStart":1057.6999998092651,"secureConnectionStart":771.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":30,"responseStart":176,"responseEnd":191,"domLoading":179,"domInteractive":1127,"domContentLoadedEventStart":1127,"domContentLoadedEventEnd":1168,"domComplete":1806,"loadEventStart":1806,"loadEventEnd":1808,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1109.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1110.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1110.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1112.8999998569489},{"name":"activityTabFullyLoaded","time":1176.5}],"measures":[],"correlationId":"1e1659b018c6b5","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":70,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}