Description:
MySQL Docu does not reflect that archive SE supports partitioning.
http://dev.mysql.com/doc/refman/5.7/en/archive-storage-engine.html
This is an important feature for a storage engine that does not support indexes because only 1/nth of work has to be done.
How to repeat:
CREATE TABLE ptn_archive_test (
id INT UNSIGNED NOT NULL
, data VARCHAR(64)
, ts TIMESTAMP
) ENGINE = Archive
PARTITION BY RANGE ( UNIX_TIMESTAMP(ts) ) (
PARTITION p_2015 VALUES LESS THAN ( UNIX_TIMESTAMP('2016-01-01 00:00:00') )
, PARTITION p_2016 VALUES LESS THAN ( UNIX_TIMESTAMP('2017-01-01 00:00:00') )
, PARTITION p_max VALUES LESS THAN ( MAXVALUE )
);
INSERT INTO ptn_archive_test VALUES
(1, 'some data', '2015-12-30 00:00:01')
, (2, 'some data', '2015-12-30 00:00:02')
, (3, 'some data', '2015-12-30 00:00:03')
, (4, 'some data', '2016-01-30 00:00:01')
, (5, 'some data', '2016-01-30 00:00:02')
, (6, 'some data', '2016-01-30 00:00:03')
, (7, 'some data', '2017-02-28 00:00:01')
, (8, 'some data', '2017-02-28 00:00:02')
, (9, 'some data', '2017-02-28 00:00:03')
;
explain partitions
select * from ptn_archive_test
where ts >= '2016-01-01 00:00:00' and ts < '2017-01-01 00:00:00';
Suggested fix:
Either docu is not complete or the feature should be suppressed if it does not work correctly or as expected.
So it is either a doku bug or database bug.