tgulacsi / goracle

cx_Oracle translation for Oracle access
Other
47 stars 16 forks source link

Scanning NULL dates #24

Closed arsonox closed 9 years ago

arsonox commented 10 years ago

When scanning NULL dates with the SQL driver using conn.Query, NULL values are not (always) scanned correctly. The issue seems to occur when the a date column in a table is as follows:

  1. NULL
  2. 14-AUG-2014
  3. NULL
  4. NULL
  5. ...

The first NULL value will be scanned as zero time, the second value would be correct as well. The third and fourth value seem to be filled with the same date as the second value. When casting the date variable to_char in the query, the NULL values are handled correctly so the problem seems to occur specifically with dates (perhaps intervals? I have not tested these). It's also all fine if scanning a single date value with QueryRow.

tgulacsi commented 10 years ago

Hi,

I cannot reproduce it yet.

Please try version 3310d5a with

go test -v -run=NULL ./godrv ./oracle -dsn=YOUR_DB_ACCESS_STRING

If it passes, then we need another, reproducing case.

arsonox commented 10 years ago

Sorry for the delay, it passes. Over the weekend I'll try to make a reproducing case.