forked from grantc/python-ingresdbi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decimal type crash on select, decimal truncation, unable to use decim…
…al with precision of 31 with Ingres pre 9.2. Change is in two parts: 1) use the correct (string) length along with precision/scale for decimal data retrieved from the DBMS 2) use the correct (string) length along with precision/scale for decimal data sent to the DBMS Most of the change is on removing the need for arithmetic on "fetch" from database (and send), arithmetic is done once and the same value is used to get data from the DBMS by puting the correct values into the IIDBI_DESCRIPTOR. The IIDBI_DESCRIPTOR is set for Bind (send) and fetch (get) operations. The IIDBI_DESCRIPTOR values is then used at the time the ODBC call is made, no math is issued at this point in time. The new get/send code that was added for the Decimal type does not have any code that is specific to decimals. The decimal specific code is in the describe code. This is stage 1 of a multi stage code re-factor, to use the cType and internal size for all types and then use it everywhere where that information is needed. All types will set the size and type and then the get code will be a single block of code that uses the descriptor information. Testing Done: All decimal tests in tets suite now pass. I.e.: test_decimalCrash passes (test suite no longer crashes) test_decimalLongValues passes test_decimalBindLongValues now passes (and does not generate ADF errors) with pre Ingres 9.2 versions of Ingres (i.e. versions where 31 is the maximum precision for decimal type). git-svn-id: http://code.ingres.com/ingres/drivers/python/main@1880 45b5d43f-8932-4c86-835a-3654e5842839
- Loading branch information
clach04
committed
Aug 20, 2009
1 parent
af8f961
commit 4abe8ca
Showing
3 changed files
with
133 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters