[wp-trac] [WordPress Trac] #15948: dbDelta SET Default <literal> Comment <literal>
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 22 14:34:46 UTC 2010
#15948: dbDelta SET Default <literal> Comment <literal>
-----------------------------+-----------------------------
Reporter: hbanken | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 3.1
Severity: major | Keywords: sql, regex
-----------------------------+-----------------------------
When dbDelta from wp_admin/includes/upgrade.php is used with a query
containing different DEFAULT values than the actual TABLE in the database,
dbDelta tries to update this DEFAULT value by altering the table. The
regex that is used to find the new DEFAULT value is incorrect.
Right now, the regex is '''| DEFAULT '(.*)'|i''' but this should be '''|
DEFAULT '([^']*)'|i'''. Since, in the case a COMMENT value is set in the
new query, the COMMENT value is also surrounded by single quotes ''''
COMMENT 'literal''' is added to the new default value.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15948>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list