Hi, first message to the list, first patch :)
It's a simple one, it turns out sqlite3 has sqlite3_prepare_v2 in
versions >= 3.5 (if google didn't lie to me) so, this patch only use it if
available.
It's against the lastest stable.
Hope to help.
Damián Viano(Des).
--- sqlbox-0.7.2/gw/sqlbox_sqlite3.c 2009-05-19 12:08:35.000000000 -0300
+++ sqlbox-0.7.2_des/gw/sqlbox_sqlite3.c 2009-06-09 11:14:09.000000000 -0300
@@ -53,7 +53,11 @@
debug("SQLBOX", 0, "sql: %s", octstr_get_cstr(sql));
#endif
+#ifdef sqlite3_prepare_v2
res = sqlite3_prepare_v2(conn->conn, octstr_get_cstr(sql), -1, &stmt, NULL);
+#else
+ res = sqlite3_prepare(conn->conn, octstr_get_cstr(sql), -1, &stmt, NULL);
+#endif
if (res != SQLITE_OK) {
error(0, "SQLITE3: Could not compile query: %s", sqlite3_errmsg(conn->conn));
return NULL;