Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
From https://drupal.org/comment/8456097#comment-8456097
The why this is a bad idea: http://openquery.com.au/blog/innodb-primary-key
Comment | File | Size | Author |
---|---|---|---|
taxonomy_index_primary_key.patch | 529 bytes | danblack | |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedThis is a good idea. I was reviewing my slow query log and taxonomy_index showed up on it. Giving the table a primary key should help & these are the correct things to index. This needs to be backported to D7 as well. Patch looks good. The backport will be harder to do.
Comment #2
alexpottCommitted 1d198fb and pushed to 8.x. Thanks!
Comment #4
fietserwinA (very little) bit of searching before creating this issue should have revealed issue #610076: Add a primary key to the {taxonomy_index} table and prevent duplicates being inserted.
I propose to revert this issue as it is going to lead to the integrity constraint violation errors because the cause of inserting duplicate entries (no language part in the key) still exists (AFAIK).
I cannot assign to @alexpott, so I hope he will read this anyway.
After reverting, we can close this as a duplicate and work on a complete solution in the other issue.
Comment #5
fietserwinI guess that this status makes it more probable that this issue is going to be read.
Comment #7
fietserwinThis doesn't work, we leave this issue as is, the backport will be done in the other issue.
@danblack, @mikeytown2: can you review the patch in #610076: Add a primary key to the {taxonomy_index} table and prevent duplicates being inserted, so we can fix head!