mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Changes to give a warning-free build with SQLITE_OMIT_INCRBLOB and
SQLITE_OMIT_SHARED_CACHE. FossilOrigin-Name: 711c59171b22df04224183a713e6c36e0bb3bba8
This commit is contained in:
17
src/test3.c
17
src/test3.c
@@ -253,7 +253,6 @@ static int SQLITE_TCLAPI btree_close_cursor(
|
||||
const char **argv /* Text of each argument */
|
||||
){
|
||||
BtCursor *pCur;
|
||||
Btree *pBt;
|
||||
int rc;
|
||||
|
||||
if( argc!=2 ){
|
||||
@@ -262,12 +261,18 @@ static int SQLITE_TCLAPI btree_close_cursor(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
pCur = sqlite3TestTextToPtr(argv[1]);
|
||||
pBt = pCur->pBtree;
|
||||
sqlite3_mutex_enter(pBt->db->mutex);
|
||||
sqlite3BtreeEnter(pBt);
|
||||
#if SQLITE_THREADSAFE>0
|
||||
{
|
||||
Btree *pBt = pCur->pBtree;
|
||||
sqlite3_mutex_enter(pBt->db->mutex);
|
||||
sqlite3BtreeEnter(pBt);
|
||||
rc = sqlite3BtreeCloseCursor(pCur);
|
||||
sqlite3BtreeLeave(pBt);
|
||||
sqlite3_mutex_leave(pBt->db->mutex);
|
||||
}
|
||||
#else
|
||||
rc = sqlite3BtreeCloseCursor(pCur);
|
||||
sqlite3BtreeLeave(pBt);
|
||||
sqlite3_mutex_leave(pBt->db->mutex);
|
||||
#endif
|
||||
ckfree((char *)pCur);
|
||||
if( rc ){
|
||||
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
|
||||
|
Reference in New Issue
Block a user