Insert MyISAM key into a INNODB table

后端 未结 1 1291
被撕碎了的回忆
被撕碎了的回忆 2021-01-14 18:13

I\'m using this table structure for a \'toxi\' like TAGs system

table TAGS

+--------+-------------------+
| alias  | isactive          |  varchar(55), tinyi         


        
相关标签:
1条回答
  • 2021-01-14 18:18

    You cannot create foreign keys in InnoDB tables referencing MyISAM tables.

    Foreign keys definitions are subject to the following conditions:

    Both tables must be InnoDB tables and they must not be TEMPORARY tables.

    http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html

    So yes, you will have to manually enforce the constraints from your application code if you do not change the storage engine.

    LIKE '%XXX%' searches are not fulltext; unless you actually specified a fulltext index and are using fulltext matching functions, you do not need to use the MyISAM engine.

    0 讨论(0)
提交回复
热议问题