Bug #103983 Native cloning should work with BLACKHOLE tables (e.g. just copy definition)
Submitted: 11 Jun 2021 16:40 Modified: 30 Oct 2023 17:22
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Clone Plugin Severity:S4 (Feature request)
Version:8.0, 8.1, 8.2 OS:Any
Assigned to: CPU Architecture:Any
Tags: 8.0, 8.1, 8.2, blackhole, cloning, native_cloning

[11 Jun 2021 16:40] Simon Mudd
Description:
Native cloning requires all tables to be of type InnoDB.

MyISAM and CSV tables definitions are just copied which might be dangerous for user data but ok for the mysql database.

Related to: bug#103866

However, I just bumped into another engine where it should be fine to allow it to be copied using native cloning by copying the definition only: the blackhole table.  It never has data so that should be fine.

How to repeat:
If you try to do this now you get an error.
See: https://dev.mysql.com/doc/refman/8.0/en/clone-plugin-limitations.html

Suggested fix:
Please allow blackhole tables to be copied by native cloning, copying the definition from one server to another.

blackhole tables may be used in production for a number of reasons so handling them is good and the change should be simple.
[12 Jun 2021 7:19] MySQL Verification Team
Hello Simon,

Thank you for the reasonable feature request!

regards,
Umesh
[30 Oct 2023 17:22] Simon Mudd
While I use native cloning a lot for cloning servers using traditional replication, this is also a blocker for moving to Group Replication as GR will also refuse to clone (and work) if blackhole tables are present.

Again, while the blackhole table type might seem somewhat strange there are a few use cases where it can be useful so supporting this for DML and DDL and GR actually turns out to be useful in a number of different scenarios.

Remember all that's needed is for the table definition to be copied over between hosts as no data copy is needed.