Improper handling of DATE, DATETIME, and TIMESTAMP fields
Bug #672059 reported by
Raymond
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oursql |
Fix Committed
|
High
|
Unassigned |
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.
Related branches
Changed in oursql: | |
importance: | Undecided → High |
milestone: | none → 0.9.3 |
status: | New → In Progress |
Changed in oursql: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
The patch is against the latest 0.9.2 tarball.