Opened 15 years ago
Closed 15 years ago
#11437 closed defect (bug) (fixed)
Option inserts triggered from front page can cause duplicate entry errors
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Database | Keywords: | has-patch |
Focuses: | Cc: |
Description
WordPress database error Duplicate entry '_site_transient_timeout_theme_roots' for key 2 for query INSERT INTO `options` (`option_name`,`option_value`,`autoload`) VALUES ('_site_transient_timeout_theme_roots','1260638876','yes') made by require, require_once, require_once, require_once, get_template_directory, get_theme_root, get_theme_roots, get_themes, set_site_transient, add_site_option, add_option
On a busy site, this insert can be triggered multiple times. A race condition results with the losers creating a duplicate key error. One solution is to use ON DUPLICATE KEY UPDATE.
Attachments (2)
Change History (5)
Note: See
TracTickets for help on using
tickets.
http://dev.mysql.com/doc/refman/4.1/en/insert-on-duplicate.html
Added in mysql 4.1.