From MySQL version 8.0, you are not allowed to create MyISAM partition table, and allows the creation of local partitioning strategy has been achieved in the engine.
So far, only InnoDB and NDB engine supports both local partitioning strategy.
[1] The actual test
(1) database version number
# Get the version number of the SELECT VERSION (); # 8.0 . 12
(2) The engine key table InnoDB
CREATE TABLE `t_innodb` ( `ftime` DATETIME NOT NULL, `c` INT(11) DEFAULT NULL, KEY (`ftime`) ) ENGINE=INNODB DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(ftime)) (PARTITION p_2017 VALUES LESS THAN (2017) ENGINE = INNODB, PARTITION p_2018 VALUES LESS THAN (2018) ENGINE = INNODB, PARTITION p_2019 VALUES LESS THAN (2019) ENGINE = INNODB, PARTITION p_others VALUES LESS THAN MAXVALUE ENGINE = INNODB);
Creating successful.
(3) MyiSAM engine
CREATE TABLE `t_myisam` ( `ftime` DATETIME NOT NULL, `c` INT(11) DEFAULT NULL, KEY (`ftime`) ) ENGINE=INNODB DEFAULT CHARSET=latin1 PARTITION BY RANGE (YEAR(ftime)) (PARTITION p_2017 VALUES LESS THAN (2017) ENGINE = MYISAM, PARTITION p_2018 VALUES LESS THAN (2018) ENGINE = MYISAM, PARTITION p_2019 VALUES LESS THAN (2019) ENGINE = MYISAM, PARTITION p_others VALUES LESS THAN MAXVALUE ENGINE = MYISAM);
Creation failed:
Good Good Study, Day Day Up.
Select the cycle order summary