Commit 0a8c1bf
authored
Manually preserve cconvert values until sqlite3_step (#308)
Fixes #306.
The core issue here is that when we `bind!` some values to an insert
statement, the _cconvert_ed value needs to remain valid (i.e. not
GC-able) until we execute the insert statement in `sqlite3_step`.
In each `SQLite.Stmt`, we have a `params` field for storing these
values, but we weren't accounting for the fact that some values,
(in the original issue case, InlineStrings), may be `cconvert`ed
to a different value when they're actually bound, and it's the cconverted
value that we need to store in `params` until the statement is executed.1 parent 396971f commit 0a8c1bf
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
| 316 | + | |
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
318 | | - | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
0 commit comments