Force the use of a particular storage engine for new tables. Used to avoid unwanted creation of tables using another engine.
For example, setting to InnoDB will prevent any MyISAM tables from being created.
It also discusses "if another engine is specified in a CREATE TABLE statement" in connection with NO_ENGINE_SUBSTITUTION, however, this is not the case here as no other engine is specified in the CREATE TABLE.
When the following SQL is executed is the CLI:
SET sql_mode=''; # Disables NO_ENGINE_SUBSTITUTION
SET SESSION enforce_storage_engine=MyISAM;
CREATETABLE t (c INT) PARTITION BY LIST (c) (PARTITION p VALUESIN (0));
SHOW WARNINGS;
SHOW CREATETABLE t;
We expect the table to MyISAM. However, it is InnoDB (CLI default):
/*!40101 SET character_set_client = @saved_cs_client */;
Attempt to import as InnoDB:
set session sql_mode='';
set session enforce_storage_engine=innodb;
CREATE TABLE ...
You will encounter:
> ERROR 1497 (HY000): The mix of handlers in the partitions is not allowed in this version of MariaDB
I was able to work around this thanks to spaces in PARTITION specification of ENGINE not present in base table definition, eg:
`sed 's/ENGINE = MyISAM/ENGINE=INNODB/g'`
MG
added a comment - I am opting to report a similar issue in this MDEV rather than a new one.
Export an existing table with `mariadb-dump` as:
DROP TABLE IF EXISTS `t`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t` (
`month` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY LIST (`month`)
(PARTITION `p01` VALUES IN (1) ENGINE = MyISAM,
PARTITION `p02` VALUES IN (2) ENGINE = MyISAM,
PARTITION `p03` VALUES IN (3) ENGINE = MyISAM,
PARTITION `p04` VALUES IN (4) ENGINE = MyISAM,
PARTITION `p05` VALUES IN (5) ENGINE = MyISAM,
PARTITION `p06` VALUES IN (6) ENGINE = MyISAM,
PARTITION `p07` VALUES IN (7) ENGINE = MyISAM,
PARTITION `p08` VALUES IN (8) ENGINE = MyISAM,
PARTITION `p09` VALUES IN (9) ENGINE = MyISAM,
PARTITION `p10` VALUES IN (10) ENGINE = MyISAM,
PARTITION `p11` VALUES IN (11) ENGINE = MyISAM,
PARTITION `p12` VALUES IN (12) ENGINE = MyISAM);
/*!40101 SET character_set_client = @saved_cs_client */;
Attempt to import as InnoDB:
set session sql_mode='';
set session enforce_storage_engine=innodb;
CREATE TABLE ...
You will encounter:
> ERROR 1497 (HY000): The mix of handlers in the partitions is not allowed in this version of MariaDB
I was able to work around this thanks to spaces in PARTITION specification of ENGINE not present in base table definition, eg:
`sed 's/ENGINE = MyISAM/ENGINE=INNODB/g'`
People
Rucha Deodhar
Roel Van de Paar
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":954.5,"ttfb":264.5,"pageVisibility":"visible","entityId":130452,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"22e6c6c1-2348-4c8d-b1af-0fc1d57173d9","navigationType":0,"readyForUser":1052.5,"redirectCount":0,"resourceLoadedEnd":652.0999999046326,"resourceLoadedStart":269.5,"resourceTiming":[{"duration":36.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":269.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":306.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":36.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":269.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":306.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":220,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":269.7999997138977,"connectEnd":269.7999997138977,"connectStart":269.7999997138977,"domainLookupEnd":269.7999997138977,"domainLookupStart":269.7999997138977,"fetchStart":269.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":308.90000009536743,"responseEnd":489.7999997138977,"responseStart":329.69999980926514,"secureConnectionStart":269.7999997138977},{"duration":382,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":270.09999990463257,"connectEnd":270.09999990463257,"connectStart":270.09999990463257,"domainLookupEnd":270.09999990463257,"domainLookupStart":270.09999990463257,"fetchStart":270.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":313.69999980926514,"responseEnd":652.0999999046326,"responseStart":346.09999990463257,"secureConnectionStart":270.09999990463257},{"duration":68.10000038146973,"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":270.2999997138977,"connectEnd":270.2999997138977,"connectStart":270.2999997138977,"domainLookupEnd":270.2999997138977,"domainLookupStart":270.2999997138977,"fetchStart":270.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":314,"responseEnd":338.40000009536743,"responseStart":335.90000009536743,"secureConnectionStart":270.2999997138977},{"duration":67,"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":270.5,"connectEnd":270.5,"connectStart":270.5,"domainLookupEnd":270.5,"domainLookupStart":270.5,"fetchStart":270.5,"redirectEnd":0,"redirectStart":0,"requestStart":313.90000009536743,"responseEnd":337.5,"responseStart":335.2999997138977,"secureConnectionStart":270.5},{"duration":70,"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":270.59999990463257,"connectEnd":270.59999990463257,"connectStart":270.59999990463257,"domainLookupEnd":270.59999990463257,"domainLookupStart":270.59999990463257,"fetchStart":270.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":315.90000009536743,"responseEnd":340.59999990463257,"responseStart":338.7999997138977,"secureConnectionStart":270.59999990463257},{"duration":42.10000038146973,"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":270.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":312.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":70.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":271,"connectEnd":271,"connectStart":271,"domainLookupEnd":271,"domainLookupStart":271,"fetchStart":271,"redirectEnd":0,"redirectStart":0,"requestStart":316.2999997138977,"responseEnd":341.09999990463257,"responseStart":339.2999997138977,"secureConnectionStart":271},{"duration":42.700000286102295,"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":271.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":271.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":313.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":71.5,"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":271.2999997138977,"connectEnd":271.2999997138977,"connectStart":271.2999997138977,"domainLookupEnd":271.2999997138977,"domainLookupStart":271.2999997138977,"fetchStart":271.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":316.59999990463257,"responseEnd":342.7999997138977,"responseStart":341.5,"secureConnectionStart":271.2999997138977},{"duration":368.19999980926514,"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":277.5,"connectEnd":277.5,"connectStart":277.5,"domainLookupEnd":277.5,"domainLookupStart":277.5,"fetchStart":277.5,"redirectEnd":0,"redirectStart":0,"requestStart":368.69999980926514,"responseEnd":645.6999998092651,"responseStart":640.6999998092651,"secureConnectionStart":277.5},{"duration":369.5,"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":277.5,"connectEnd":277.5,"connectStart":277.5,"domainLookupEnd":277.5,"domainLookupStart":277.5,"fetchStart":277.5,"redirectEnd":0,"redirectStart":0,"requestStart":493.5,"responseEnd":647,"responseStart":643.0999999046326,"secureConnectionStart":277.5},{"duration":205.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":619.5,"connectEnd":619.5,"connectStart":619.5,"domainLookupEnd":619.5,"domainLookupStart":619.5,"fetchStart":619.5,"redirectEnd":0,"redirectStart":0,"requestStart":779.5,"responseEnd":825.4000000953674,"responseStart":824.7999997138977,"secureConnectionStart":619.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":80,"responseStart":264,"responseEnd":274,"domLoading":268,"domInteractive":1156,"domContentLoadedEventStart":1156,"domContentLoadedEventEnd":1215,"domComplete":1792,"loadEventStart":1792,"loadEventEnd":1792,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1133.7999997138977},{"name":"bigPipe.sidebar-id.end","time":1134.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1134.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.end","time":1136.4000000953674},{"name":"activityTabFullyLoaded","time":1228.2999997138977}],"measures":[],"correlationId":"9356642a6a4e19","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I am opting to report a similar issue in this MDEV rather than a new one.
Export an existing table with `mariadb-dump` as:
DROP TABLE IF EXISTS `t`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t` (
`month` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY LIST (`month`)
(PARTITION `p01` VALUES IN (1) ENGINE = MyISAM,
PARTITION `p02` VALUES IN (2) ENGINE = MyISAM,
PARTITION `p03` VALUES IN (3) ENGINE = MyISAM,
PARTITION `p04` VALUES IN (4) ENGINE = MyISAM,
PARTITION `p05` VALUES IN (5) ENGINE = MyISAM,
PARTITION `p06` VALUES IN (6) ENGINE = MyISAM,
PARTITION `p07` VALUES IN (7) ENGINE = MyISAM,
PARTITION `p08` VALUES IN (8) ENGINE = MyISAM,
PARTITION `p09` VALUES IN (9) ENGINE = MyISAM,
PARTITION `p10` VALUES IN (10) ENGINE = MyISAM,
PARTITION `p11` VALUES IN (11) ENGINE = MyISAM,
PARTITION `p12` VALUES IN (12) ENGINE = MyISAM);
/*!40101 SET character_set_client = @saved_cs_client */;
Attempt to import as InnoDB:
set session sql_mode='';
set session enforce_storage_engine=innodb;
CREATE TABLE ...
You will encounter:
> ERROR 1497 (HY000): The mix of handlers in the partitions is not allowed in this version of MariaDB
I was able to work around this thanks to spaces in PARTITION specification of ENGINE not present in base table definition, eg:
`sed 's/ENGINE = MyISAM/ENGINE=INNODB/g'`