EXCHANGE PARTITION allows a key to be ascending on one participating table and descending on another, but further DML on the table causes errors.
--source include/have_partition.inc
|
|
CREATE TABLE t1 (a INT, KEY(a DESC)) PARTITION BY KEY(a) PARTITIONS 4;
|
INSERT INTO t1 VALUES (6),(3),(2),(1);
|
|
CREATE TABLE t2 (a INT, KEY(a));
|
|
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
|
INSERT INTO t1 VALUES (5),(4);
|
|
# Cleanup
|
DROP TABLE t1, t2;
|
10.8 0c5d1342 with MyISAM
|
mysqltest: At line 9: query 'INSERT INTO t1 VALUES (5),(4)' failed: ER_GET_ERRNO (1030): Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
|
With InnoDB INSERT doesn't fail, but errors are written in the log:
with InnoDB
|
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
|
INSERT INTO t1 VALUES (5),(4);
|
DROP TABLE t1, t2;
|
bug.part2 [ fail ] Found warnings/errors in server log file!
|
Test ended at 2022-01-30 15:14:13
|
line
|
2022-01-30 15:14:13 4 [ERROR] Found index a whose column info does not match that of MariaDB.
|
2022-01-30 15:14:13 4 [ERROR] InnoDB indexes are inconsistent with what defined in .frm for table ./test/t1#P#p0
|
^ Found warnings in /mnt8t/bld/10.8-debug-nightly/mysql-test/var/log/mysqld.1.err
|
With Aria, no errors are returned, which is more suspicious than soothing.
In MariaDB KB the description of EXCHANGE PARTITION is scarce, but MySQL manual says
Table nt is not itself partitioned.
Table nt is not a temporary table.
The structures of tables pt and nt are otherwise identical.
...
(there are 9 more points, but none of them changes the above)
However MySQL as of 8.0.28 also allows such EXCHANGE, and InnoDB errors/warnings also end up in the error log.
- is caused by
-
MDEV-13756
Implement descending index: KEY (a DESC, b ASC)
-
-
Closed
{"report":{"fcp":783.5999999642372,"ttfb":184.0999999642372,"pageVisibility":"visible","entityId":107417,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"e87c1e4d-b468-411e-bb28-f3c3eaa4e173","navigationType":0,"readyForUser":864.2999999523163,"redirectCount":0,"resourceLoadedEnd":849.5999999642372,"resourceLoadedStart":190.69999998807907,"resourceTiming":[{"duration":11.099999964237213,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":190.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":190.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":201.79999995231628,"responseStart":0,"secureConnectionStart":0},{"duration":12.5,"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":191,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":191,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":203.5,"responseStart":0,"secureConnectionStart":0},{"duration":69.59999996423721,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":191.19999998807907,"connectEnd":191.19999998807907,"connectStart":191.19999998807907,"domainLookupEnd":191.19999998807907,"domainLookupStart":191.19999998807907,"fetchStart":191.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":191.19999998807907,"responseEnd":260.7999999523163,"responseStart":260.7999999523163,"secureConnectionStart":191.19999998807907},{"duration":140.80000001192093,"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":191.29999995231628,"connectEnd":191.29999995231628,"connectStart":191.29999995231628,"domainLookupEnd":191.29999995231628,"domainLookupStart":191.29999995231628,"fetchStart":191.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":191.29999995231628,"responseEnd":332.0999999642372,"responseStart":332.0999999642372,"secureConnectionStart":191.29999995231628},{"duration":144.30000001192093,"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":191.5999999642372,"connectEnd":191.5999999642372,"connectStart":191.5999999642372,"domainLookupEnd":191.5999999642372,"domainLookupStart":191.5999999642372,"fetchStart":191.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":191.5999999642372,"responseEnd":335.89999997615814,"responseStart":335.89999997615814,"secureConnectionStart":191.5999999642372},{"duration":145.10000002384186,"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":191.79999995231628,"connectEnd":191.79999995231628,"connectStart":191.79999995231628,"domainLookupEnd":191.79999995231628,"domainLookupStart":191.79999995231628,"fetchStart":191.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":191.79999995231628,"responseEnd":336.89999997615814,"responseStart":336.89999997615814,"secureConnectionStart":191.79999995231628},{"duration":145.60000002384186,"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":191.89999997615814,"connectEnd":191.89999997615814,"connectStart":191.89999997615814,"domainLookupEnd":191.89999997615814,"domainLookupStart":191.89999997615814,"fetchStart":191.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":191.89999997615814,"responseEnd":337.5,"responseStart":337.5,"secureConnectionStart":191.89999997615814},{"duration":210.9000000357628,"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":192.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":192.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403,"responseStart":0,"secureConnectionStart":0},{"duration":146.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":192.19999998807907,"connectEnd":192.19999998807907,"connectStart":192.19999998807907,"domainLookupEnd":192.19999998807907,"domainLookupStart":192.19999998807907,"fetchStart":192.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":192.19999998807907,"responseEnd":338.5,"responseStart":338.5,"secureConnectionStart":192.19999998807907},{"duration":210.69999998807907,"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":192.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":192.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.0999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":147,"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":192.5,"connectEnd":192.5,"connectStart":192.5,"domainLookupEnd":192.5,"domainLookupStart":192.5,"fetchStart":192.5,"redirectEnd":0,"redirectStart":0,"requestStart":192.5,"responseEnd":339.5,"responseStart":339.5,"secureConnectionStart":192.5},{"duration":314,"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":193.5,"connectEnd":193.5,"connectStart":193.5,"domainLookupEnd":193.5,"domainLookupStart":193.5,"fetchStart":193.5,"redirectEnd":0,"redirectStart":0,"requestStart":193.5,"responseEnd":507.5,"responseStart":507.5,"secureConnectionStart":193.5},{"duration":522.9000000357628,"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":193.5999999642372,"connectEnd":193.5999999642372,"connectStart":193.5999999642372,"domainLookupEnd":193.5999999642372,"domainLookupStart":193.5999999642372,"fetchStart":193.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":193.5999999642372,"responseEnd":716.5,"responseStart":716.5,"secureConnectionStart":193.5999999642372},{"duration":93.90000003576279,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":414.5999999642372,"connectEnd":414.5999999642372,"connectStart":414.5999999642372,"domainLookupEnd":414.5999999642372,"domainLookupStart":414.5999999642372,"fetchStart":414.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":414.5999999642372,"responseEnd":508.5,"responseStart":508.5,"secureConnectionStart":414.5999999642372},{"duration":38.40000003576279,"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":693.0999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":693.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":731.5,"responseStart":0,"secureConnectionStart":0},{"duration":124.60000002384186,"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":694.0999999642372,"connectEnd":694.0999999642372,"connectStart":694.0999999642372,"domainLookupEnd":694.0999999642372,"domainLookupStart":694.0999999642372,"fetchStart":694.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":694.0999999642372,"responseEnd":818.6999999880791,"responseStart":818.6999999880791,"secureConnectionStart":694.0999999642372},{"duration":155.0999999642372,"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":694.5,"connectEnd":694.5,"connectStart":694.5,"domainLookupEnd":694.5,"domainLookupStart":694.5,"fetchStart":694.5,"redirectEnd":0,"redirectStart":0,"requestStart":694.5,"responseEnd":849.5999999642372,"responseStart":849.5999999642372,"secureConnectionStart":694.5},{"duration":134.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":770.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":770.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":905.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":63,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":792.5,"connectEnd":792.5,"connectStart":792.5,"domainLookupEnd":792.5,"domainLookupStart":792.5,"fetchStart":792.5,"redirectEnd":0,"redirectStart":0,"requestStart":792.5,"responseEnd":855.5,"responseStart":855.5,"secureConnectionStart":792.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":7,"responseStart":184,"responseEnd":186,"domLoading":188,"domInteractive":938,"domContentLoadedEventStart":938,"domContentLoadedEventEnd":982,"domComplete":1050,"loadEventStart":1050,"loadEventEnd":1051,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":907.2999999523163},{"name":"bigPipe.sidebar-id.end","time":908.0999999642372},{"name":"bigPipe.activity-panel-pipe-id.start","time":908.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":909.3999999761581},{"name":"activityTabFullyLoaded","time":1008.5}],"measures":[],"correlationId":"efc8a64cfff19d","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":109,"dbReadsTimeInMs":18,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}