From a34adaf667878954ee2d1c6c6d4820606eb5a03f Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 8 Apr 2017 14:11:47 +0000 Subject: [PATCH] Expand on the comment above OP_Destroy to explain why it throws an error if there are any active reader VMs. FossilOrigin-Name: b9a8c2b9bec9f537b2d5aff6659a5748b1f70b53519a1f9dfceb5209154eca8e --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/vdbe.c | 15 +++++++++++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index e10ca39c0b..e3f79625e8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Have\sthe\srtree\smodule\sclose\sany\sopen\sblob-handle\swithin\sthe\sxSavepoint\smethod.\nThis\sprevents\ssuch\san\sopen\sblob\shandle\sfrom\sinterfering\swith\sDROP\sTABLE\noperations. -D 2017-04-08T13:52:41.332 +C Expand\son\sthe\scomment\sabove\sOP_Destroy\sto\sexplain\swhy\sit\sthrows\san\serror\sif\nthere\sare\sany\sactive\sreader\sVMs. +D 2017-04-08T14:11:47.626 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc a4c0613a18663bda56d8cf76079ab6590a7c3602e54befb4bbdef76bcaa38b6a @@ -468,7 +468,7 @@ F src/update.c 456d4a4656f8a03c2abc88a51b19172197400e58 F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c F src/util.c ca8440ede81e155d15cff7c101654f60b55a9ae6 F src/vacuum.c 1fe4555cd8c9b263afb85b5b4ee3a4a4181ad569 -F src/vdbe.c b070c9c81a5faff5d9fc9563c7c030e3e1adb69d835259470fd945ef61f3f9fb +F src/vdbe.c 808fda3d50f544120d27c731449b524b4ec8f8b0f734b228831078f0ba53ecb9 F src/vdbe.h caa5346d52bae2a3c8c1dcfa60a7a4dc878a9e3865cb8239da55808b316c8158 F src/vdbeInt.h 5db089ce18c4feff8820ec6e4cac2d2c82e03d4b1d96f10a6e43832147b8dffe F src/vdbeapi.c 5b08d82592bcff4470601fe78aaabebd50837860 @@ -1570,7 +1570,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 78c1e90305d48917d9423d8e50a7dfd15ec27aa93cb421610062229c7ede13a6 -R 0c38afb8d28742bfd99c862428490c09 +P fa4416adc2a9a3a80db1d5befc0b95c3d0fc41affe38f7f2f45cdfae3f1b49eb +R a9817579cdde3e2d07834f7afee2d7a0 U dan -Z 475b2e97335280e83d36c7e778a71dcc +Z aefe60bc1892ed67bf5beab6d8c742fc diff --git a/manifest.uuid b/manifest.uuid index c1e1fd932b..737a0a72a7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -fa4416adc2a9a3a80db1d5befc0b95c3d0fc41affe38f7f2f45cdfae3f1b49eb \ No newline at end of file +b9a8c2b9bec9f537b2d5aff6659a5748b1f70b53519a1f9dfceb5209154eca8e \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 51c702a4ad..a990afb11d 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -5386,10 +5386,17 @@ case OP_IdxGE: { /* jump */ ** might be moved into the newly deleted root page in order to keep all ** root pages contiguous at the beginning of the database. The former ** value of the root page that moved - its value before the move occurred - -** is stored in register P2. If no page -** movement was required (because the table being dropped was already -** the last one in the database) then a zero is stored in register P2. -** If AUTOVACUUM is disabled then a zero is stored in register P2. +** is stored in register P2. If no page movement was required (because the +** table being dropped was already the last one in the database) then a +** zero is stored in register P2. If AUTOVACUUM is disabled then a zero +** is stored in register P2. +** +** This opcode throws an error if there are any active reader VMs when +** it is invoked. This is done to avoid the difficulty associated with +** updating existing cursors when a root page is moved in an AUTOVACUUM +** database. This error is thrown even if the database is not an AUTOVACUUM +** db in order to avoid introducing an incompatibility between autovacuum +** and non-autovacuum modes. ** ** See also: Clear */