1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

Provide an assert() to fire for applications that should never open or create

a disk-based database file.

FossilOrigin-Name: 5218ac788ca35fdd7f98117758f0bef9d55fe7517098e7bf62fda3fed2af3d51
This commit is contained in:
drh
2021-10-23 22:11:18 +00:00
parent 021e228ec0
commit f81b40a52d
3 changed files with 12 additions and 7 deletions

View File

@@ -6125,6 +6125,11 @@ static int unixOpen(
}
memset(p, 0, sizeof(unixFile));
#ifdef SQLITE_ASSERT_NO_FILES
/* Applications that never read or write a persistent disk files */
assert( zName==0 );
#endif
if( eType==SQLITE_OPEN_MAIN_DB ){
UnixUnusedFd *pUnused;
pUnused = findReusableFd(zName, flags);