I'm getting a duplicate entry error when trying to create a new UNIQUE KEY
in a situation that should be impossible. I currently have a UNIQUE KEY mykey (column_a, column_b)
and I'm now trying to run ALTER TABLE mytable ADD UNIQUE KEY mykey2 (column_a, column_b, column_c)
and getting a duplicate entry error. How could this possibly be?
It's a very active table, so my first instinct was a race condition, but the original key should still prevent any duplicates.