Commit 56a2a2e
fix: drop unreachable drain loop from exec_sql
The C dqlite server aggregates multi-statement EXEC_SQL internally and
emits exactly one RESULT frame (handle_exec_sql_done_cb recurses on
exec->tail; fill_result reports sqlite3_changes of the last statement
only). The drain loop added by #029 never ran more than once in
practice and mis-advertised semantics ("sum of all rows_affected") the
server cannot deliver.
Read a single ResultResponse and return it. Update the docstring to
reflect the real server behaviour. Replace the test that simulated
the dead-code path with one asserting the client does not silently
consume stray responses.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 59e186b commit 56a2a2e
2 files changed
Lines changed: 29 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 158 | + | |
168 | 159 | | |
169 | | - | |
170 | | - | |
| 160 | + | |
| 161 | + | |
171 | 162 | | |
172 | | - | |
173 | | - | |
174 | | - | |
| 163 | + | |
| 164 | + | |
175 | 165 | | |
176 | | - | |
| 166 | + | |
177 | 167 | | |
178 | 168 | | |
179 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
135 | 146 | | |
136 | 147 | | |
137 | | - | |
138 | 148 | | |
139 | | - | |
140 | | - | |
141 | | - | |
| 149 | + | |
| 150 | + | |
142 | 151 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 152 | + | |
150 | 153 | | |
151 | | - | |
152 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
0 commit comments