[dev.icinga.com #3466] New handling of NULL or zero timestamps breaks earlier versions of MySQL with current schema #1174
This issue has been migrated from Redmine: https://dev.icinga.com/issues/3466
Created by crfriend on 2012-11-26 22:07:37 +00:00
The use of "FROM_UNIXTIME(NULL)" syntax in older versions of MySQL results in a NULL value being passed in inserts to tables where NULL values are disallowed for the affected column. E.g.:
I suggest the use of "0000-00-00 00:00:00" which is explicitly legal and not NULL.
Patch attached. And, yes, I do agree with the assertion in the comment in the code.
My assertion of "High" priority is because the issue causes problems for anybody using older versions of MySQL with the default db schema for Icinga. (And, unless running very recent patches, memory leaks.)
2012-11-28 14:53:21 +00:00 by mfriedrich 1042107
Updated by mfriedrich on 2012-11-28 14:57:15 +00:00
this is possibly the reason for #3399
fixed version on 5.1.x looks like this.