I want to analyze the executive process of wal-file with the source code 3.16.2 . And I added: unixFile *pFd = (unixFile *)pRet->pWalFd; if(pFd->nFetchOut != 0){ printf("hi\n"); } to sqlite3WalOpen() after sqlite3OsOpen() is called: rc = sqlite3OsOpen(pVfs, zWalName, pRet->pWalFd, vfsFlags, &vfsFlags);
I think sqlite3OsOpen() should open the pWalFd file and set the most of its member elements in struct unixFile to 0. But I saw so many 'hi' when I ran the TCL test of sqlite, especially in e_walckpt.test, wal.test and wal2.test. I find nFetchOut has been correctly initialized after fillInUnixFile() is called before unixOpen() returned. But nFetchOut, and sometimes zPath, mmapSize and other data elements seem to have an incorrect value when I check it after sqliteOsOpen(). Is it right? And why? Thanks -- Sent from: http://sqlite.1065341.n5.nabble.com/ _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users