1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Make the test_async backend work again. (CVS 4293)

FossilOrigin-Name: 04167483aad42d319393e8caf470d8de11e468d8
This commit is contained in:
danielk1977
2007-08-25 12:29:30 +00:00
parent dc3060fea3
commit 0e87b70100
5 changed files with 326 additions and 364 deletions

View File

@ -517,8 +517,7 @@ struct crashAppData {
};
/*
** Open a crash-file file handle. The vfs pVfs is used to open
** the underlying real file.
** Open a crash-file file handle.
**
** The caller will have allocated pVfs->szOsFile bytes of space
** at pFile. This file uses this space for the CrashFile structure
@ -585,6 +584,18 @@ static void *cfDlOpen(sqlite3_vfs *pCfVfs, const char *zPath){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
return pVfs->xDlOpen(pVfs, zPath);
}
static void cfDlError(sqlite3_vfs *pCfVfs, int nByte, char *zErrMsg){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
pVfs->xDlError(pVfs, nByte, zErrMsg);
}
static void *cfDlSym(sqlite3_vfs *pCfVfs, void *pHandle, const char *zSymbol){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
return pVfs->xDlSym(pVfs, pHandle, zSymbol);
}
static void cfDlClose(sqlite3_vfs *pCfVfs, void *pHandle){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
pVfs->xDlClose(pVfs, pHandle);
}
static int cfRandomness(sqlite3_vfs *pCfVfs, int nByte, char *zBufOut){
sqlite3_vfs *pVfs = (sqlite3_vfs *)pCfVfs->pAppData;
return pVfs->xRandomness(pVfs, nByte, zBufOut);
@ -732,9 +743,9 @@ static int crashParamsObjCmd(
cfGetTempName, /* xGetTempName */
cfFullPathname, /* xFullPathname */
cfDlOpen, /* xDlOpen */
0, /* xDlError */
0, /* xDlSym */
0, /* xDlClose */
cfDlError, /* xDlError */
cfDlSym, /* xDlSym */
cfDlClose, /* xDlClose */
cfRandomness, /* xRandomness */
cfSleep, /* xSleep */
cfCurrentTime /* xCurrentTime */
@ -743,9 +754,6 @@ static int crashParamsObjCmd(
if( crashVfs.pAppData==0 ){
sqlite3_vfs *pOriginalVfs = sqlite3_vfs_find(0);
crashVfs.xDlError = pOriginalVfs->xDlError;
crashVfs.xDlSym = pOriginalVfs->xDlSym;
crashVfs.xDlClose = pOriginalVfs->xDlClose;
crashVfs.mxPathname = pOriginalVfs->mxPathname;
crashVfs.pAppData = (void *)pOriginalVfs;
crashVfs.szOsFile = sizeof(CrashFile) + pOriginalVfs->szOsFile;