[wp-trac] [WordPress Trac] #13715: dbDelta produces warnings
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 11 03:00:25 UTC 2010
#13715: dbDelta produces warnings
-----------------------------+----------------------------------------------
Reporter: mitchoyoshitaka | Owner: westi
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 3.0
Component: Database | Version: 3.0
Severity: normal | Keywords: has-patch
-----------------------------+----------------------------------------------
Comment(by nacin):
Committing this now.
Mitcho, you'll actually have a separate issue with your create table
statement, in that you'll end up with duplicate cookie indexes each time
it runs.
The issue is that dbDelta is incredibly finicky and requires exacting
specifications in some cases, and sometimes throwing a fight over
whitespace. The Codex is pretty good about explaining this, and otherwise
sticking to the queries that core use is a good bet.
In this case, defining UNIQUE KEY with the cookie field is causing dbDelta
to keep creating indexes. I did not look into why, but moving `UNIQUE KEY
cookie (cookie)` to its own line at the end of the statement fixed it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13715#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list