Patch to make install succeed with MySQL running under sql-mode=TRADITIONAL
|Reported by:||robbiebow||Owned by:||dd32|
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.