Opened 2 years ago

Closed 23 months ago

#20012 closed Bug (fixed)

test_year_lookup_edge_case fails under Oracle

Reported by: aaugustin Owned by: shai
Component: Database layer (models, ORM) Version: master
Severity: Release blocker Keywords:
Cc: apollo13, 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 2 years ago by apollo13

  • Cc apollo13 added

comment:2 Changed 2 years ago by apollo13

#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 2 years ago by shai

  • Cc shai@… added

comment:4 Changed 23 months ago by shai

  • Owner changed from nobody to shai
  • Status changed from new to assigned

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 23 months ago by Shai Berger <shai@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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