[wp-trac] [WordPress Trac] #8857: Make WP MySQL strict mode compliant
WordPress Trac
noreply at wordpress.org
Mon Nov 9 22:36:20 UTC 2020
#8857: Make WP MySQL strict mode compliant
-------------------------+-----------------------
Reporter: ghostks | Owner: (none)
Type: enhancement | Status: reopened
Priority: lowest | Milestone:
Component: Database | Version: 2.7
Severity: minor | Resolution:
Keywords: | Focuses:
-------------------------+-----------------------
Changes (by nsinelnikov):
* status: closed => reopened
* resolution: wontfix =>
Comment:
Basically, I have found this issue on this page
(https://codex.wordpress.org/Creating_Tables_with_Plugins)
The DateTime value shown in the example is 0000-00-00 00:00:00 which is
out-of-range. According to information found around the net:
https://mysqlconnector.net/troubleshooting/datetime-storage/
https://dev.mysql.com/doc/refman/8.0/en/datetime.html
https://www.mysqltutorial.org/mysql-datetime/
The minimum supported value for a DATETIME column is 1000-01-01 00:00:00
A @johnbillion pointed out, this value for the date range is in core:
https://github.com/johnbillion/wordpress-
develop/blob/3f9172b5e141f30a78cffde1c1f384b34cea3864/src/wp-
admin/includes/schema.php#L162-L175
This can be a very deep core question and dbDelta WP installation queries
as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/8857#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list