Cleanups and version bump

This commit is contained in:
Miodrag Milanovic 2014-07-23 06:10:36 +00:00
parent 867890321f
commit 6b280cd397
3 changed files with 87102 additions and 87148 deletions

View File

@ -13268,7 +13268,6 @@ SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
** rather short and uses little memory space.
*/
static const char * const azCompileOpt[] = {
/* These macros are provided to "stringify" the value of the define
** for those options in which the value is meaningful. */
#define CTIMEOPT_VAL_(opt) #opt
@ -16464,7 +16463,6 @@ struct MemBlockHdr {
** when this module is combined with other in the amalgamation.
*/
static struct {
/*
** Mutex to control access to the memory allocation subsystem.
*/
@ -19628,7 +19626,6 @@ SQLITE_PRIVATE void *sqlite3ScratchMalloc(int n){
}
SQLITE_PRIVATE void sqlite3ScratchFree(void *p){
if( p ){
#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
/* Verify that no more than two scratch allocation per thread
** is outstanding at one time. (This is only checked in the
@ -25442,7 +25439,6 @@ static int posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){
** 4: [RRRR.]
*/
if( eFileLock==SHARED_LOCK ){
#if !defined(__APPLE__) || !SQLITE_ENABLE_LOCKING_STYLE
(void)handleNFSUnlock;
assert( handleNFSUnlock==0 );
@ -26672,7 +26668,6 @@ static int afpUnlock(sqlite3_file *id, int eFileLock) {
}
}
if( rc==SQLITE_OK && eFileLock==NO_LOCK ){
/* Decrement the shared lock counter. Release the lock using an
** OS call only when all threads in this same process have released
** the lock.
@ -27360,7 +27355,6 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
if( nSize>(i64)buf.st_size ){
#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
/* The code below is handling the return value of osFallocate()
** correctly. posix_fallocate() is defined to "returns zero on success,
@ -29613,7 +29607,6 @@ static int unixFullPathname(
int nOut, /* Size of output buffer in bytes */
char *zOut /* Output buffer */
){
/* It's odd to simulate an io-error here, but really this is just
** using the io-error infrastructure to test that SQLite handles this
** function failing. This function could fail if, for example, the
@ -36309,7 +36302,6 @@ static int winFullPathname(
int nFull, /* Size of output buffer in bytes */
char *zFull /* Output buffer */
){
#if defined(__CYGWIN__)
SimulateIOError( return SQLITE_ERROR );
UNUSED_PARAMETER(nFull);
@ -39272,7 +39264,6 @@ static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
** This routine should only be called once in the life of a RowSet.
*/
static void rowSetToList(RowSet *p){
/* This routine is called only once */
assert( p!=0 && (p->rsFlags & ROWSET_NEXT)==0 );
@ -41294,7 +41285,6 @@ static int addToSavepointBitvecs(Pager *pPager, Pgno pgno){
** is opened (by this or by any other connection).
*/
static void pager_unlock(Pager *pPager){
assert( pPager->eState==PAGER_READER
|| pPager->eState==PAGER_OPEN
|| pPager->eState==PAGER_ERROR
@ -43866,7 +43856,6 @@ static int subjournalPage(PgHdr *pPg){
int rc = SQLITE_OK;
Pager *pPager = pPg->pPager;
if( pPager->journalMode!=PAGER_JOURNALMODE_OFF ){
/* Open the sub-journal, if it has not already been opened */
assert( pPager->useJournal );
assert( isOpen(pPager->jfd) || pagerUseWal(pPager) );
@ -43963,7 +43952,6 @@ static int pagerStress(void *p, PgHdr *pPg){
rc = pagerWalFrames(pPager, pPg, 0, 0);
}
}else{
/* Sync the journal file if required. */
if( pPg->flags&PGHDR_NEED_SYNC
|| pPager->eState==PAGER_WRITER_CACHEMOD
@ -44828,7 +44816,6 @@ SQLITE_PRIVATE int sqlite3PagerAcquire(
if( pPager->errCode!=SQLITE_OK ){
rc = pPager->errCode;
}else{
if( bMmapOk && pagerUseWal(pPager) ){
rc = sqlite3WalFindFrame(pPager->pWal, pgno, &iFrame);
if( rc!=SQLITE_OK ) goto pager_acquire_err;
@ -45217,7 +45204,6 @@ static int pager_write(PgHdr *pPg){
if( inJournal && (pPager->nSavepoint==0 || !subjRequiresPage(pPg)) ){
assert( !pagerUseWal(pPager) );
}else{
/* The transaction journal now exists and we have a RESERVED or an
** EXCLUSIVE lock on the main database file. Write the current page to
** the transaction journal if it is not there already.
@ -45957,7 +45943,6 @@ SQLITE_PRIVATE int *sqlite3PagerStats(Pager *pPager){
** returning.
*/
SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *pPager, int eStat, int reset, int *pnVal){
assert( eStat==SQLITE_DBSTATUS_CACHE_HIT
|| eStat==SQLITE_DBSTATUS_CACHE_MISS
|| eStat==SQLITE_DBSTATUS_CACHE_WRITE
@ -46453,7 +46438,6 @@ SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){
}
if( eMode!=eOld ){
/* Change the journal mode. */
assert( pPager->eState!=PAGER_ERROR );
pPager->journalMode = (u8)eMode;
@ -46471,7 +46455,6 @@ SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){
assert( isOpen(pPager->fd) || pPager->exclusiveMode );
if( !pPager->exclusiveMode && (eOld & 5)==1 && (eMode & 1)==0 ){
/* In this case we would like to delete the journal file. If it is
** not possible, then that is not a problem. Deleting the journal file
** here is an optimization only.
@ -52234,7 +52217,6 @@ static int decodeFlags(MemPage *pPage, int flagByte){
** we failed to detect any corruption.
*/
static int btreeInitPage(MemPage *pPage){
assert( pPage->pBt!=0 );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
@ -54167,7 +54149,6 @@ static void btreeEndTransaction(Btree *p){
** are no active cursors, it also releases the read lock.
*/
SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
if( p->inTrans==TRANS_NONE ) return SQLITE_OK;
sqlite3BtreeEnter(p);
btreeIntegrity(p);
@ -54839,7 +54820,6 @@ static int accessPayload(
#endif
for( ; rc==SQLITE_OK && amt>0 && nextPage; iIdx++){
#ifndef SQLITE_OMIT_INCRBLOB
/* If required, populate the overflow page-list cache. */
if( pCur->aOverflow ){
@ -56684,7 +56664,6 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);
if( rc==SQLITE_OK ){
u8 *pOut = &pSpace[4];
u8 *pCell = pPage->apOvfl[0];
u16 szCell = cellSizePtr(pPage, pCell);
@ -61672,7 +61651,6 @@ static Op *opIterNext(VdbeOpIter *p){
int nOp;
if( p->iSub<=p->nSub ){
if( p->iSub==0 ){
aOp = v->aOp;
nOp = v->nOp;
@ -67723,7 +67701,6 @@ SQLITE_PRIVATE int sqlite3VdbeExec(
#endif
switch( pOp->opcode ){
/*****************************************************************************
** What follows is a massive switch statement where each case implements a
** separate instruction in the virtual machine. If we follow the usual
@ -69910,7 +69887,6 @@ case OP_Savepoint: {
);
rc = SQLITE_BUSY;
}else{
/* Determine whether or not this is a transaction savepoint. If so,
** and this is a RELEASE command, then the current transaction
** is committed.
@ -72754,7 +72730,6 @@ case OP_JournalMode: { /* out2-prerelease */
);
break;
}else{
if( eOld==PAGER_JOURNALMODE_WAL ){
/* If leaving WAL mode, close the log file. If successful, the call
** to PagerCloseWal() checkpoints and deletes the write-ahead-log
@ -76262,7 +76237,6 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
}
#endif
switch( pExpr->op ){
#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
/* The special operator TK_ROW means use the rowid for the first
** column in the FROM clause. This is used by the LIMIT and ORDER BY
@ -78315,7 +78289,6 @@ SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
**
*/
static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
/* If pWalker->u.i is 3 then any term of the expression that comes from
** the ON or USING clauses of a join disqualifies the expression
** from being considered constant. */
@ -81531,7 +81504,6 @@ static void renameTriggerFunc(
*/
if( zSql ){
do {
if( !*zCsr ){
/* Ran out of input before finding the table name. Return NULL. */
return;
@ -87588,7 +87560,6 @@ SQLITE_PRIVATE Index *sqlite3CreateIndex(
** Find the table that is to be indexed. Return early if not found.
*/
if( pTblName!=0 ){
/* Use the two-part index name to determine the database
** to search for the table. 'Fix' the table name to this db
** before looking up the table.
@ -93406,7 +93377,6 @@ SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) );
for(pFKey=pTab->pFKey; pFKey; pFKey=pNext){
/* Remove the FK from the fkeyHash hash table. */
if( !db || db->pnBytesFreed==0 ){
if( pFKey->pPrevTo ){
@ -97649,7 +97619,6 @@ SQLITE_PRIVATE void sqlite3Pragma(
/* Jump to the appropriate pragma handler */
switch( aPragmaNames[mid].ePragTyp ){
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
/*
** PRAGMA [database.]default_cache_size
@ -106603,7 +106572,6 @@ SQLITE_PRIVATE void sqlite3CodeRowTrigger(
assert( (op==TK_UPDATE)==(pChanges!=0) );
for(p=pTrigger; p; p=p->pNext){
/* Sanity checking: The schema for the trigger and for the table are
** always defined. The trigger must be in the same schema as the table
** or else it must be a TEMP trigger. */
@ -120364,7 +120332,6 @@ SQLITE_API int sqlite3_config(int op, ...){
va_start(ap, op);
switch( op ){
/* Mutex configuration options are only available in a threadsafe
** compile.
*/
@ -123106,7 +123073,6 @@ SQLITE_API int sqlite3_test_control(int op, ...){
va_list ap;
va_start(ap, op);
switch( op ){
/*
** Save the current state of the PRNG.
*/
@ -124162,7 +124128,6 @@ typedef struct sqlite3_tokenizer sqlite3_tokenizer;
typedef struct sqlite3_tokenizer_cursor sqlite3_tokenizer_cursor;
struct sqlite3_tokenizer_module {
/*
** Structure version. Should always be set to 0 or 1.
*/
@ -127938,7 +127903,6 @@ static int fts3UpdateMethod(
** hash-table to the database.
*/
static int fts3SyncMethod(sqlite3_vtab *pVtab){
/* Following an incremental-merge operation, assuming that the input
** segments are not completely consumed (the usual case), they are updated
** in place to remove the entries that have already been merged. This
@ -129924,7 +129888,6 @@ static int fts3EvalTestDeferredAndNear(Fts3Cursor *pCsr, int *pRc){
int rc = *pRc;
int bMiss = 0;
if( rc==SQLITE_OK ){
/* If there are one or more deferred tokens, load the current row into
** memory and scan it to determine the position list for each deferred
** token. Then, see if this row is really a match, considering deferred
@ -130113,7 +130076,6 @@ static int fts3EvalGatherStats(
fts3EvalRestart(pCsr, pRoot, &rc);
while( pCsr->isEof==0 && rc==SQLITE_OK ){
do {
/* Ensure the %_content statement is reset. */
if( pCsr->isRequireSeek==0 ) sqlite3_reset(pCsr->pStmt);
@ -135784,7 +135746,6 @@ static int fts3SegReaderNext(
}
if( !pNext || pNext>=&pReader->aNode[pReader->nNode] ){
if( fts3SegReaderIsPending(pReader) ){
Fts3HashElem *pElem = *(pReader->ppNextElem);
if( pElem==0 ){
@ -135943,7 +135904,6 @@ static int fts3SegReaderNextDocid(
** following block advances it to point one byte past the end of
** the same offset list. */
while( 1 ){
/* The following line of code (and the "p++" below the while() loop) is
** normally all that is required to move pointer p to the desired
** position. The exception is if this node is being loaded from disk
@ -136463,7 +136423,6 @@ static int fts3NodeAddTerm(
nReq += sqlite3Fts3VarintLen(nPrefix)+sqlite3Fts3VarintLen(nSuffix)+nSuffix;
if( nReq<=p->nNodeSize || !pTree->zTerm ){
if( nReq>p->nNodeSize ){
/* An unusual case: this is the first term to be added to the node
** and the static node buffer (p->nNodeSize bytes) is not large
@ -137353,7 +137312,6 @@ SQLITE_PRIVATE int sqlite3Fts3SegReaderStep(
}
if( !isIgnoreEmpty || nList>0 ){
/* Calculate the 'docid' delta value to write into the merged
** doclist. */
sqlite3_int64 iDelta;
@ -140939,7 +140897,6 @@ static int fts3MatchinfoValues(
sqlite3_stmt *pSelect = 0;
for(i=0; rc==SQLITE_OK && zArg[i]; i++){
switch( zArg[i] ){
case FTS3_MATCHINFO_NPHRASE:
if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nPhrase;
@ -141130,7 +141087,6 @@ SQLITE_PRIVATE void sqlite3Fts3Snippet(
}
for(nSnippet=1; 1; nSnippet++){
int iSnip; /* Loop counter 0..nSnippet-1 */
u64 mCovered = 0; /* Bitmask of phrases covered by snippet */
u64 mSeen = 0; /* Bitmask of phrases seen by BestSnippet() */
@ -144184,7 +144140,6 @@ static void SortByDimension(
int *aSpare
){
if( nIdx>1 ){
int iLeft = 0;
int iRight = 0;
@ -145699,7 +145654,6 @@ static int icuLikeCompare(
int prevEscape = 0; /* True if the previous character was uEsc */
while( zPattern[iPattern]!=0 ){
/* Read (and consume) the next character from the input pattern. */
UChar32 uPattern;
U8_NEXT_UNSAFE(zPattern, iPattern, uPattern);
@ -145940,7 +145894,7 @@ static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
** of upper() or lower().
**
** lower('I', 'en_us') -> 'i'
** lower('I', 'tr_tr') -> 'ı' (small dotless i)
** lower('I', 'tr_tr') -> '??' (small dotless i)
**
** http://www.icu-project.org/userguide/posix.html#case_mappings
*/

View File

@ -9,4 +9,4 @@
***************************************************************************/
extern const char build_version[];
const char build_version[] = "0.153 ("__DATE__")";
const char build_version[] = "0.154 ("__DATE__")";