-
Task
-
-
Major
-
Resolution:
Unresolved
-
None
-
-
1. Fast ADD case: existing rows do not match new partition range
Reproduce
create or replace table t1 (x int)
|
partition by range columns (x) (
|
partition p0 values less than (10),
|
partition p1 values less than (20),
|
partition pn values less than maxvalue);
|
|
insert into t1 values (1);
|
insert into t1 values (11);
|
insert into t1 values (31);
|
|
alter table t1 add partition (partition p2 values less than (30));
|
Result
alter table t1 add partition (partition p2 values less than (30));
|
ERROR 1493 (HY000): VALUES LESS THAN value must be strictly increasing for each partition
|
Expected
Partition p2 added between p1 and pn.
Workaround via CONVERT PARTITION
create or replace table t1 (x int)
|
partition by range columns (x) (
|
partition p0 values less than (10),
|
partition p1 values less than (20),
|
partition pn values less than maxvalue);
|
|
insert into t1 values (1);
|
insert into t1 values (11);
|
insert into t1 values (31);
|
|
alter table t1 convert partition pn to table pn;
|
alter table t1 add partition (partition p2 values less than (30));
|
alter table t1 convert table pn to partition pn values less than maxvalue;
|
Workaround result
CREATE TABLE `t1` (
|
`x` int(11) DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
PARTITION BY RANGE COLUMNS(`x`)
|
(PARTITION `p0` VALUES LESS THAN (10) ENGINE = InnoDB,
|
PARTITION `p1` VALUES LESS THAN (20) ENGINE = InnoDB,
|
PARTITION `p2` VALUES LESS THAN (30) ENGINE = InnoDB,
|
PARTITION `pn` VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB)
|
2. Copy case: existing rows match new partition range
Reproduce
create or replace table t1 (x int)
|
partition by range columns (x) (
|
partition p0 values less than (10),
|
partition p1 values less than (20),
|
partition pn values less than maxvalue);
|
|
insert into t1 values (21);
|
|
alter table t1 add partition (partition p2 values less than (30));
|
Expected
Partition p2 is added between p1 and pn; row 21 is moved to partition p2.
Workaround via CONVERT PARTITION does not work (MDEV-31213)
create or replace table t1 (x int)
|
partition by range columns (x) (
|
partition p0 values less than (10),
|
partition p1 values less than (20),
|
partition pn values less than maxvalue);
|
|
insert into t1 values (21);
|
|
alter table t1 convert partition pn to table pn;
|
alter table t1 add partition (partition p2 values less than (30));
|
alter table t1 convert table pn to partition pn values less than maxvalue;
|
Result
alter table t1 convert table pn to partition pn values less than maxvalue;
|
ERROR 1737 (HY000): Found a row that does not match the partition
|
{"report":{"fcp":810.5,"ttfb":158.39999997615814,"pageVisibility":"visible","entityId":121695,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"8f4ea0cf-8ff6-4185-afa1-f3aa2e96b19e","navigationType":0,"readyForUser":910.7999999523163,"redirectCount":0,"resourceLoadedEnd":977.5,"resourceLoadedStart":181.19999992847443,"resourceTiming":[{"duration":161.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":181.19999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":342.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":161.39999997615814,"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.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":342.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":170.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_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":352,"responseStart":352,"secureConnectionStart":181.5},{"duration":257.2000000476837,"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.69999992847443,"connectEnd":181.69999992847443,"connectStart":181.69999992847443,"domainLookupEnd":181.69999992847443,"domainLookupStart":181.69999992847443,"fetchStart":181.69999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":181.69999992847443,"responseEnd":438.89999997615814,"responseStart":438.89999997615814,"secureConnectionStart":181.69999992847443},{"duration":260.60000002384186,"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.79999995231628,"connectEnd":181.79999995231628,"connectStart":181.79999995231628,"domainLookupEnd":181.79999995231628,"domainLookupStart":181.79999995231628,"fetchStart":181.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":181.79999995231628,"responseEnd":442.39999997615814,"responseStart":442.39999997615814,"secureConnectionStart":181.79999995231628},{"duration":261,"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.89999997615814,"connectEnd":181.89999997615814,"connectStart":181.89999997615814,"domainLookupEnd":181.89999997615814,"domainLookupStart":181.89999997615814,"fetchStart":181.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":181.89999997615814,"responseEnd":442.89999997615814,"responseStart":442.89999997615814,"secureConnectionStart":181.89999997615814},{"duration":261.2999999523163,"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.89999997615814,"connectEnd":181.89999997615814,"connectStart":181.89999997615814,"domainLookupEnd":181.89999997615814,"domainLookupStart":181.89999997615814,"fetchStart":181.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":181.89999997615814,"responseEnd":443.1999999284744,"responseStart":443.1999999284744,"secureConnectionStart":181.89999997615814},{"duration":261.6999999284744,"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":182,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":443.6999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":261.90000009536743,"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.19999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.10000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":261.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":182.19999992847443,"connectEnd":182.19999992847443,"connectStart":182.19999992847443,"domainLookupEnd":182.19999992847443,"domainLookupStart":182.19999992847443,"fetchStart":182.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":182.19999992847443,"responseEnd":443.6999999284744,"responseStart":443.6999999284744,"secureConnectionStart":182.19999992847443},{"duration":261.7000000476837,"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.39999997615814,"connectEnd":182.39999997615814,"connectStart":182.39999997615814,"domainLookupEnd":182.39999997615814,"domainLookupStart":182.39999997615814,"fetchStart":182.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":182.39999997615814,"responseEnd":444.10000002384186,"responseStart":444.10000002384186,"secureConnectionStart":182.39999997615814},{"duration":413.10000002384186,"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.89999997615814,"connectEnd":188.89999997615814,"connectStart":188.89999997615814,"domainLookupEnd":188.89999997615814,"domainLookupStart":188.89999997615814,"fetchStart":188.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":188.89999997615814,"responseEnd":602,"responseStart":602,"secureConnectionStart":188.89999997615814},{"duration":633.5,"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":190.89999997615814,"connectEnd":190.89999997615814,"connectStart":190.89999997615814,"domainLookupEnd":190.89999997615814,"domainLookupStart":190.89999997615814,"fetchStart":190.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":190.89999997615814,"responseEnd":824.3999999761581,"responseStart":824.3999999761581,"secureConnectionStart":190.89999997615814},{"duration":93.89999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":509.2999999523163,"connectEnd":509.2999999523163,"connectStart":509.2999999523163,"domainLookupEnd":509.2999999523163,"domainLookupStart":509.2999999523163,"fetchStart":509.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":509.2999999523163,"responseEnd":603.1999999284744,"responseStart":603.1999999284744,"secureConnectionStart":509.2999999523163},{"duration":185.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":728.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":728.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":913.6999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":185.19999992847443,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":728.6000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":728.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":913.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":231.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":729.3999999761581,"connectEnd":729.3999999761581,"connectStart":729.3999999761581,"domainLookupEnd":729.3999999761581,"domainLookupStart":729.3999999761581,"fetchStart":729.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":729.3999999761581,"responseEnd":961.1000000238419,"responseStart":961.1000000238419,"secureConnectionStart":729.3999999761581},{"duration":246.30000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":729.7999999523163,"connectEnd":729.7999999523163,"connectStart":729.7999999523163,"domainLookupEnd":729.7999999523163,"domainLookupStart":729.7999999523163,"fetchStart":729.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":729.7999999523163,"responseEnd":976.1000000238419,"responseStart":976.1000000238419,"secureConnectionStart":729.7999999523163},{"duration":247.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/86ee9bbc76cd1bcd8556fcdcf46241c9-CDN/lu2bu7/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":730.1000000238419,"connectEnd":730.1000000238419,"connectStart":730.1000000238419,"domainLookupEnd":730.1000000238419,"domainLookupStart":730.1000000238419,"fetchStart":730.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":730.1000000238419,"responseEnd":977.5,"responseStart":977.5,"secureConnectionStart":730.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":17,"responseStart":159,"responseEnd":191,"domLoading":176,"domInteractive":988,"domContentLoadedEventStart":988,"domContentLoadedEventEnd":1037,"domComplete":1968,"loadEventStart":1968,"loadEventEnd":1970,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":962.8999999761581},{"name":"bigPipe.sidebar-id.end","time":963.6999999284744},{"name":"bigPipe.activity-panel-pipe-id.start","time":963.8999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":966.5},{"name":"activityTabFullyLoaded","time":1057.5}],"measures":[],"correlationId":"e5ec3f18d64926","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":78,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}