From 35e9af0accecbab50b3e2505dcf39181d844d973 Mon Sep 17 00:00:00 2001 From: Tom van Dinther <39470469+tvandinther@users.noreply.github.com> Date: Sat, 31 Aug 2024 22:07:36 +0200 Subject: [PATCH] Add statement reset to libsql_reset_stmt C binding Without this call to stmt.reset(), the prepared statement is not correctly reset and the same values are read back despite having new bindings. Fixes #1481 --- bindings/c/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/c/src/lib.rs b/bindings/c/src/lib.rs index 8e80816ff0..4c9e903cd2 100644 --- a/bindings/c/src/lib.rs +++ b/bindings/c/src/lib.rs @@ -627,6 +627,7 @@ pub unsafe extern "C" fn libsql_reset_stmt( } let stmt = stmt.get_ref_mut(); stmt.params.clear(); + stmt.stmt.reset(); 0 }