MySQL 5.7 – Deprecated Partitioning Method Warning Error

MySQLpartitioning

I have here a couple of MySQL DB tables optimised with partitioning as in:

ALTER TABLE radpostauth PARTITION BY HASH(id) PARTITIONS 32;

With the upgrade do MySQL 5.7, the following warning started appearing in the error logs:

The partition engine, used by table 'y.radpostauth', is deprecated and 
will be removed in a future release. Please use native partitioning instead.

I have an idea I can do an ALTER TABLE REBUILD however, no clue about what to do to make it compliant to 5.7 and beyond.

What do you advise?

Best Answer

As of MySQL 5.7.17, the generic partitioning handler in the MySQL server is deprecated, and is removed in MySQL 8.0, when the storage engine used for a given table is expected to provide its own (“native”) partitioning handler. Currently, only the InnoDB and NDB storage engines do.

Use of tables with nonnative partitioning results in such warning written in error log.The MySQL server checks tables that using nonnative partitioning at startup.

To disable this check, use the --disable-partition-engine-check option.

Tables with nonnative partitioning should be changed to use an engine that provides native partitioning as shown below.

ALTER TABLE table_name ENGINE = INNODB;

Reference:

  • Partitioning