Opened 4 years ago

Closed 4 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: master
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

Change History (5)

comment:1 Changed 4 years ago by Florian Apolloner

Cc: Florian Apolloner added

comment:2 Changed 4 years ago by Florian Apolloner

#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 Changed 4 years ago by Shai Berger

Cc: shai@… added

comment:4 Changed 4 years ago by Shai Berger

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 Changed 4 years ago by Shai Berger <shai@…>

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