P4DTI issue job000193

TitleBugzilla integration fails if DateTime module is installed
Assigned userNick Barnes
DescriptionThe Bugzilla integration breaks if the Python DateTime module is installed on the P4DTI server system.
The Python DateTime module <URL: http://www.lemburg.com/files/python/mxDateTime.html> is a third-party module for creating and manipulating dates and times. If it is present, MySQLdb uses DateTime types for time fields (date, time, datetime, and timestamp). However, this MySQLdb/DateTime combination breaks when a MySQL field contains a zero value (e.g. "0000-00-00 00:00:00"). This happens in Bugzilla (e.g. the 'lastdiffed' field of a new bug).
We have not tested the P4DTI with the DateTime module at all; it is possible that using it causes other problems even if zero datetimes are not present.
I have reported this problem to the author of MySQLdb, Andy Dustman <URL: mailto:andy@dustman.net>.
AnalysisThe P4DTI has been written and tested without the DateTime module. In that case, MySQLdb can't import the things it needs from DateTime and reverts to handling time fields as strings. We can force this behaviour by adding an empty DateTime.py module to our sources.
A better approach is to use the mechanism provided for manipulating MySQLdb's type conversion functions.
How foundmanual_test
Evidence<URL: http://www.ravenbrook.com/project/p4dt...c/2001-01-29/release-0.5.1-test-report/>
Observed in0.5.1
Introduced in0.5.0
Created byNick Barnes
Created on2001-02-06 14:50:49
Last modified byGareth Rees
Last modified on2010-10-06 21:37:55
History2001-02-06 NB Created.
2001-02-19 GDR Downgraded to optional.


Change Effect Date User Description
8193 closed 2001-02-08 12:01:47 Nick Barnes Prevent the presence of the DateTime python module from breaking the P4DTI.