Commit 9398c74
committed
Remove conn->db NULL guard from multi_step; fix stale NIF from prior run
The conn->db == NULL guard in exqlite_multi_step broke the
'exceeding timeout' integration test. sqlite3_close_v2 uses deferred
close: the sqlite3* stays valid (zombie state) until all prepared
statements are finalized, so multi_step can legitimately run after
a connection close while a query is in-flight. The guard was not
needed: conn->db cannot change during the loop because the connection
lock is held, and statement->statement NULL is sufficient protection
against use-after-release.1 parent 5acd26b commit 9398c74
2 files changed
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | 795 | | |
801 | 796 | | |
802 | 797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
1033 | 1032 | | |
1034 | 1033 | | |
1035 | 1034 | | |
| |||
0 commit comments