WordPress.org

Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #15948


Ignore:
Timestamp:
12/22/10 14:46:13 (3 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15948 – Description

    initial v2  
    11When 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.  
    22 
    3 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. 
     3Right now, the regex is: 
     4 
     5{{{ 
     6| DEFAULT '(.*)'|i 
     7}}}  
     8 
     9but this should be: 
     10 
     11{{{ 
     12| DEFAULT '([^']*)'|i 
     13}}} 
     14 
     15...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.