From: drh <> Date: Thu, 14 Sep 2023 16:02:56 +0000 (+0000) Subject: Document the use of OPFLAG_ISNOOP as the P2 argument on OP_Delete. No X-Git-Tag: version-3.44.0~200 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e68decd54cdfc2da5a3d0416a211612eccf4ee9b;p=thirdparty%2Fsqlite.git Document the use of OPFLAG_ISNOOP as the P2 argument on OP_Delete. No functional code changes. FossilOrigin-Name: d88f41b2cf2b721170d2428a50b717976091389d9a07d0ffa15c3323b0eaad37 --- diff --git a/manifest b/manifest index cde86ae24d..bfc381e9f9 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Avoid\sa\ssegfault\sin\stest\sprogram\sshowdb.c\sthat\scould\soccur\swhen\sanalyzing\sa\scorrupt\sdb. -D 2023-09-14T14:05:51.500 +C Document\sthe\suse\sof\sOPFLAG_ISNOOP\sas\sthe\sP2\sargument\son\sOP_Delete.\s\sNo\nfunctional\scode\schanges. +D 2023-09-14T16:02:56.452 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -779,7 +779,7 @@ F src/upsert.c fa125a8d3410ce9a97b02cb50f7ae68a2476c405c76aa692d3acf6b8586e9242 F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0 F src/util.c 81f6d47ecda50b87e87f86d0bf87aac213698b3eec0d95d4cbaea971794e2e25 F src/vacuum.c 604fcdaebe76f3497c855afcbf91b8fa5046b32de3045bab89cc008d68e40104 -F src/vdbe.c 2849053c8625702b324a1553836b5abfcbc1559b4e49187e745dea349fb81685 +F src/vdbe.c cd112eb00d20fc5cc44f631d0e713838602637328b0f127c2f3c2aa8cea3cc91 F src/vdbe.h 41485521f68e9437fdb7ec4a90f9d86ab294e9bb8281e33b235915e29122cfc0 F src/vdbeInt.h 949669dfd8a41550d27dcb905b494f2ccde9a2e6c1b0b04daa1227e2e74c2b2c F src/vdbeapi.c 4184402246172220418c0ef49ff4cf1a19ced9a4ac6c843c2f0773fb5c543f37 @@ -2120,8 +2120,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 bb221381fa38db5be1222d89c567a9bca0e6c441e26a8c797bd326b263556afb -R 9b78fb5f9afe1c654d545d3bf356051e -U dan -Z a44a085ce3b158066bd2131f51c55531 +P 6bf3e90687d48243544cc07baa01cb1b25ee0b77c59437f96c8da8e5d8b8095e +R c58a6531964633c6b2bff9cf50a88483 +U drh +Z 6a0608e494f78cecea487dbc940f5225 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index d6f674b30e..29925bb419 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6bf3e90687d48243544cc07baa01cb1b25ee0b77c59437f96c8da8e5d8b8095e \ No newline at end of file +d88f41b2cf2b721170d2428a50b717976091389d9a07d0ffa15c3323b0eaad37 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 41e56d3060..6463136507 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -5775,8 +5775,13 @@ case OP_RowCell: { ** the "primary" delete. The others are all on OPFLAG_FORDELETE ** cursors or else are marked with the AUXDELETE flag. ** -** If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row -** change count is incremented (otherwise not). +** If the OPFLAG_NCHANGE (0x01) flag of P2 (NB: P2 not P5) is set, then +** the row change count is incremented (otherwise not). +** +** If the OPFLAG_ISNOOP (0x40) flag of P2 (not P5!) is set, then the +** pre-update-hook for deletes is run, but the btree is otherwise unchanged. +** This happens when the OP_Delete is to be shortly followed by an OP_Insert +** with the same key, causing the btree entry to be overwritten. ** ** P1 must not be pseudo-table. It has to be a real table with ** multiple rows.