diff options
Diffstat (limited to 'Modules/_sqlite/util.c')
-rw-r--r-- | Modules/_sqlite/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index 351b1b4..b371aed 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -49,10 +49,13 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st) { int errorcode; - /* SQLite often doesn't report anything useful, unless you reset the statement first */ +#if SQLITE_VERSION_NUMBER < 3003009 + /* SQLite often doesn't report anything useful, unless you reset the statement first. + When using sqlite3_prepare_v2 this is not needed. */ if (st != NULL) { (void)sqlite3_reset(st); } +#endif errorcode = sqlite3_errcode(db); |