summaryrefslogtreecommitdiff
path: root/src/test_vfstrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_vfstrace.c')
-rw-r--r--src/test_vfstrace.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test_vfstrace.c b/src/test_vfstrace.c
index 5e94f5c..3a0e2cf 100644
--- a/src/test_vfstrace.c
+++ b/src/test_vfstrace.c
@@ -471,7 +471,17 @@ static int vfstraceFileControl(sqlite3_file *pFile, int op, void *pArg){
}
case SQLITE_FCNTL_FILE_POINTER: zOp = "FILE_POINTER"; break;
case SQLITE_FCNTL_SYNC_OMITTED: zOp = "SYNC_OMITTED"; break;
+ case SQLITE_FCNTL_WIN32_AV_RETRY: zOp = "WIN32_AV_RETRY"; break;
+ case SQLITE_FCNTL_PERSIST_WAL: zOp = "PERSIST_WAL"; break;
+ case SQLITE_FCNTL_OVERWRITE: zOp = "OVERWRITE"; break;
+ case SQLITE_FCNTL_VFSNAME: zOp = "VFSNAME"; break;
case 0xca093fa0: zOp = "DB_UNCHANGED"; break;
+ case SQLITE_FCNTL_PRAGMA: {
+ const char *const* a = (const char*const*)pArg;
+ sqlite3_snprintf(sizeof(zBuf), zBuf, "PRAGMA,[%s,%s]",a[1],a[2]);
+ zOp = zBuf;
+ break;
+ }
default: {
sqlite3_snprintf(sizeof zBuf, zBuf, "%d", op);
zOp = zBuf;
@@ -482,6 +492,14 @@ static int vfstraceFileControl(sqlite3_file *pFile, int op, void *pArg){
pInfo->zVfsName, p->zFName, zOp);
rc = p->pReal->pMethods->xFileControl(p->pReal, op, pArg);
vfstrace_print_errcode(pInfo, " -> %s\n", rc);
+ if( op==SQLITE_FCNTL_VFSNAME && rc==SQLITE_OK ){
+ *(char**)pArg = sqlite3_mprintf("vfstrace.%s/%z",
+ pInfo->zVfsName, *(char**)pArg);
+ }
+ if( op==SQLITE_FCNTL_PRAGMA && rc==SQLITE_OK && *(char**)pArg ){
+ vfstrace_printf(pInfo, "%s.xFileControl(%s,%s) returns %s",
+ pInfo->zVfsName, p->zFName, zOp, *(char**)pArg);
+ }
return rc;
}