Move test logic for SQLITE_FCNTL_PRAGMA out of os_unix.c and into test_vfs.c.

FossilOrigin-Name: c81fc40b2b584820ac7d1c3848ebeb7225d4eeeb
This commit is contained in:
drh
2012-02-22 20:08:49 +00:00
parent 92c700dbb7
commit c8517f614d
6 changed files with 17 additions and 31 deletions
-10
View File
@@ -3587,16 +3587,6 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
*(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
return SQLITE_OK;
}
case SQLITE_FCNTL_PRAGMA: {
char **azArg = (char**)pArg;
#ifdef SQLITE_TEST
if( sqlite3_stricmp(azArg[1], "filename")==0 ){
azArg[0] = sqlite3_mprintf("%s", pFile->zPath);
return SQLITE_OK;
}
#endif
break;
}
#ifndef NDEBUG
/* The pager calls this method to signal that it has done
** a rollback and that the database is therefore unchanged and
+4
View File
@@ -496,6 +496,10 @@ static int tvfsFileControl(sqlite3_file *pFile, int op, void *pArg){
}
return rc;
}
if( sqlite3_stricmp(argv[1], "filename")==0 ){
argv[0] = sqlite3_mprintf("%s", p->zFilename);
return SQLITE_OK;
}
}
return sqlite3OsFileControl(p->pReal, op, pArg);
}