1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Split out sqlite3BtreeCursorHintFlags() from sqlite3BtreeCursorHint()

the interface for improved performance.

FossilOrigin-Name: b3ec9a0d62c5543e91d4be2cd634ec4a3d6dca11
This commit is contained in:
drh
2015-10-27 13:24:37 +00:00
parent c5dc3dcd6e
commit f7854c7329
7 changed files with 41 additions and 35 deletions

View File

@@ -858,26 +858,25 @@ int sqlite3BtreeCursorRestore(BtCursor *pCur, int *pDifferentRow){
return SQLITE_OK;
}
#ifdef SQLITE_ENABLE_CURSOR_HINTS
/*
** Provide hints to the cursor. The particular hint given (and the type
** and number of the varargs parameters) is determined by the eHintType
** parameter. See the definitions of the BTREE_HINT_* macros for details.
*/
void sqlite3BtreeCursorHint(BtCursor *pCur, int eHintType, ...){
va_list ap;
va_start(ap, eHintType);
#ifdef SQLITE_ENABLE_CURSOR_HINTS
if( eHintType==BTREE_HINT_FLAGS )
#else
assert( eHintType==BTREE_HINT_FLAGS );
#endif
{
pCur->hints = va_arg(ap, unsigned int);
assert( pCur->hints==BTREE_SEEK_EQ || pCur->hints==BTREE_BULKLOAD
|| pCur->hints==0 );
}
va_end(ap);
/* Used only by system that substitute their own storage engine */
}
#endif
/*
** Provide flag hints to the cursor.
*/
void sqlite3BtreeCursorHintFlags(BtCursor *pCur, unsigned x){
assert( x==BTREE_SEEK_EQ || x==BTREE_BULKLOAD || x==0 );
pCur->hints = x;
}
#ifndef SQLITE_OMIT_AUTOVACUUM
/*