diff options
author | Fyodor Kupolov <fkupolov@google.com> | 2017-06-19 09:59:41 -0700 |
---|---|---|
committer | JP Sugarbroad <jpsugar@google.com> | 2017-07-24 17:13:47 +0000 |
commit | 6f64ed5e805fb35c3a68a999c84a0cb65ff7a70c (patch) | |
tree | 4b81738a23888d3b316ed63888ed3c97e0505c91 /dist/sqlite3.c | |
parent | d81833ea90328c9a374f3cfebe470fa55a826f1d (diff) |
[DO NOT MERGE] sqlite: Upgrade to SQLite 3.18.2
Downloaded from https://sqlite.org/2017/sqlite-autoconf-3180200.tar.gz
$ sha256sum sqlite-autoconf-3180200.tar.gz
0d40222ea818a559590c51994ac85570eff5c5f754cbe08c2d34a3791942c1ba
sqlite-autoconf-3180200.tar.gz
dist/orig contains the stock sqlite3 code, as packaged in the
tar.gz file above.
dist contains a copy of dist/orig, but with the Android.patch
file applied.
Please see Android.patch for a list of differences between stock
and Android.
This release contains critical bug fixes for 3.18.0:
- https://sqlite.org/src/info/fda22108
- https://www.sqlite.org/src/info/61fe9745
More details about the release are available here:
https://sqlite.org/src/info/version-3.18.2
Test: code compiles and device boots with no problems.
Test: Repro steps from https://sqlite.org/src/info/fda22108
and https://www.sqlite.org/src/info/61fe9745
Bug: 62447923
Merged-In: I13cede802129bef64a183915827d422e1d609464
Change-Id: I6ae907fa6f13258d8d421037c7c94c21a2188eda
(cherry picked from commit e6695ba9e149b5d63c16d22e377e259a6df92284)
Diffstat (limited to 'dist/sqlite3.c')
-rw-r--r-- | dist/sqlite3.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/dist/sqlite3.c b/dist/sqlite3.c index dadda9c..5dd9488 100644 --- a/dist/sqlite3.c +++ b/dist/sqlite3.c @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.18.0. By combining all the individual C code files into this +** version 3.18.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 @@ -398,9 +398,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.18.0" -#define SQLITE_VERSION_NUMBER 3018000 -#define SQLITE_SOURCE_ID "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37" +#define SQLITE_VERSION "3.18.2" +#define SQLITE_VERSION_NUMBER 3018002 +#define SQLITE_SOURCE_ID "2017-06-17 09:59:36 036ebf729e4b21035d7f4f8e35a6f705e6bf99887889e2dc14ebf2242e7930dd" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -67080,9 +67080,6 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** btreeMoveto() call */ if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey ){ loc = 0; - }else if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey>0 - && pCur->info.nKey==pX->nKey-1 ){ - loc = -1; }else if( loc==0 ){ rc = sqlite3BtreeMovetoUnpacked(pCur, 0, pX->nKey, flags!=0, &loc); if( rc ) return rc; @@ -67133,12 +67130,18 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( memcpy(newCell, oldCell, 4); } rc = clearCell(pPage, oldCell, &info); - if( info.nSize==szNew && info.nLocal==info.nPayload ){ + if( info.nSize==szNew && info.nLocal==info.nPayload + && (!ISAUTOVACUUM || szNew<pPage->minLocal) + ){ /* Overwrite the old cell with the new if they are the same size. ** We could also try to do this if the old cell is smaller, then add ** the leftover space to the free list. But experiments show that ** doing that is no faster then skipping this optimization and just - ** calling dropCell() and insertCell(). */ + ** calling dropCell() and insertCell(). + ** + ** This optimization cannot be used on an autovacuum database if the + ** new entry uses overflow pages, as the insertCell() call below is + ** necessary to add the PTRMAP_OVERFLOW1 pointer-map entry. */ assert( rc==SQLITE_OK ); /* clearCell never fails when nLocal==nPayload */ if( oldCell+szNew > pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT; memcpy(oldCell, newCell, szNew); @@ -198269,7 +198272,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2017-06-17 09:59:36 036ebf729e4b21035d7f4f8e35a6f705e6bf99887889e2dc14ebf2242e7930dd", -1, SQLITE_TRANSIENT); } static int fts5Init(sqlite3 *db){ |