MGR 需要使用主键
验证MGR架构表需要使用主键,不然插入数据会报错。
mysql> show tables; +--------------+ | Tables_in_dd | +--------------+ | a | +--------------+ 1 row in set (0.00 sec) mysql> desc a; +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | +-------+---------+------+-----+---------+-------+ 1 row in set (0.00 sec) mysql> insert into a values(1); ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin. mysql> alter table a add primary key (id); Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> desc a; +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+-------+ | id | int(11) | NO | PRI | NULL | | +-------+---------+------+-----+---------+-------+ 1 row in set (0.01 sec) mysql> insert into a values(1); Query OK, 1 row affected (0.00 sec) mysql> insert into a values(1); Query OK, 1 row affected (0.00 sec) mysql> select * from a; +----+ | id | +----+ | 1 | +----+ 1 row in set (0.00 sec)
相关推荐
翡翠谷 2020-01-14
踩风火轮的乌龟 2020-01-07
pingyan 2019-12-27
xushxbigbear微信 2019-12-26
yunjinwang 2013-07-09
mycosmos 2019-11-06
lwplvx 2011-04-17
lsg00 2019-06-30
lemontreeshy 2019-06-26
81991935 2009-05-08
zhoutongit 2010-04-09
guozewei0 2012-05-30
austindev 2008-10-07
TopsLuo 2013-07-09
柳木木的IT 2018-10-22
EasyOrange 2014-03-15
wgPython 2019-04-19