aboutsummaryrefslogtreecommitdiff
path: root/src/tclsqlite.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-12-21 14:42:29 +0000
committerdrh <drh@noemail.net>2011-12-21 14:42:29 +0000
commitf12b3f609f08e923833bc6c37863f11a82582c03 (patch)
treeeac19e5f30021873963f5f39db83917425ab8931 /src/tclsqlite.c
parentf694aa6454630efdb04a7cb9f0d91c0fe5376770 (diff)
downloadsqlite-f12b3f609f08e923833bc6c37863f11a82582c03.tar.gz
sqlite-f12b3f609f08e923833bc6c37863f11a82582c03.zip
Add the ability to enable or disable SQLITE_IOCAP_ZERO_DAMAGE using a URI
parameter for both unix and windows. Add a file-control to query or disable the ZERO_DAMAGE setting. Add the -uri option to the "sqlite3" TCL command in tclsqlite3.c. Allow the sqlite3_uri_parameter() interface to accept a NULL pointer for its first parameter. FossilOrigin-Name: c83627b73285f883719845c1b9fe85f378f28dd2
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r--src/tclsqlite.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index c8f0fbd31..3692bef9c 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -3001,6 +3001,14 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
}else{
flags &= ~SQLITE_OPEN_FULLMUTEX;
}
+ }else if( strcmp(zArg, "-uri")==0 ){
+ int b;
+ if( Tcl_GetBooleanFromObj(interp, objv[i+1], &b) ) return TCL_ERROR;
+ if( b ){
+ flags |= SQLITE_OPEN_URI;
+ }else{
+ flags &= ~SQLITE_OPEN_URI;
+ }
}else{
Tcl_AppendResult(interp, "unknown option: ", zArg, (char*)0);
return TCL_ERROR;