aboutsummaryrefslogtreecommitdiff
path: root/auto.def
diff options
context:
space:
mode:
authoraf123 <jimdevel@hummypkg.org.uk>2012-11-29 10:26:14 +1000
committerSteve Bennett <steveb@workware.net.au>2012-11-29 10:30:15 +1000
commitfe63bcdba4b63372a0aa18e1444cfdbc8621a881 (patch)
tree21080e5eabe25434b2b578ec02300f6833492b85 /auto.def
parent446c4faa6a6cda3c43ab68df168b3eeec67274b6 (diff)
downloadjimtcl-fe63bcdba4b63372a0aa18e1444cfdbc8621a881.zip
jimtcl-fe63bcdba4b63372a0aa18e1444cfdbc8621a881.tar.gz
jimtcl-fe63bcdba4b63372a0aa18e1444cfdbc8621a881.tar.bz2
Use sqlite3_prepare_v2()
When I'm working with SQLite3 databases in Jim, I find that I occasionally get a 'schema has changed' error so I end up using catch to detect the error and try the query again. Here's a quick patch to change the SQLite3 extension to use the sqlite3_prepare_v2() API function instead of sqlite3_prepare() - trivial but the _v2() function has a number of benefits and everyone should have a new enough SQLite3 library to support it. Please can you consider it for inclusion? See - http://www.sqlite.org/c3ref/prepare.html The benefit I'm specifically interested in is: With the _v2() variant, "If the database schema changes, instead of returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will automatically recompile the SQL statement and try to run it again."
Diffstat (limited to 'auto.def')
-rw-r--r--auto.def2
1 files changed, 1 insertions, 1 deletions
diff --git a/auto.def b/auto.def
index fd80d8e..ddb0c1e 100644
--- a/auto.def
+++ b/auto.def
@@ -248,7 +248,7 @@ dict set extdb info {
libdep {lib_SDL_SetVideoMode lib_rectangleRGBA}
}
signal { check {[have-feature sigaction] && [have-feature vfork]} }
- sqlite3 { check {[cc-check-function-in-lib sqlite3_open sqlite3]} libdep lib_sqlite3_open }
+ sqlite3 { check {[cc-check-function-in-lib sqlite3_prepare_v2 sqlite3]} libdep lib_sqlite3_prepare_v2 }
syslog { check {[have-feature syslog]} }
tree { dep oo }
win32 { check {[have-feature windows]} }