The following test fails with error "ERROR HY000: Tables have different definitions":
--source include/have_partition.inc
|
--source include/have_archive.inc
|
|
CREATE TABLE t1(a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=ARCHIVE PARTITION BY HASH (a) PARTITIONS 4;
|
CREATE TABLE t2 LIKE t1;
|
ALTER TABLE t2 REMOVE PARTITIONING;
|
ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2;
|
DROP TABLE t1,t2;
|
While performing exchange partition we call mysql_compare_tables()/ha_archive::check_if_incompatible_data(). In MariaDB this function always return COMPATIBLE_DATA_NO.
Covered by the following tests: parts.partition_mgm_lc1_archive parts.partition_exchange_archive parts.partition_mgm_lc0_archive rpl.rpl_partition_archive. Enable them when this bug is fixed.
- relates to
-
MDEV-4864
Merge tests for EXCHANGE PARTITION feature
-
-
Closed
{"report":{"fcp":813,"ttfb":198.10000038146973,"pageVisibility":"visible","entityId":25826,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"c88f3930-75fa-4ad4-b2f3-aad7de6b1576","navigationType":0,"readyForUser":888.6000003814697,"redirectCount":0,"resourceLoadedEnd":918.3999996185303,"resourceLoadedStart":203.60000038146973,"resourceTiming":[{"duration":20.899999618530273,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":203.60000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":203.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":224.5,"responseStart":0,"secureConnectionStart":0},{"duration":20.800000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":204,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":204,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":224.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":77.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":204.10000038146973,"connectEnd":204.10000038146973,"connectStart":204.10000038146973,"domainLookupEnd":204.10000038146973,"domainLookupStart":204.10000038146973,"fetchStart":204.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":204.10000038146973,"responseEnd":281.3999996185303,"responseStart":281.3999996185303,"secureConnectionStart":204.10000038146973},{"duration":186.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":204.30000019073486,"connectEnd":204.30000019073486,"connectStart":204.30000019073486,"domainLookupEnd":204.30000019073486,"domainLookupStart":204.30000019073486,"fetchStart":204.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":204.30000019073486,"responseEnd":391.19999980926514,"responseStart":391.19999980926514,"secureConnectionStart":204.30000019073486},{"duration":190.60000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":204.5,"connectEnd":204.5,"connectStart":204.5,"domainLookupEnd":204.5,"domainLookupStart":204.5,"fetchStart":204.5,"redirectEnd":0,"redirectStart":0,"requestStart":204.5,"responseEnd":395.1000003814697,"responseStart":395,"secureConnectionStart":204.5},{"duration":191.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":204.69999980926514,"connectEnd":204.69999980926514,"connectStart":204.69999980926514,"domainLookupEnd":204.69999980926514,"domainLookupStart":204.69999980926514,"fetchStart":204.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":204.69999980926514,"responseEnd":395.80000019073486,"responseStart":395.80000019073486,"secureConnectionStart":204.69999980926514},{"duration":191.60000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":204.89999961853027,"connectEnd":204.89999961853027,"connectStart":204.89999961853027,"domainLookupEnd":204.89999961853027,"domainLookupStart":204.89999961853027,"fetchStart":204.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":204.89999961853027,"responseEnd":396.5,"responseStart":396.5,"secureConnectionStart":204.89999961853027},{"duration":222,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":205,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":205,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":427,"responseStart":0,"secureConnectionStart":0},{"duration":192,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":205.30000019073486,"connectEnd":205.30000019073486,"connectStart":205.30000019073486,"domainLookupEnd":205.30000019073486,"domainLookupStart":205.30000019073486,"fetchStart":205.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":205.30000019073486,"responseEnd":397.30000019073486,"responseStart":397.30000019073486,"secureConnectionStart":205.30000019073486},{"duration":221.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":205.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":205.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":427.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":192.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":205.69999980926514,"connectEnd":205.69999980926514,"connectStart":205.69999980926514,"domainLookupEnd":205.69999980926514,"domainLookupStart":205.69999980926514,"fetchStart":205.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":205.69999980926514,"responseEnd":398.1000003814697,"responseStart":398.1000003814697,"secureConnectionStart":205.69999980926514},{"duration":338.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":206.5,"connectEnd":206.5,"connectStart":206.5,"domainLookupEnd":206.5,"domainLookupStart":206.5,"fetchStart":206.5,"redirectEnd":0,"redirectStart":0,"requestStart":206.5,"responseEnd":544.8999996185303,"responseStart":544.8999996185303,"secureConnectionStart":206.5},{"duration":544.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":206.60000038146973,"connectEnd":206.60000038146973,"connectStart":206.60000038146973,"domainLookupEnd":206.60000038146973,"domainLookupStart":206.60000038146973,"fetchStart":206.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":206.60000038146973,"responseEnd":751.1999998092651,"responseStart":751.1999998092651,"secureConnectionStart":206.60000038146973},{"duration":109.59999942779541,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":439.30000019073486,"connectEnd":439.30000019073486,"connectStart":439.30000019073486,"domainLookupEnd":439.30000019073486,"domainLookupStart":439.30000019073486,"fetchStart":439.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":439.30000019073486,"responseEnd":548.8999996185303,"responseStart":548.8999996185303,"secureConnectionStart":439.30000019073486},{"duration":195.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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":722.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":722.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":918.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":195.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/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":722.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":722.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":918.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":259.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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":723.8000001907349,"connectEnd":723.8000001907349,"connectStart":723.8000001907349,"domainLookupEnd":723.8000001907349,"domainLookupStart":723.8000001907349,"fetchStart":723.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":723.8000001907349,"responseEnd":983.3000001907349,"responseStart":983.3000001907349,"secureConnectionStart":723.8000001907349},{"duration":265.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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":724.1000003814697,"connectEnd":724.1000003814697,"connectStart":724.1000003814697,"domainLookupEnd":724.1000003814697,"domainLookupStart":724.1000003814697,"fetchStart":724.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":724.1000003814697,"responseEnd":989.6999998092651,"responseStart":989.6999998092651,"secureConnectionStart":724.1000003814697},{"duration":266.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/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":724.5,"connectEnd":724.5,"connectStart":724.5,"domainLookupEnd":724.5,"domainLookupStart":724.5,"fetchStart":724.5,"redirectEnd":0,"redirectStart":0,"requestStart":724.5,"responseEnd":991.3999996185303,"responseStart":991.3999996185303,"secureConnectionStart":724.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":46,"responseStart":198,"responseEnd":201,"domLoading":201,"domInteractive":947,"domContentLoadedEventStart":947,"domContentLoadedEventEnd":988,"domComplete":1221,"loadEventStart":1221,"loadEventEnd":1221,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":925.1999998092651},{"name":"bigPipe.sidebar-id.end","time":926.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":926.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":927.8000001907349},{"name":"activityTabFullyLoaded","time":1007.3999996185303}],"measures":[],"correlationId":"21427d645883b1","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
It's easy to fix ha_archive::check_if_incompatible_data():
enum_alter_inplace_result check_if_supported_inplace_alter(TABLE *, Alter_inplace_info *);
{ return HA_ALTER_INPLACE_NOT_SUPPORTED; }bool check_if_incompatible_data(HA_CREATE_INFO *, uint)
{ return COMPATIBLE_DATA_YES; }this will make mysql_compare_tables() to work, while still disabling frm-only ALTER TABLE.
But ALTER TABLE .. EXCHANGE PARTITION still won't work — it's conceptually incompatible with Archive engine. ALTER TABLE .. EXCHANGE PARTITION essentially swap ARZ file of the specified partition and the ARZ file of the specified table. Without touching frm files. Because Archive stores a copy of the frm in the ARZ file, they go out of sync, and the next time the table is opened, Archive will notice it. Other engines that do frm shipping could, perhaps, update the stored frm copy on rename. But Archive keeps frm in the header of the ARZ file, it would need to re-compress the complete ARZ file to replace the stored frm image.