summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Naidis <alex.naidis@linux.com>2017-06-08 18:11:59 +0200
committerAlex Naidis <alex.naidis@linux.com>2017-06-08 16:22:22 +0000
commit1ea291d14f0cf30fd85f00307dbcb9991912ed2c (patch)
tree06037d5576ca6163344b408d41abfaa34220b467
parente30db8f4dd47ab92b8400ea6a5147bf4d3e49f27 (diff)
sqlite: Upgrade to SQLite 3.19.3
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3190300.zip $ sha256sum sqlite-amalgamation-3190300.zip 130185efe772a7392c5cecb4613156aba12f37b335ef91e171c345e197eabdc1 sqlite-amalgamation-3190300.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP 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. The Android specific patch applied cleanly and was regenerated. This bugfix release contains a fix for a bug which can lead to data corruption. More details about the release are available here: https://sqlite.org/releaselog/3_19_3.html Change-Id: I13cede802129bef64a183915827d422e1d609464 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
-rw-r--r--README.version4
-rw-r--r--dist/Android.patch12
-rw-r--r--dist/orig/sqlite3.c20
-rw-r--r--dist/orig/sqlite3.h6
-rw-r--r--dist/sqlite3.c20
-rw-r--r--dist/sqlite3.h6
6 files changed, 40 insertions, 28 deletions
diff --git a/README.version b/README.version
index c26473d..305983a 100644
--- a/README.version
+++ b/README.version
@@ -1,3 +1,3 @@
-URL: https://sqlite.org/2017/sqlite-amalgamation-3190200.zip
-Version: 3.19.2
+URL: https://sqlite.org/2017/sqlite-amalgamation-3190300.zip
+Version: 3.19.3
BugComponent: 24950
diff --git a/dist/Android.patch b/dist/Android.patch
index 98b9f1f..095b973 100644
--- a/dist/Android.patch
+++ b/dist/Android.patch
@@ -1,6 +1,6 @@
diff -r -u -d orig/shell.c ./shell.c
---- orig/shell.c 2017-05-24 17:13:50.000000000 +0200
-+++ ./shell.c 2017-05-24 19:24:05.290434785 +0200
+--- orig/shell.c 2017-06-08 17:09:50.000000000 +0200
++++ ./shell.c 2017-06-08 18:08:52.586798733 +0200
@@ -52,6 +52,12 @@
#endif
#include <ctype.h>
@@ -38,8 +38,8 @@ diff -r -u -d orig/shell.c ./shell.c
}
diff -r -u -d orig/sqlite3.c ./sqlite3.c
---- orig/sqlite3.c 2017-05-24 17:13:50.000000000 +0200
-+++ ./sqlite3.c 2017-05-24 19:24:05.339433935 +0200
+--- orig/sqlite3.c 2017-06-08 17:09:50.000000000 +0200
++++ ./sqlite3.c 2017-06-08 18:08:52.641797754 +0200
@@ -33542,7 +33542,7 @@
SimulateIOError( rc=1 );
if( rc!=0 ){
@@ -67,7 +67,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
goto shm_open_err;
}
-@@ -115926,7 +115926,7 @@
+@@ -115934,7 +115934,7 @@
}
if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
sqlite3SetString(pzErrMsg, db, "unsupported file format");
@@ -76,7 +76,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
goto initone_error_out;
}
-@@ -149753,13 +149753,25 @@
+@@ -149769,13 +149769,25 @@
** module with sqlite.
*/
if( SQLITE_OK==rc
diff --git a/dist/orig/sqlite3.c b/dist/orig/sqlite3.c
index 657a54e..9c8fd62 100644
--- a/dist/orig/sqlite3.c
+++ b/dist/orig/sqlite3.c
@@ -1,6 +1,6 @@
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
-** version 3.19.2. By combining all the individual C code files into this
+** version 3.19.3. 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.19.2"
-#define SQLITE_VERSION_NUMBER 3019002
-#define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"
+#define SQLITE_VERSION "3.19.3"
+#define SQLITE_VERSION_NUMBER 3019003
+#define SQLITE_SOURCE_ID "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -67208,12 +67208,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);
@@ -199056,7 +199062,7 @@ static void fts5SourceIdFunc(
){
assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused);
- sqlite3_result_text(pCtx, "fts5: 2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9", -1, SQLITE_TRANSIENT);
+ sqlite3_result_text(pCtx, "fts5: 2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b", -1, SQLITE_TRANSIENT);
}
static int fts5Init(sqlite3 *db){
diff --git a/dist/orig/sqlite3.h b/dist/orig/sqlite3.h
index 296ada0..3deb9c7 100644
--- a/dist/orig/sqlite3.h
+++ b/dist/orig/sqlite3.h
@@ -121,9 +121,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.19.2"
-#define SQLITE_VERSION_NUMBER 3019002
-#define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"
+#define SQLITE_VERSION "3.19.3"
+#define SQLITE_VERSION_NUMBER 3019003
+#define SQLITE_SOURCE_ID "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b"
/*
** CAPI3REF: Run-Time Library Version Numbers
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index 9db21a8..c89de64 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.19.2. By combining all the individual C code files into this
+** version 3.19.3. 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.19.2"
-#define SQLITE_VERSION_NUMBER 3019002
-#define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"
+#define SQLITE_VERSION "3.19.3"
+#define SQLITE_VERSION_NUMBER 3019003
+#define SQLITE_SOURCE_ID "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b"
/*
** CAPI3REF: Run-Time Library Version Numbers
@@ -67208,12 +67208,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);
@@ -199068,7 +199074,7 @@ static void fts5SourceIdFunc(
){
assert( nArg==0 );
UNUSED_PARAM2(nArg, apUnused);
- sqlite3_result_text(pCtx, "fts5: 2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9", -1, SQLITE_TRANSIENT);
+ sqlite3_result_text(pCtx, "fts5: 2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b", -1, SQLITE_TRANSIENT);
}
static int fts5Init(sqlite3 *db){
diff --git a/dist/sqlite3.h b/dist/sqlite3.h
index 296ada0..3deb9c7 100644
--- a/dist/sqlite3.h
+++ b/dist/sqlite3.h
@@ -121,9 +121,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
-#define SQLITE_VERSION "3.19.2"
-#define SQLITE_VERSION_NUMBER 3019002
-#define SQLITE_SOURCE_ID "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"
+#define SQLITE_VERSION "3.19.3"
+#define SQLITE_VERSION_NUMBER 3019003
+#define SQLITE_SOURCE_ID "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b"
/*
** CAPI3REF: Run-Time Library Version Numbers