Find duplicate rows violating unique constraint
<pre><code>mysql&gt; select user_id, content_type_id, object_id, count(*) as num 
from vote_vote group by user_id, content_type_id, object_id 
having num &gt; 1;

+----------+-----------------+-----------+-----+
| user_id  | content_type_id | object_id | num |
+----------+-----------------+-----------+-----+
| 25754992 |             961 |   3665767 |   2 |
| 38896810 |             961 |   3733660 |   3 |
+----------+-----------------+-----------+-----+
</code></pre>

<p>The unique key is show in "show create table"</p>

<pre><code>UNIQUE KEY `user_id` (`user_id`,`content_type_id`,`object_id`),
</code></pre>

<p>My Question:
How can this be happened? <strong>Why the unique key does not work</strong> on these records?</p>

<p>Some more strange results:</p>

<p><a href="https://i.stack.imgur.com/DDTsz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DDTsz.png" alt="enter image description here"></a></p>

<p><code>show create table</code> output:</p>

<p><a href="https://i.stack.imgur.com/IXRGy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IXRGy.png" alt="enter image description here"></a></p>