[wp-trac] [WordPress Trac] #18609: term_id collisions possible with InnoDB tables and global_terms_enabled

WordPress Trac noreply at wordpress.org
Tue Dec 23 17:22:36 UTC 2014


#18609: term_id collisions possible with InnoDB tables and global_terms_enabled
----------------------------------------+-----------------------------
 Reporter:  andrew_l                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  lowest                      |   Milestone:  Future Release
Component:  Taxonomy                    |     Version:  3.2.1
 Severity:  major                       |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------

Comment (by purcebr):

 What if we deleted the term from the db and recreated it with the
 global_id instead of updating the term with a new ID? Inserting a term
 properly updates the auto_incrementer and prevents this issue from
 cropping up in my dev environment. Not sure if this idea has been proposed
 already, but I've attached a patch with what I was thinking could work.

 I'm not sure how we'd reorder this process without a larger refactor of
 global_terms(). The Local term gets created first, and the precondition
 for the global_terms($term_id) function is that the term_id is a created
 term, and the local term_id update requires an already-created global
 term.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/18609#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list