Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#10387 closed defect (bug) (duplicate)

Patch to make install succeed with MySQL running under sql-mode=TRADITIONAL

Reported by: robbiebow Owned by: dd32
Milestone: Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords:
Focuses: Cc:


Installing a new instance of Wordpress will fail to create some of the tables described in schema.php if you are running MySQL under "strict" mode. The tables affected have invalid default datetime values of "0000-00-00 00:00:00", hence the failure. This patch changes the default values to "1970-01-01 00:00:00".

To replicate the issue start MySQL in strict mode (i.e. add

sql-mode  = "TRADITIONAL"

to your my.cnf and restart the MySQL server) and try to go through the install process.

I have not tested the affect this change has on normal operations after the install, save for logging in, editing, adding and deleting posts & comments - all of which appear to be fine.

Attachments (1)

schema.php.patch (2.6 KB) - added by robbiebow 9 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ryan
9 years ago

  • Milestone Unassigned deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See #8857 and #9224

Note: See TracTickets for help on using tickets.