diff options
author | dan <dan@noemail.net> | 2015-03-24 18:21:41 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2015-03-24 18:21:41 +0000 |
commit | 6da7a0a93da31b48081f50e92d4e7b5ffe19522d (patch) | |
tree | 3e9128ad52de6f69aa11508109f8eb28d1bb2309 /src/btree.c | |
parent | f37120a416aee4703f5305e68c7535927678cc87 (diff) | |
parent | 126e9e6347216e47b538e4e8f24cfc2d752d89b3 (diff) | |
download | sqlite-6da7a0a93da31b48081f50e92d4e7b5ffe19522d.tar.gz sqlite-6da7a0a93da31b48081f50e92d4e7b5ffe19522d.zip |
Merge the latest trunk changes into this branch.
FossilOrigin-Name: 9d9b6c883b4f7d69c615cedfb59a2385aac47b74
Diffstat (limited to 'src/btree.c')
-rw-r--r-- | src/btree.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/btree.c b/src/btree.c index 8957b74c1..ac0c87731 100644 --- a/src/btree.c +++ b/src/btree.c @@ -2017,8 +2017,8 @@ int sqlite3BtreeOpen( ** the right size. This is to guard against size changes that result ** when compiling on a different architecture. */ - assert( sizeof(i64)==8 || sizeof(i64)==4 ); - assert( sizeof(u64)==8 || sizeof(u64)==4 ); + assert( sizeof(i64)==8 ); + assert( sizeof(u64)==8 ); assert( sizeof(u32)==4 ); assert( sizeof(u16)==2 ); assert( sizeof(Pgno)==4 ); @@ -7480,7 +7480,8 @@ static int balance(BtCursor *pCur){ ** pSpace buffer passed to the latter call to balance_nonroot(). */ u8 *pSpace = sqlite3PageMalloc(pCur->pBt->pageSize); - rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1, pCur->hints); + rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1, + pCur->hints&BTREE_BULKLOAD); if( pFree ){ /* If pFree is not NULL, it points to the pSpace buffer used ** by a previous call to balance_nonroot(). Its contents are @@ -9143,14 +9144,23 @@ int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){ } /* -** set the mask of hint flags for cursor pCsr. Currently the only valid -** values are 0 and BTREE_BULKLOAD. +** set the mask of hint flags for cursor pCsr. */ void sqlite3BtreeCursorHints(BtCursor *pCsr, unsigned int mask){ - assert( mask==BTREE_BULKLOAD || mask==0 ); + assert( mask==BTREE_BULKLOAD || mask==BTREE_SEEK_EQ || mask==0 ); pCsr->hints = mask; } +#ifdef SQLITE_DEBUG +/* +** Return true if the cursor has a hint specified. This routine is +** only used from within assert() statements +*/ +int sqlite3BtreeCursorHasHint(BtCursor *pCsr, unsigned int mask){ + return (pCsr->hints & mask)!=0; +} +#endif + /* ** Return true if the given Btree is read-only. */ |