mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Workaround the need for internal API sqlite3BtreeCursorDb(). It was only being used for an assert() statement, which can be done differently. (CVS 6683)
FossilOrigin-Name: 5904af6e6df3effdaaa30e7cf96ee316fc09b28d
This commit is contained in:
12
src/btree.c
12
src/btree.c
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.608 2009/05/06 18:57:10 shane Exp $
|
||||
** $Id: btree.c,v 1.609 2009/05/28 11:05:57 danielk1977 Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** See the header comment on "btreeInt.h" for additional information.
|
||||
@@ -3692,6 +3692,7 @@ static const unsigned char *fetchPayload(
|
||||
** in the common case where no overflow pages are used.
|
||||
*/
|
||||
const void *sqlite3BtreeKeyFetch(BtCursor *pCur, int *pAmt){
|
||||
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
|
||||
assert( cursorHoldsMutex(pCur) );
|
||||
if( pCur->eState==CURSOR_VALID ){
|
||||
return (const void*)fetchPayload(pCur, pAmt, 0);
|
||||
@@ -3699,6 +3700,7 @@ const void *sqlite3BtreeKeyFetch(BtCursor *pCur, int *pAmt){
|
||||
return 0;
|
||||
}
|
||||
const void *sqlite3BtreeDataFetch(BtCursor *pCur, int *pAmt){
|
||||
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
|
||||
assert( cursorHoldsMutex(pCur) );
|
||||
if( pCur->eState==CURSOR_VALID ){
|
||||
return (const void*)fetchPayload(pCur, pAmt, 1);
|
||||
@@ -4193,14 +4195,6 @@ int sqlite3BtreeEof(BtCursor *pCur){
|
||||
return (CURSOR_VALID!=pCur->eState);
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the database connection handle for a cursor.
|
||||
*/
|
||||
sqlite3 *sqlite3BtreeCursorDb(const BtCursor *pCur){
|
||||
assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
|
||||
return pCur->pBtree->db;
|
||||
}
|
||||
|
||||
/*
|
||||
** Advance the cursor to the next entry in the database. If
|
||||
** successful then set *pRes=0. If the cursor
|
||||
|
Reference in New Issue
Block a user