db: enforce that bindings be done in order.

This is almost always true already; fix up the few non-standard ones.

This is enforced with an assert, and I ran the entire test suite to
double-check.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-07-14 09:58:45 +09:30
parent d17506b899
commit b7b3cbc84a
5 changed files with 35 additions and 25 deletions

View File

@@ -104,6 +104,9 @@ struct db_stmt {
/* Our entry in the list of pending statements. */
struct list_node list;
/* Bind counter */
int bind_pos;
/* Database we are querying */
struct db *db;