1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Modify the sqlite3OsFileControl() interface to detect unopened sqlite3_file

objects and return SQLITE_NOTFOUND.

FossilOrigin-Name: 1fc72b707d4f4df049c19b023ae3f70cb45d6a6768bb68efc519cfdcd2d2ecda
This commit is contained in:
drh
2018-03-29 13:47:01 +00:00
parent d88690bd10
commit afb39a4cdc
6 changed files with 27 additions and 37 deletions

View File

@@ -3628,10 +3628,8 @@ int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
}else if( op==SQLITE_FCNTL_JOURNAL_POINTER ){
*(sqlite3_file**)pArg = sqlite3PagerJrnlFile(pPager);
rc = SQLITE_OK;
}else if( fd->pMethods ){
rc = sqlite3OsFileControl(fd, op, pArg);
}else{
rc = SQLITE_NOTFOUND;
rc = sqlite3OsFileControl(fd, op, pArg);
}
sqlite3BtreeLeave(pBtree);
}