1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add a few more test cases to walvfs.test.

FossilOrigin-Name: 14a64df36efe0dc36795311d58385f9c65dc465b214059e07c2ee6b95ea99c87
This commit is contained in:
dan
2018-12-26 17:49:57 +00:00
parent 0f55a571fc
commit 89dec01e48
4 changed files with 129 additions and 9 deletions

View File

@@ -234,6 +234,7 @@ static int tvfsResultCode(Testvfs *p, int *pRc){
{ SQLITE_LOCKED, "SQLITE_LOCKED" },
{ SQLITE_BUSY, "SQLITE_BUSY" },
{ SQLITE_READONLY, "SQLITE_READONLY" },
{ SQLITE_READONLY_CANTINIT, "SQLITE_READONLY_CANTINIT" },
};
const char *z;
@@ -919,7 +920,9 @@ static int tvfsShmMap(
if( rc==SQLITE_OK && isWrite && !pFd->pShm->aPage[iPage] ){
tvfsAllocPage(pFd->pShm, iPage, pgsz);
}
*pp = (void volatile *)pFd->pShm->aPage[iPage];
if( rc==SQLITE_OK || rc==SQLITE_READONLY ){
*pp = (void volatile *)pFd->pShm->aPage[iPage];
}
return rc;
}