diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-09-20 07:36:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-20 07:36:18 -0700 |
commit | 525269430a3f9fbb7287e4bb6b365ac216004980 (patch) | |
tree | 2d773b5d8ee8582da1b90bcbd17bb3ffc9ce25f7 /Modules/_sqlite/util.c | |
parent | 0ad05c32cc41d4c21bfd78b9ffead519ead475a2 (diff) | |
download | cpython-git-525269430a3f9fbb7287e4bb6b365ac216004980.tar.gz |
closes bpo-31525: require sqlite3_prepare_v2 (#3666)
This is based on
https://github.com/ghaering/pysqlite/commit/40b349cadbd87c42f70fc92e5e1aee6d02564c6d#diff-0489411409cd2934730e88bf7767790,
though we can be a bit more aggressive about deleting code.
Diffstat (limited to 'Modules/_sqlite/util.c')
-rw-r--r-- | Modules/_sqlite/util.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Modules/_sqlite/util.c b/Modules/_sqlite/util.c index b371aed99d..3fa671d052 100644 --- a/Modules/_sqlite/util.c +++ b/Modules/_sqlite/util.c @@ -47,17 +47,7 @@ int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection) */ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st) { - int errorcode; - -#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); + int errorcode = sqlite3_errcode(db); switch (errorcode) { |