1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add support for SQLITE_OPEN_NOFOLLOW.

FossilOrigin-Name: cb79c828496a703f1410f61458ebc1e15a92a63412b36f51945b2b5a32ec6e88
This commit is contained in:
drh
2019-11-18 17:46:38 +00:00
parent 804725a6b9
commit 0933aad72c
12 changed files with 97 additions and 25 deletions

View File

@@ -3670,6 +3670,7 @@ static int sqliteCmdUsage(
){
Tcl_WrongNumArgs(interp, 1, objv,
"HANDLE ?FILENAME? ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN?"
" ?-nofollow BOOLEAN?"
" ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?"
#if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_CODEC_FROM_TCL)
" ?-key CODECKEY?"
@@ -3681,6 +3682,7 @@ static int sqliteCmdUsage(
/*
** sqlite3 DBNAME FILENAME ?-vfs VFSNAME? ?-key KEY? ?-readonly BOOLEAN?
** ?-create BOOLEAN? ?-nomutex BOOLEAN?
** ?-nofollow BOOLEAN?
**
** This is the main Tcl command. When the "sqlite" Tcl command is
** invoked, this routine runs to process that command.
@@ -3779,6 +3781,14 @@ static int SQLITE_TCLAPI DbMain(
}else{
flags &= ~SQLITE_OPEN_CREATE;
}
}else if( strcmp(zArg, "-nofollow")==0 ){
int b;
if( Tcl_GetBooleanFromObj(interp, objv[i], &b) ) return TCL_ERROR;
if( b ){
flags |= SQLITE_OPEN_NOFOLLOW;
}else{
flags &= ~SQLITE_OPEN_NOFOLLOW;
}
}else if( strcmp(zArg, "-nomutex")==0 ){
int b;
if( Tcl_GetBooleanFromObj(interp, objv[i], &b) ) return TCL_ERROR;