Commit 6ab9252
committed
FIX: cursor.execute() with reset_cursor=False raises Invalid cursor state #506
Add SqlHandle::close_cursor() which calls SQLFreeStmt(SQL_CLOSE) to close
the ODBC cursor without destroying the prepared statement handle. When
reset_cursor=False, execute() now calls close_cursor() instead of
skipping cleanup entirely, allowing the prepared plan to be reused.
Added 5 tests covering reset_cursor=False scenarios.1 parent a4ab587 commit 6ab9252
File tree
4 files changed
+100
-1
lines changed- mssql_python
- pybind
- tests
4 files changed
+100
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
1354 | 1364 | | |
1355 | 1365 | | |
1356 | 1366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1362 | 1362 | | |
1363 | 1363 | | |
1364 | 1364 | | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
1365 | 1371 | | |
1366 | 1372 | | |
1367 | 1373 | | |
| |||
5740 | 5746 | | |
5741 | 5747 | | |
5742 | 5748 | | |
5743 | | - | |
| 5749 | + | |
| 5750 | + | |
5744 | 5751 | | |
5745 | 5752 | | |
5746 | 5753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15961 | 15961 | | |
15962 | 15962 | | |
15963 | 15963 | | |
| 15964 | + | |
| 15965 | + | |
| 15966 | + | |
| 15967 | + | |
| 15968 | + | |
| 15969 | + | |
| 15970 | + | |
| 15971 | + | |
| 15972 | + | |
| 15973 | + | |
| 15974 | + | |
| 15975 | + | |
| 15976 | + | |
| 15977 | + | |
| 15978 | + | |
| 15979 | + | |
| 15980 | + | |
| 15981 | + | |
| 15982 | + | |
| 15983 | + | |
| 15984 | + | |
| 15985 | + | |
| 15986 | + | |
| 15987 | + | |
| 15988 | + | |
| 15989 | + | |
| 15990 | + | |
| 15991 | + | |
| 15992 | + | |
| 15993 | + | |
| 15994 | + | |
| 15995 | + | |
| 15996 | + | |
| 15997 | + | |
| 15998 | + | |
| 15999 | + | |
| 16000 | + | |
| 16001 | + | |
| 16002 | + | |
| 16003 | + | |
| 16004 | + | |
| 16005 | + | |
| 16006 | + | |
| 16007 | + | |
| 16008 | + | |
| 16009 | + | |
| 16010 | + | |
| 16011 | + | |
| 16012 | + | |
| 16013 | + | |
| 16014 | + | |
| 16015 | + | |
| 16016 | + | |
| 16017 | + | |
| 16018 | + | |
| 16019 | + | |
| 16020 | + | |
| 16021 | + | |
| 16022 | + | |
| 16023 | + | |
| 16024 | + | |
| 16025 | + | |
| 16026 | + | |
| 16027 | + | |
| 16028 | + | |
| 16029 | + | |
| 16030 | + | |
| 16031 | + | |
| 16032 | + | |
| 16033 | + | |
| 16034 | + | |
| 16035 | + | |
| 16036 | + | |
| 16037 | + | |
| 16038 | + | |
| 16039 | + | |
| 16040 | + | |
| 16041 | + | |
| 16042 | + | |
| 16043 | + | |
| 16044 | + | |
0 commit comments