[MDEV-22259] Duplicate entry `a-b-c` for key 'a_b_c_unique' when altering table Created: 2020-04-16 Updated: 2020-06-30 Resolved: 2020-06-30 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.4.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sylvain RUMEU | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
debian 9, installed from official mariadb repo |
||
| Description |
|
Hello I have a table with an unique index
When trying to modify date from "not null" to "null", I have these errors
No duplicate found
The key found unique is never the same. I tried to optimize the table to simulate a drop/create without success I'm on an environment production EDIT : The same operation on dev and staging are ok. We have a dump re-executed each week on these environments |
| Comments |
| Comment by Daniel Black [ 2020-04-18 ] | |||||||||||||||||||||||||||
|
Do the reported duplicate key entries reported actually exist in your database? Do their FK table entries exist? Couldn't reproduce on a simple case: | |||||||||||||||||||||||||||
| Comment by Sylvain RUMEU [ 2020-04-18 ] | |||||||||||||||||||||||||||
|
They exists, once each
| |||||||||||||||||||||||||||
| Comment by Sylvain RUMEU [ 2020-04-21 ] | |||||||||||||||||||||||||||
|
I forgot to check refs tables :
(I had almost no doubt they exists, as we never had to disable foreign key checks) | |||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2020-05-01 ] | |||||||||||||||||||||||||||
|
Are there any errors in the error log? Does your dev environment have exact same server configuration as the production? | |||||||||||||||||||||||||||
| Comment by Sylvain RUMEU [ 2020-05-01 ] | |||||||||||||||||||||||||||
|
CHECK TABLE did not report error. There is nothing in error log FYI, the "destructive" warning is an option to add in .myclirc, I've set this on the environment production to avoid some mess And sorry, but we had a master/slave configuration, the server had a very bad crash, we have stoped the master1, turned the slave2 into master2, completely trashed master1 to build a slave1... And the error is gone I made the alter without error on the "new" master |