Bug #15837 Convert datetime to integer as number of seconds from "zero time"
Submitted: 18 Dec 2005 22:45
Reporter: [ name withheld ] Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[18 Dec 2005 22:45] [ name withheld ]
Description:
IMHO it is not a good idea to consider datetime as integer because of:
- incorrect AVG() and other grouping functions
- incorrect comparision in between
- sometimes incorrect results in SELECT * FROM t WHERE column_datetime<(NOW()-123)

Could you please also change bug 9874 to S4 (feature request)?

How to repeat:
I'll post a bug reporting the last mentioned problem in a while

Suggested fix:
Convert datetime to integer as number of seconds from "zero time" (Y=0, m=0, d=0, H=0, i=0, s=0 GMT) as it is converted when using unixtime (but instead of unix epoch use 0000-00-00 00:00:00)