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

Remove dead code from the lemon-generated parser. Better testing

of the sqlite3_file_control() interface, and in particular make sure
the interface works on :memory: databases. (CVS 4738)

FossilOrigin-Name: 83ca4fc7dc18d6deca58fe4181905eb9754e03da
This commit is contained in:
drh
2008-01-22 14:50:16 +00:00
parent bf2609781b
commit 5517625960
9 changed files with 113 additions and 52 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.410 2008/01/20 23:19:57 drh Exp $
** $Id: main.c,v 1.411 2008/01/22 14:50:17 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1488,13 +1488,14 @@ int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
Btree *pBtree = db->aDb[iDb].pBt;
if( pBtree ){
Pager *pPager;
sqlite3_file *fd;
sqlite3BtreeEnter(pBtree);
pPager = sqlite3BtreePager(pBtree);
if( pPager ){
sqlite3_file *fd = sqlite3PagerFile(pPager);
if( fd ){
rc = sqlite3OsFileControl(fd, op, pArg);
}
assert( pPager!=0 );
fd = sqlite3PagerFile(pPager);
assert( fd!=0 );
if( fd->pMethods ){
rc = sqlite3OsFileControl(fd, op, pArg);
}
sqlite3BtreeLeave(pBtree);
}