agesys-dev team mailing list archive
-
agesys-dev team
-
Mailing list archive
-
Message #00030
[Bug 672059] [NEW] Improper handling of DATE, DATETIME, and TIMESTAMP fields
Public bug reported:
If improper data is passed to these fields, or they are left blank while
set to NOT NULL, MySQL will force their fields all to zero. The type
handling code for 'fetchone' is not set up for this possibility, and the
datetime module cannot handle such nonsensical dates, so the fetch
fails. The old behavior for the MySQLdb module was to return None.
Attached patch emulates that behavior.
** Affects: oursql
Importance: Undecided
Status: New
--
Improper handling of DATE, DATETIME, and TIMESTAMP fields
https://bugs.launchpad.net/bugs/672059
You received this bug notification because you are a member of Agesys
Team, which is subscribed to oursql.
Status in oursql python bindings for mysql: New
Bug description:
If improper data is passed to these fields, or they are left blank while set to NOT NULL, MySQL will force their fields all to zero. The type handling code for 'fetchone' is not set up for this possibility, and the datetime module cannot handle such nonsensical dates, so the fetch fails. The old behavior for the MySQLdb module was to return None. Attached patch emulates that behavior.
Follow ups
-
[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: J Derek Wilson, 2012-11-08
-
[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: Aaron Gallagher, 2010-12-04
-
[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: Launchpad Bug Tracker, 2010-12-04
-
[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: Aaron Gallagher, 2010-12-04
-
[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: Raymond, 2010-11-07
-
[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: Raymond, 2010-11-07
-
[Bug 672059] [NEW] Improper handling of DATE, DATETIME, and TIMESTAMP fields
From: Raymond, 2010-11-07
References