aboutsummaryrefslogtreecommitdiff
path: root/src/test_vfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_vfs.c')
-rw-r--r--src/test_vfs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/test_vfs.c b/src/test_vfs.c
index 561addfcc..2277cf7eb 100644
--- a/src/test_vfs.c
+++ b/src/test_vfs.c
@@ -967,16 +967,15 @@ static void tvfsShmBarrier(sqlite3_file *pFile){
TestvfsFd *pFd = tvfsGetFd(pFile);
Testvfs *p = (Testvfs *)(pFd->pVfs->pAppData);
+ if( p->pScript && p->mask&TESTVFS_SHMBARRIER_MASK ){
+ const char *z = pFd->pShm ? pFd->pShm->zFile : "";
+ tvfsExecTcl(p, "xShmBarrier", Tcl_NewStringObj(z, -1), pFd->pShmId, 0, 0);
+ }
+
if( p->isFullshm ){
sqlite3OsShmBarrier(pFd->pReal);
return;
}
-
- if( p->pScript && p->mask&TESTVFS_SHMBARRIER_MASK ){
- tvfsExecTcl(p, "xShmBarrier",
- Tcl_NewStringObj(pFd->pShm->zFile, -1), pFd->pShmId, 0, 0
- );
- }
}
static int tvfsShmUnmap(
@@ -1532,7 +1531,7 @@ static int testvfs_cmd(
return TCL_OK;
bad_args:
- Tcl_WrongNumArgs(interp, 1, objv, "VFSNAME ?-noshm BOOL? ?-default BOOL? ?-mxpathname INT? ?-szosfile INT? ?-iversion INT?");
+ Tcl_WrongNumArgs(interp, 1, objv, "VFSNAME ?-noshm BOOL? ?-fullshm BOOL? ?-default BOOL? ?-mxpathname INT? ?-szosfile INT? ?-iversion INT?");
return TCL_ERROR;
}