Description:
Documentation for MERGE engine:
https://dev.mysql.com/doc/refman/8.0/en/merge-storage-engine.html
states:
"The MERGE storage engine, also known as the MRG_MyISAM engine, is a collection of identical MyISAM tables that can be used as one. “Identical” means that all tables have identical column and index information. You cannot merge MyISAM tables in which the columns are listed in a different order, do not have exactly the same columns, or have the indexes in different order. However, any or all of the MyISAM tables can be compressed with myisampack."
However, I've found some differences not mentioned:
* Columns and indexes names can be different (definitely not obvious)
* Comments for tables, columns and indexes can be different (maybe more intuitive, but useful to mention)
How to repeat:
mysql> CREATE TABLE t1 (
-> one INT COMMENT '000',
-> two INT,
-> INDEX idx_one(one) COMMENT '!!!'
-> )
-> ENGINE MyISAM
-> COMMENT 'xxx';
Query OK, 0 rows affected (0.05 sec)
mysql> CREATE TABLE t2 (
-> uno INT COMMENT '999',
-> due INT,
-> INDEX idx_uno(uno) COMMENT '???'
-> )
-> ENGINE MyISAM
-> COMMENT 'YYY';
Query OK, 0 rows affected (0.05 sec)
mysql> CREATE TABLE t_mrg (
-> a INT,
-> b INT
-> ) ENGINE MERGE, UNION=(t1,t2);
Query OK, 0 rows affected (0.05 sec)
mysql> INSERT INTO t1 VALUES (1,1);
Query OK, 1 row affected (0.02 sec)
mysql> INSERT INTO t2 VALUES (2,2);
Query OK, 1 row affected (0.02 sec)
mysql> SELECT a,b FROM t_mrg;
+------+------+
| a | b |
+------+------+
| 1 | 1 |
| 2 | 2 |
+------+------+
2 rows in set (0.00 sec)
Suggested fix:
Clearly list all permitted differences.