aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-06-16 12:15:25 +0000
committerdrh <drh@noemail.net>2017-06-16 12:15:25 +0000
commit004ba5404886e1ef876ead78bbd5e47e399974be (patch)
treea74f362c74ee7241904a87572e385f41c243e868
parent5da1cd0554ac4148bca5f4bfd34d192200eb2b39 (diff)
parentde415c006a41d6c96e771c2afbf399a84a98b21d (diff)
downloadsqlite-004ba5404886e1ef876ead78bbd5e47e399974be.tar.gz
sqlite-004ba5404886e1ef876ead78bbd5e47e399974be.zip
An unintentional fork was created due to a typo when creating branch-3.18.
This check-in resolves the fork and is the 3.18.1 release candidate. FossilOrigin-Name: 20e5ffb1ceed514bf812ea5a2ce027b55203612bdbf8116a69f0cd52c67dbb84
-rw-r--r--manifest15
-rw-r--r--manifest.uuid2
-rw-r--r--src/btree.c10
-rw-r--r--test/autovacuum.test7
4 files changed, 24 insertions, 10 deletions
diff --git a/manifest b/manifest
index cce089469..f8fe4f4a8 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Increase\sthe\sversion\snumber\sto\s3.18.1.
-D 2017-06-15T07:47:09.966
+C An\sunintentional\sfork\swas\screated\sdue\sto\sa\stypo\swhen\screating\sbranch-3.18.\nThis\scheck-in\sresolves\sthe\sfork\sand\sis\sthe\s3.18.1\srelease\scandidate.
+D 2017-06-16T12:15:25.099
F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 1faf9f06aadc9284c212dea7bbc7c0dea7e8337f0287c81001eff500912c790a
@@ -344,7 +344,7 @@ F src/auth.c 930b376a9c56998557367e6f7f8aaeac82a2a792
F src/backup.c faf17e60b43233c214aae6a8179d24503a61e83b
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
F src/btmutex.c 0e9ce2d56159b89b9bc8e197e023ee11e39ff8ca
-F src/btree.c ae0e0397e6ad58465bbf932239ee7539ca22f257c97b16c9d0960a1f5de743a3
+F src/btree.c 5aa6108269a84fa9c4b1212754deaf9aed9cbcec603f2e7ea5652e9bf22d9b50
F src/btree.h bf64dfeeddeebdb775a5eba0098bbc00d073290d
F src/btreeInt.h cd55d39d9916270837a88c12e701047cba0729b0
F src/build.c 43f903c9082040ced2b421543cb0300c2973647d
@@ -535,7 +535,7 @@ F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df
F test/autoindex3.test a3be0d1a53a7d2edff208a5e442312957047e972
F test/autoindex4.test 49d3cd791a9baa16fb461d7ea3de80d019a819cf
F test/autoindex5.test 96f084a5e6024ea07cace5888df3223f3ea86990
-F test/autovacuum.test 92c24eedbdb68e49f3fb71f26f9ce6d8988cac15
+F test/autovacuum.test 0831cd34e14695d297187f7f6519265e3121c5b0a1720e548e86829e796129e9
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
F test/avtrans.test 0252654f4295ddda3b2cce0e894812259e655a85
F test/backcompat.test 3e64cedda754c778ef6bbe417b6e7a295e662a4d
@@ -1569,7 +1569,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37
-R d9d2937a9ef81a143daa8ffb08c470ae
+P 4be2eba8c15104e9f420738092c06a14a9c9c34b13c0c8f897302ab7613ffccc 30c50f0e06084f3c4357962ed99e2c803b21ca238d00d70d9dee40164caf2afa
+R eff70f988c3d37d60a840932b2823aa3
+T +closed 30c50f0e06084f3c4357962ed99e2c803b21ca238d00d70d9dee40164caf2afa
U drh
-Z b647ddcdafc3db3432ec33f7a67073de
+Z 14751ab82fc1ed40f07c1c885ed5e7be
diff --git a/manifest.uuid b/manifest.uuid
index d9f04f366..751b5e3ad 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-4be2eba8c15104e9f420738092c06a14a9c9c34b13c0c8f897302ab7613ffccc \ No newline at end of file
+20e5ffb1ceed514bf812ea5a2ce027b55203612bdbf8116a69f0cd52c67dbb84 \ No newline at end of file
diff --git a/src/btree.c b/src/btree.c
index 52c0c47dd..cccff64bb 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -8175,12 +8175,18 @@ 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);
diff --git a/test/autovacuum.test b/test/autovacuum.test
index 5c14ed85d..431c4b8a2 100644
--- a/test/autovacuum.test
+++ b/test/autovacuum.test
@@ -705,5 +705,12 @@ do_test autovacuum-9.5 {
file size test.db
} $::sqlite_pending_byte
+do_execsql_test autovacuum-10.1 {
+ DROP TABLE t1;
+ CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
+ INSERT INTO t1 VALUES(25, randomblob(104));
+ REPLACE INTO t1 VALUES(25, randomblob(1117));
+ PRAGMA integrity_check;
+} {ok}
finish_test