Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#10387 closed defect (bug) (duplicate)

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

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

Description

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 16 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ryan
16 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.