[wp-hackers] Improving WordPress' Performance WAS Changing MySQL minimum version

John Joseph Bachir jjb at ibiblio.org
Fri Dec 1 18:24:11 GMT 2006


On Thu, 30 Nov 2006, Ryan Boren wrote:

> The get/set option API enforces unique option names, I believe, but I've 
> seen some databases that had duplicate keys nonetheless.  What happens 
> when we make the key unique but have dupe names in the DB?

So any dulicate keys would be the result of either core or plugin 
application error right? I guess the UNIQUE index would then have the 
added benefit of possibly bringing these types of errors to the 
developer's attention.

But upgrading an existing database to the UNIQUE index does then pose a 
challenge, because it would require a script to scan for and somehow 
handle dupe keys. Since selects for these dupe keys (LIMIT 1) have 
undefined behavior, there is no theoretical risk in just deleting all but 
one instance of any dupes.

--Unless there are some plugins out there that actually DEPEND on dupe 
keys for some reason. Anyone know of such plugins?

John
----
aim/yim/msn/jabber.org: johnjosephbachir
713.494.2704
irc://irc.freenode.net/lyceum
http://lyceum.ibiblio.org/
http://blog.johnjosephbachir.org/


More information about the wp-hackers mailing list