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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user