Opened 12 years ago

Closed 12 years ago

#20012 closed Bug (fixed)

test_year_lookup_edge_case fails under Oracle

Reported by: Aymeric Augustin Owned by: Shai Berger
Component: Database layer (models, ORM) Version: dev
Severity: Release blocker Keywords:
Cc: Florian Apolloner, shai@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Change History (5)

comment:1 by Florian Apolloner, 12 years ago

Cc: Florian Apolloner added

comment:2 by Florian Apolloner, 12 years ago

#20011 seems to be similar, namely it appears as if the "BETWEEN '1.1.2009' and '31.12.2009 23:59:59.99999'" seems to produce wrong results for the right interval boundary.

comment:3 by Shai Berger, 12 years ago

Cc: shai@… added

comment:4 by Shai Berger, 12 years ago

Owner: changed from nobody to Shai Berger
Status: newassigned

The problem is that with Oracle, datetime(2009,12,31,23,59,59,999999) is received without the second-fraction part, whereas '2009-12-31 23:59:59.999999' is received with the fraction. The backend uses the latter for saving (as it should), but the former for the edge of the year range. I will commit the fix later tonight.

comment:5 by Shai Berger <shai@…>, 12 years ago

Resolution: fixed
Status: assignedclosed

In dfe6ea3b1f6c7119a552ba6a018f89745e767132:

Fixed #20012 -- test_year_lookup_edge_case fails under Oracle

Used formatted date instead of datetime object for the end of the
year range, as the datetime object loses fractions-of-seconds when
inserted into the db.

Note: See TracTickets for help on using tickets.
Back to Top