-
Operating System Name: Microsoft-Windows 10 x64
-
db2level output from clidriver if in use: 11.5.6000.7091
-
Target Db2 Server Version: Db2-LUW v11.5
-
Python Version: 3.8.10 and 3.9 and 3.10
-
ibm_db version: 3.1.3
-
For non-Windows, output of below commands:
uname
uname -m
-
Value of below environment variables if set:
IBM_DB_HOME: not-set
PATH:
LIB/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH: not relevant for Microsoft-Windows
-
Test script to reproduce the problem.
-
see attached file test_268_InsertRetrieveDECFLOATTypeColumn.txt
-
which can be renamed to .py extension and run with the unittest framework.
-
Note that the symptom will not exhibit on Linux x64, it only exhibits on Microsoft-Windows.
-
Use the ibm_db.result() method to fetch very large values of both DECFLOAT(16) and DECFLOAT(32) columns,
-
and only on Microsoft Windows will you find that the values returned are incorrect, due to a defect in the ibm_db.c code.
-
For installation related issue, complete output of pip install ibm_db command.
Steps to Reproduce:
1 This problem exhibits only on Microsoft Windows where w_char_t is 2 bytes, but not on Linux x64 where w_char_t is 4 bytes.
- Use the unittest framework as supplied with ibm_db to add the attached test case, which inserts and retrieves large positive and negative values into DECFLOAT(16) and DECFLOAT(34) columns and checks that retrieved results are as expected. Notice that I did not test with either as400 i-series, or Db2-for-Z/OS, or Z/Linux which may change the returned values so the EXPECTS results for those platforms are left blank.
test_268_InsertRetrieveDECFLOATTypeColumn.txt
Operating System Name: Microsoft-Windows 10 x64
db2level output from clidriver if in use: 11.5.6000.7091
Target Db2 Server Version: Db2-LUW v11.5
Python Version: 3.8.10 and 3.9 and 3.10
ibm_db version: 3.1.3
For non-Windows, output of below commands:
uname
uname -m
Value of below environment variables if set:
IBM_DB_HOME: not-set
PATH:
LIB/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH: not relevant for Microsoft-Windows
Test script to reproduce the problem.
see attached file test_268_InsertRetrieveDECFLOATTypeColumn.txt
which can be renamed to .py extension and run with the unittest framework.
Note that the symptom will not exhibit on Linux x64, it only exhibits on Microsoft-Windows.
Use the ibm_db.result() method to fetch very large values of both DECFLOAT(16) and DECFLOAT(32) columns,
and only on Microsoft Windows will you find that the values returned are incorrect, due to a defect in the ibm_db.c code.
For installation related issue, complete output of
pip install ibm_dbcommand.Steps to Reproduce:
1 This problem exhibits only on Microsoft Windows where w_char_t is 2 bytes, but not on Linux x64 where w_char_t is 4 bytes.
test_268_InsertRetrieveDECFLOATTypeColumn.txt