我在一个复制的数据库上,在原来的数据库上,一切都插入正常,但在复制的数据库上,我确实收到以下错误:
"Duplicate entry '18' for key 'abc'"
这让我完全困惑,因为:
mysql> show index from table;
+------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| table | 1 | abc | 1 | abc | A | NULL | NULL | NULL | | BTREE | | |
+------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
可以清楚地看到,这是一个非唯一的列......但不知何故它有一个重复的条目?
有没有人也遇到过这个错误?
MySQL: mysql Ver 14.14 Distrib 5.5.30, for Linux (x86_64) using readline 5.1
OS: Debian GNU/Linux 6.0
谢谢!