[wp-trac] [WordPress Trac] #16070: Invalid SQL dates used by Wordpress
WordPress Trac
wp-trac at lists.automattic.com
Sun Jan 2 14:11:37 UTC 2011
#16070: Invalid SQL dates used by Wordpress
--------------------------+--------------------------------
Reporter: undid | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 3.0.4
Severity: critical | Keywords: date, sql, invalid
--------------------------+--------------------------------
It seems that Wordpress is using invalid SQL dates sometimes.
For example, in the file wp-includes/post.php, line 2233 :
> $post_date_gmt = '0000-00-00 00:00:00';
Depending on the SGBD it won't work because it is an invalid SQL date
(this date cannot exist in the DATETIME format). The minimum date we can
use is '1753-01-01 00:00:00', or 1970-01-01 depending on the
implementation.
If we use for example MariaDB 5.1, equivalent to MySQL 5.1 (but without
the MySQL bugs), with wordpress, this will lead to an error.
I think there is another files where such a value for datetime is used.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16070>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list