Commit be79fbf
clach04
Fixes Trac ticket #445 Python DBI driver crash under Windows when fetching rows from cursor on closed connection.
After an ODBC connection is closed the ODBC spec requires that the driver close and free all resources. The crash is actually expected!
Added check for exception for to fetchall so that exceptions raised
by fetchone are not lost.
Added quick/simply fix to check connection status on fetch. The old
approach for the original IngresDBI driver was to maintain a dict of
cursors in the connection and when the connection was closed, close
all the cursors. This is not present in this pure C extension.
Really should return back to that technique. Checking the connection
for each single fetch is a needless overhead.
NOTE problem did not occur under Linux, it appears the Unix Ingres
ODBC driver (CLI manager) returns errors when a cursor for a closed
connection is used (or we just got lucky).
git-svn-id: http://code.ingres.com/ingres/drivers/python/main@2112 45b5d43f-8932-4c86-835a-3654e58428391 parent d46739a commit be79fbf
3 files changed
+51
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | 438 | | |
440 | 439 | | |
441 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
240 | 258 | | |
241 | 259 | | |
242 | 260 | | |
| |||
4314 | 4332 | | |
4315 | 4333 | | |
4316 | 4334 | | |
| 4335 | + | |
4317 | 4336 | | |
4318 | 4337 | | |
4319 | 4338 | | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
4320 | 4356 | | |
4321 | 4357 | | |
4322 | 4358 | | |
| |||
4929 | 4965 | | |
4930 | 4966 | | |
4931 | 4967 | | |
| 4968 | + | |
4932 | 4969 | | |
4933 | 4970 | | |
4934 | 4971 | | |
| |||
4956 | 4993 | | |
4957 | 4994 | | |
4958 | 4995 | | |
4959 | | - | |
4960 | | - | |
4961 | | - | |
4962 | | - | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
| 5005 | + | |
| 5006 | + | |
| 5007 | + | |
4963 | 5008 | | |
4964 | 5009 | | |
4965 | 5010 | | |
| |||
5306 | 5351 | | |
5307 | 5352 | | |
5308 | 5353 | | |
5309 | | - | |
| 5354 | + | |
5310 | 5355 | | |
5311 | 5356 | | |
5312 | 5357 | | |
| |||
0 commit comments