Updated to SQLite v3.12.2; updated version number.
@@ -5,12 +5,12 @@ ### Downloading Pre-built Binaries
The easiest way to get LiteStore is by downloading one of the prebuilt binaries from the [Github Release Page][release]: - * [LiteStore for Mac OS X (x64)](https://github.com/h3rald/litestore/releases/download/v1.1.0litestore_v1.1.0_macosx_x64.zip) -- Compiled on OS X El Capitan (LLVM CLANG 7.0.0) - * [LiteStore for Windows (x64)](https://github.com/h3rald/litestore/releases/download/v1.1.0/litestore_v1.1.0_windows_x64.zip) -- Cross-compiled on OS X El Capitan (MinGW-w64 GCC 4.8.2) - * [LiteStore for Windows (x86)](https://github.com/h3rald/litestore/releases/download/v1.1.0/litestore_v1.1.0_windows_x86.zip) -- Cross-compiled on OS X El Capitan (MinGW-w64 GCC 4.8.2) - * [LiteStore for Linux (x64)](https://github.com/h3rald/litestore/releases/download/v1.1.0/litestore_v1.1.0_linux_x64.zip) -- Cross-compiled on OS X El Capitan (GNU GCC 4.8.1) - * [LiteStore for Linux (x86)](https://github.com/h3rald/litestore/releases/download/v1.1.0/litestore_v1.1.0_linux_x86.zip) -- Cross-compiled on OS X El Capitan (GNU GCC 4.8.1) - * [LiteStore for Linux (ARM)](https://github.com/h3rald/litestore/releases/download/v1.1.0/litestore_v1.1.0_linux_arm.zip) -- Cross-compiled on OS X El Capitan (GNU GCC 4.8.2) + * [LiteStore for Mac OS X (x64)](https://github.com/h3rald/litestore/releases/download/v1.1.1litestore_v1.1.1_macosx_x64.zip) -- Compiled on OS X El Capitan (LLVM CLANG 7.0.0) + * [LiteStore for Windows (x64)](https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_windows_x64.zip) -- Cross-compiled on OS X El Capitan (MinGW-w64 GCC 4.8.2) + * [LiteStore for Windows (x86)](https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_windows_x86.zip) -- Cross-compiled on OS X El Capitan (MinGW-w64 GCC 4.8.2) + * [LiteStore for Linux (x64)](https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_linux_x64.zip) -- Cross-compiled on OS X El Capitan (GNU GCC 4.8.1) + * [LiteStore for Linux (x86)](https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_linux_x86.zip) -- Cross-compiled on OS X El Capitan (GNU GCC 4.8.1) + * [LiteStore for Linux (ARM)](https://github.com/h3rald/litestore/releases/download/v1.1.1/litestore_v1.1.1_linux_arm.zip) -- Cross-compiled on OS X El Capitan (GNU GCC 4.8.2) ### Installing using Nimble@@ -32,7 +32,7 @@ A simple but functional Administration App is available to manage LiteStore, create documents interactively, view and search content, etc.
To get the app up and running (assuming that you have the [litestore](class:cmd) executable in your path): -1. Download the default [data.db](https://github.com/h3rald/litestore/releases/download/v1.1.0/data.db) file. This file is a LiteStore data store file containing the sample app. +1. Download the default [data.db](https://github.com/h3rald/litestore/releases/download/v1.1.1/data.db) file. This file is a LiteStore data store file containing the sample app. 2. Go to the local directory in which you downloaded the [data.db](class:cmd) file. 3. Run [litestore -s:data.db](class:cmd) 4. Go to [localhost:9500/docs/admin/index.html](http://localhost:9500/docs/admin/index.html).
@@ -1,6 +1,6 @@
[Package] name = "litestore" -version = "1.1.0" +version = "1.1.1" author = "Fabio Cevasco" description = "Self-contained, lightweight, RESTful document store." license = "MIT"
@@ -1,6 +1,6 @@
/****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.12.1. By combining all the individual C code files into this +** version 3.12.2. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements@@ -336,9 +336,9 @@ ** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.12.1" -#define SQLITE_VERSION_NUMBER 3012001 -#define SQLITE_SOURCE_ID "2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d" +#define SQLITE_VERSION "3.12.2" +#define SQLITE_VERSION_NUMBER 3012002 +#define SQLITE_SOURCE_ID "2016-04-18 17:30:31 92dc59fd5ad66f646666042eb04195e3a61a9e8e" /* ** CAPI3REF: Run-Time Library Version Numbers@@ -63941,6 +63941,28 @@ iCellIdx = pCur->aiIdx[iCellDepth];
pPage = pCur->apPage[iCellDepth]; pCell = findCell(pPage, iCellIdx); + /* If the bPreserve flag is set to true, then the cursor position must + ** be preserved following this delete operation. If the current delete + ** will cause a b-tree rebalance, then this is done by saving the cursor + ** key and leaving the cursor in CURSOR_REQUIRESEEK state before + ** returning. + ** + ** Or, if the current delete will not cause a rebalance, then the cursor + ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately + ** before or after the deleted entry. In this case set bSkipnext to true. */ + if( bPreserve ){ + if( !pPage->leaf + || (pPage->nFree+cellSizePtr(pPage,pCell)+2)>(int)(pBt->usableSize*2/3) + ){ + /* A b-tree rebalance will be required after deleting this entry. + ** Save the cursor key. */ + rc = saveCursorKey(pCur); + if( rc ) return rc; + }else{ + bSkipnext = 1; + } + } + /* If the page containing the entry to delete is not a leaf page, move ** the cursor to the largest entry in the tree that is smaller than ** the entry being deleted. This cell will replace the cell being deleted@@ -63967,28 +63989,6 @@ if( pCur->pKeyInfo==0 ){
invalidateIncrblobCursors(p, pCur->info.nKey, 0); } - /* If the bPreserve flag is set to true, then the cursor position must - ** be preserved following this delete operation. If the current delete - ** will cause a b-tree rebalance, then this is done by saving the cursor - ** key and leaving the cursor in CURSOR_REQUIRESEEK state before - ** returning. - ** - ** Or, if the current delete will not cause a rebalance, then the cursor - ** will be left in CURSOR_SKIPNEXT state pointing to the entry immediately - ** before or after the deleted entry. In this case set bSkipnext to true. */ - if( bPreserve ){ - if( !pPage->leaf - || (pPage->nFree+cellSizePtr(pPage,pCell)+2)>(int)(pBt->usableSize*2/3) - ){ - /* A b-tree rebalance will be required after deleting this entry. - ** Save the cursor key. */ - rc = saveCursorKey(pCur); - if( rc ) return rc; - }else{ - bSkipnext = 1; - } - } - /* Make the page containing the entry to be deleted writable. Then free any ** overflow pages associated with the entry and finally remove the cell ** itself from within the page. */@@ -82769,7 +82769,6 @@ VdbeCursor *pCsr /* Cursor that holds the new sorter */
){ int pgsz; /* Page size of main database */ int i; /* Used to iterate through aTask[] */ - int mxCache; /* Cache size */ VdbeSorter *pSorter; /* The new sorter */ KeyInfo *pKeyInfo; /* Copy of pCsr->pKeyInfo with db==0 */ int szKeyInfo; /* Size of pCsr->pKeyInfo in bytes */@@ -82826,11 +82825,20 @@ pTask->pSorter = pSorter;
} if( !sqlite3TempInMemory(db) ){ + i64 mxCache; /* Cache size in bytes*/ u32 szPma = sqlite3GlobalConfig.szPma; pSorter->mnPmaSize = szPma * pgsz; + mxCache = db->aDb[0].pSchema->cache_size; - if( mxCache<(int)szPma ) mxCache = (int)szPma; - pSorter->mxPmaSize = MIN((i64)mxCache*pgsz, SQLITE_MAX_PMASZ); + if( mxCache<0 ){ + /* A negative cache-size value C indicates that the cache is abs(C) + ** KiB in size. */ + mxCache = mxCache * -1024; + }else{ + mxCache = mxCache * pgsz; + } + mxCache = MIN(mxCache, SQLITE_MAX_PMASZ); + pSorter->mxPmaSize = MAX(pSorter->mnPmaSize, (int)mxCache); /* EVIDENCE-OF: R-26747-61719 When the application provides any amount of ** scratch memory using SQLITE_CONFIG_SCRATCH, SQLite avoids unnecessary@@ -95563,6 +95571,7 @@ }else{
zType = z + sqlite3Strlen30(z) + 1; memcpy(zType, pType->z, pType->n); zType[pType->n] = 0; + sqlite3Dequote(zType); pCol->affinity = sqlite3AffinityType(zType, &pCol->szEst); pCol->colFlags |= COLFLAG_HASTYPE; }@@ -121360,7 +121369,13 @@ sqlite3ExprDelete(db, pCompare);
} } } - sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2); + /* These registers need to be preserved in case there is an IN operator + ** loop. So we could deallocate the registers here (and potentially + ** reuse them later) if (pLoop->wsFlags & WHERE_IN_ABLE)==0. But it seems + ** simpler and safer to simply not reuse the registers. + ** + ** sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2); + */ sqlite3ExprCachePop(pParse); }else #endif /* SQLITE_OMIT_VIRTUALTABLE */@@ -185458,7 +185473,7 @@ sqlite3_value **apUnused /* Function arguments */
){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2016-04-18 17:30:31 92dc59fd5ad66f646666042eb04195e3a61a9e8e", -1, SQLITE_TRANSIENT); } static int fts5Init(sqlite3 *db){
@@ -111,9 +111,9 @@ ** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.12.1" -#define SQLITE_VERSION_NUMBER 3012001 -#define SQLITE_SOURCE_ID "2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d" +#define SQLITE_VERSION "3.12.2" +#define SQLITE_VERSION_NUMBER 3012002 +#define SQLITE_SOURCE_ID "2016-04-18 17:30:31 92dc59fd5ad66f646666042eb04195e3a61a9e8e" /* ** CAPI3REF: Run-Time Library Version Numbers