如何从分区表和未分区表创建合并表

时间:2013-01-29 08:54:00

标签: mysql merge union

我在mysql表中有一个分区表和一个未分区的表。我想为这两个表创建一个联合合并表。问题是,在创建合并表后,当我尝试访问该表时出现此错误:Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist

当我运行check table命令时,我收到以下错误(ptable是分区表):

Table 'mydb.ptable' is differently defined or of non-MyISAM type or doesn't exist
Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
Corrupt

2 个答案:

答案 0 :(得分:0)

  • 您确定分区表和非分区表都是MyISAM类型吗?他们应该是。 (请确保'ptable'属于MyIsam类型)。

    继续阅读here

答案 1 :(得分:0)

从MySQL文档中,你不能在MERGE存储引擎中使用带分区的表

MERGE表不支持分区。也就是说,您不能对MERGE表进行分区,也不能对MERGE表的任何底层MyISAM表进行分区。