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

Add assert() statements to verify that the SQLITE_OPEN_EXCLUSIVE flag is always passed to the VFS when opening a temporary file.

FossilOrigin-Name: e123da49ccae61d591abded52f4721aa10f20d75935c9a3e3fe826a9b8df2317
This commit is contained in:
dan
2022-08-16 10:52:35 +00:00
parent 207cb6f670
commit 2756f806f2
5 changed files with 13 additions and 9 deletions

View File

@@ -223,6 +223,7 @@ int sqlite3OsOpen(
** down into the VFS layer. Some SQLITE_OPEN_ flags (for example,
** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before
** reaching the VFS. */
assert( zPath || (flags & SQLITE_OPEN_EXCLUSIVE) );
rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x1087f7f, pFlagsOut);
assert( rc==SQLITE_OK || pFile->pMethods==0 );
return rc;