[wp-trac] [WordPress Trac] #26847: MySQL 5.6 default install can break WordPress

WordPress Trac noreply at wordpress.org
Thu Jan 16 06:20:28 UTC 2014


#26847: MySQL 5.6 default install can break WordPress
------------------------------------+------------------
 Reporter:  pento                   |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.9
Component:  Database                |     Version:  2.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by pento):

 To expand on my comment in #16821, setting the sql_mode when in WordPress
 is a solution involving changing the server settings, which I wasn't wild
 about.

 On further consideration, our other (actually viable) options would be:
 * Rewrite INSERT queries to INSERT IGNORE, which has the terrible side
 effect of ignoring warnings on other columns, not just the DATETIME
 columns.
 * Rewriting all queries so that write queries have zero dates converted to
 null, and read queries have null dates converted to zero, effectively
 adding a zero date compatibility layer.

 Both of these options have the down sides of hideous regexp, and they
 won't fix queries not run through WPDB.

 So, sql_mode isn't amazing, but it's the best option for fixing a bug that
 we actually need to pay attention to now.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26847#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list