← Back to team overview

agesys-dev team mailing list archive

[Bug 672059] Re: Improper handling of DATE, DATETIME, and TIMESTAMP fields

 

i don't think this is a valid solution -- in my use case, sometimes we
have date fields with YYYY-00-00 to represent a year if that is as
specific as we can get. a better solution would be something like this:
https://bugs.launchpad.net/oursql/+bug/1076592

-- 
You received this bug notification because you are a member of Agesys
Team, which is subscribed to oursql.
https://bugs.launchpad.net/bugs/672059

Title:
  Improper handling of DATE, DATETIME, and TIMESTAMP fields

Status in oursql:
  Fix Committed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/oursql/+bug/672059/+subscriptions


References