File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ Thin Mode Changes
25
25
``wait_timeout `` value and the connection request will not additionally be
26
26
delayed by any internal network ping to the database (`issue 330
27
27
<https://github.com/oracle/python-oracledb/issues/330> `__).
28
+ #) Fixed bug in fetching dates with years less than 0
29
+ (`issue 345 <https://github.com/oracle/python-oracledb/issues/345 >`__).
30
+
28
31
29
32
Thick Mode Changes
30
33
++++++++++++++++++
Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ cdef class Buffer:
341
341
int8_t tz_hour = 0 , tz_minute = 0
342
342
uint32_t fsecond = 0
343
343
int32_t seconds
344
- uint16_t year
344
+ int16_t year
345
345
year = (ptr[0 ] - 100 ) * 100 + ptr[1 ] - 100
346
346
if num_bytes >= 11 :
347
347
fsecond = unpack_uint32(& ptr[7 ], BYTE_ORDER_MSB) // 1000
Original file line number Diff line number Diff line change @@ -297,6 +297,14 @@ def test_1417(self):
297
297
self .assertEqual (self .cursor .fetchone (), self .data_by_key [4 ])
298
298
self .assertIsNone (self .cursor .fetchone ())
299
299
300
+ def test_1418 (self ):
301
+ "1418 - test fetching a date with year < 0"
302
+ with self .assertRaises (ValueError ):
303
+ self .cursor .execute (
304
+ "select to_date('-4712-01-01', 'SYYYY-MM-DD') from dual"
305
+ )
306
+ self .cursor .fetchone ()
307
+
300
308
301
309
if __name__ == "__main__" :
302
310
test_env .run_test_cases ()
You can’t perform that action at this time.
0 commit comments