mysql> select dept_unit,count(encourage_kind_1) from rec group by dept_unit;
+-----------+-------------------------+
| dept_unit | count(encourage_kind_1) |
+-----------+-------------------------+
| AA10000 | 3 |
+-----------+-------------------------+
1 row in set (0.06 sec)mysql> select dept_unit,count(encourage_kind_1) from rec group by dept_unit;
+-----------+-------------------------+
| dept_unit | count(encourage_kind_1) |
+-----------+-------------------------+
| AA10000 | 3 |
+-----------+-------------------------+
1 row in set (0.08 sec)mysql> select dept_unit,count(encourage_kind_1) from rec group by dept_unit;
ERROR 1062 (23000): Duplicate entry 'AA10000' for key 1上面是我执行相同的SQL语句三次不同的结果,请问为什么??
+-----------+-------------------------+
| dept_unit | count(encourage_kind_1) |
+-----------+-------------------------+
| AA10000 | 3 |
+-----------+-------------------------+
1 row in set (0.06 sec)mysql> select dept_unit,count(encourage_kind_1) from rec group by dept_unit;
+-----------+-------------------------+
| dept_unit | count(encourage_kind_1) |
+-----------+-------------------------+
| AA10000 | 3 |
+-----------+-------------------------+
1 row in set (0.08 sec)mysql> select dept_unit,count(encourage_kind_1) from rec group by dept_unit;
ERROR 1062 (23000): Duplicate entry 'AA10000' for key 1上面是我执行相同的SQL语句三次不同的结果,请问为什么??
2、是连续执行还是中间进行过其它操作;
3、检查一下KEY 1中是否有重复的记录。
主键是单一的?
property of the column.你将dept_unit设为NOT NULL试试
如果每次都能重现的话,mysql的测试人员怎么测不出来
这个bug也不可能所有版本都有啊
所以还是lz提供下版本