Commit 4abe8ca
clach04
decimal type crash on select, decimal truncation, unable to use decimal 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-3654e58428391 parent af8f961 commit 4abe8ca
3 files changed
+133
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
139 | 164 | | |
140 | 165 | | |
141 | 166 | | |
| |||
1147 | 1172 | | |
1148 | 1173 | | |
1149 | 1174 | | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1150 | 1207 | | |
1151 | 1208 | | |
1152 | 1209 | | |
| |||
1605 | 1662 | | |
1606 | 1663 | | |
1607 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
1608 | 1667 | | |
1609 | 1668 | | |
1610 | 1669 | | |
| |||
1626 | 1685 | | |
1627 | 1686 | | |
1628 | 1687 | | |
| 1688 | + | |
| 1689 | + | |
1629 | 1690 | | |
1630 | 1691 | | |
1631 | 1692 | | |
| |||
1700 | 1761 | | |
1701 | 1762 | | |
1702 | 1763 | | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1703 | 1786 | | |
1704 | 1787 | | |
1705 | | - | |
1706 | 1788 | | |
1707 | 1789 | | |
1708 | 1790 | | |
| |||
1921 | 2003 | | |
1922 | 2004 | | |
1923 | 2005 | | |
| 2006 | + | |
1924 | 2007 | | |
1925 | 2008 | | |
1926 | 2009 | | |
1927 | 2010 | | |
1928 | 2011 | | |
| 2012 | + | |
1929 | 2013 | | |
1930 | 2014 | | |
1931 | 2015 | | |
| |||
1949 | 2033 | | |
1950 | 2034 | | |
1951 | 2035 | | |
1952 | | - | |
1953 | | - | |
1954 | | - | |
1955 | | - | |
1956 | | - | |
| 2036 | + | |
1957 | 2037 | | |
1958 | 2038 | | |
1959 | 2039 | | |
| |||
1977 | 2057 | | |
1978 | 2058 | | |
1979 | 2059 | | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
1980 | 2069 | | |
1981 | 2070 | | |
1982 | 2071 | | |
| |||
1989 | 2078 | | |
1990 | 2079 | | |
1991 | 2080 | | |
1992 | | - | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
1993 | 2084 | | |
1994 | 2085 | | |
1995 | 2086 | | |
1996 | 2087 | | |
1997 | 2088 | | |
1998 | 2089 | | |
| 2090 | + | |
1999 | 2091 | | |
2000 | 2092 | | |
2001 | 2093 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
217 | 224 | | |
218 | 225 | | |
219 | 226 | | |
| |||
1151 | 1158 | | |
1152 | 1159 | | |
1153 | 1160 | | |
| 1161 | + | |
1154 | 1162 | | |
1155 | 1163 | | |
1156 | 1164 | | |
| 1165 | + | |
1157 | 1166 | | |
1158 | 1167 | | |
1159 | 1168 | | |
| |||
6200 | 6209 | | |
6201 | 6210 | | |
6202 | 6211 | | |
| 6212 | + | |
6203 | 6213 | | |
6204 | 6214 | | |
| 6215 | + | |
| 6216 | + | |
| 6217 | + | |
| 6218 | + | |
| 6219 | + | |
| 6220 | + | |
| 6221 | + | |
| 6222 | + | |
6205 | 6223 | | |
6206 | 6224 | | |
6207 | | - | |
6208 | | - | |
| 6225 | + | |
| 6226 | + | |
| 6227 | + | |
| 6228 | + | |
| 6229 | + | |
| 6230 | + | |
| 6231 | + | |
| 6232 | + | |
6209 | 6233 | | |
6210 | 6234 | | |
6211 | 6235 | | |
6212 | 6236 | | |
| 6237 | + | |
6213 | 6238 | | |
| 6239 | + | |
| 6240 | + | |
6214 | 6241 | | |
6215 | 6242 | | |
6216 | 6243 | | |
| |||
6227 | 6254 | | |
6228 | 6255 | | |
6229 | 6256 | | |
| 6257 | + | |
6230 | 6258 | | |
6231 | 6259 | | |
6232 | 6260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
270 | | - | |
271 | | - | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
0 commit comments