Reentrant arenas.

This commit is contained in:
Nuno Cruces
2023-11-29 10:38:03 +00:00
parent 997e197f54
commit 9bf14becaf
8 changed files with 41 additions and 33 deletions

View File

@@ -104,7 +104,7 @@ func (s *Stmt) BindCount() int {
//
// https://sqlite.org/c3ref/bind_parameter_index.html
func (s *Stmt) BindIndex(name string) int {
defer s.c.arena.reset()
defer s.c.arena.mark()()
namePtr := s.c.arena.string(name)
r := s.c.call(s.c.api.bindIndex,
uint64(s.handle), uint64(namePtr))