From 4321892e15f4d686506662ab13f6d5523a54d4b7 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Tue, 22 Jun 2010 00:42:51 +0000 Subject: [PATCH] * In SQL error conditions, print the offending SQL statement. --- sql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql.c b/sql.c index 5fef4cf..ac854f7 100644 --- a/sql.c +++ b/sql.c @@ -82,7 +82,7 @@ sql_get_int_field(sqlite3 *db, const char *fmt, ...) case SQLITE_OK: break; default: - DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n", sqlite3_errmsg(db)); + DPRINTF(E_ERROR, L_DB_SQL, "prepare failed: %s\n%s\n", sqlite3_errmsg(db), sql); sqlite3_free(sql); return -1; }