]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Enhanced documentation for sqlite3_vtab_nochange() to make it clear that
authordrh <drh@noemail.net>
Wed, 14 Oct 2020 15:46:29 +0000 (15:46 +0000)
committerdrh <drh@noemail.net>
Wed, 14 Oct 2020 15:46:29 +0000 (15:46 +0000)
it is an optimization and that virtual table implementations should be
prepared for it to always return false.

FossilOrigin-Name: 3e2643619d122616663688533977d6c60d45a269b4e2bdc330fd3ee5d39f2e03

manifest
manifest.uuid
src/sqlite.h.in

index 23e773aedfb2462f806ab898b8a5396d6320a78d..27f03dd515c539b6d1efa63a93a3b7cf6e1310fd 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\ssome\sfts5\sproblems\swith\ssigned\sinteger\soverflow\scausing\ssegfaults\sin\s-ftrapv\sbuilds.
-D 2020-10-12T18:09:16.954
+C Enhanced\sdocumentation\sfor\ssqlite3_vtab_nochange()\sto\smake\sit\sclear\sthat\nit\sis\san\soptimization\sand\sthat\svirtual\stable\simplementations\sshould\sbe\nprepared\sfor\sit\sto\salways\sreturn\sfalse.
+D 2020-10-14T15:46:29.823
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -539,7 +539,7 @@ F src/resolve.c 97b91fb25d86881ff20c9ad2ad98412c6c1bb5f7d6c9bb044db250cbc9cfcd4b
 F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
 F src/select.c 0d9ce195bf062f45390c9f9fa0ab7402e26b57bee51b9f67b3034c32f9fc425a
 F src/shell.c.in a04bec163dfafef8b14c36430685e73913b93569e7ae839533fa7e8c23837f6e
-F src/sqlite.h.in cb9f0862e8d0f8691de95b18439ab60666f868c83bc65e3a17f0a0b44cc8f8a9
+F src/sqlite.h.in 47000ed61a8e8379d8b971e64aadc5837ed094c105a745e70732f332b8ee57ea
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h 2d1af80082edffd71c6f96f70ad1ce6a4fb46615ad10291fc77fe0dea9ff0197
 F src/sqliteInt.h 34319c13e900063b267052168b277c7bc1e124a1ceef457e450d53ce618bb96e
@@ -1882,7 +1882,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 ce97b56d63d6e03b909e049a0a62251d98c7bf643448193a28b42a5871899387
-R 33ec89eec38aa79a3f5fd2c8483f5719
-U dan
-Z 12327d27313228882fdf8580d5e9a9ec
+P 7e17c2f4b7dc9b563d0b4da949bb134dc7c4fc9c86ce03891432a884ca6409d5
+R a10d6701515e69259855f366279592f4
+U drh
+Z cfb681fb3dccbbdf13a779867a74e779
index c5eb8c9d477e432c556f0a2e2c60d1c981d77b7c..37afe14ed3aa4e90574141f35613f82703f5e067 100644 (file)
@@ -1 +1 @@
-7e17c2f4b7dc9b563d0b4da949bb134dc7c4fc9c86ce03891432a884ca6409d5
\ No newline at end of file
+3e2643619d122616663688533977d6c60d45a269b4e2bdc330fd3ee5d39f2e03
\ No newline at end of file
index 1ea1f432246144ace052636985f80efbe038d30d..37ff694172ec2a2cafdafb6b7126d935c1ca0eb4 100644 (file)
@@ -9244,10 +9244,11 @@ int sqlite3_vtab_on_conflict(sqlite3 *);
 ** CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE
 **
 ** If the sqlite3_vtab_nochange(X) routine is called within the [xColumn]
-** method of a [virtual table], then it returns true if and only if the
+** method of a [virtual table], then it might returns true if the
 ** column is being fetched as part of an UPDATE operation during which the
-** column value will not change.  Applications might use this to substitute
-** a return value that is less expensive to compute and that the corresponding
+** column value will not change.  The virtual table implementation can use
+** this hint as permission to substitute a return value that is less
+** expensive to compute and that the corresponding
 ** [xUpdate] method understands as a "no-change" value.
 **
 ** If the [xColumn] method calls sqlite3_vtab_nochange() and finds that
@@ -9256,6 +9257,12 @@ int sqlite3_vtab_on_conflict(sqlite3 *);
 ** any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces].
 ** In that case, [sqlite3_value_nochange(X)] will return true for the
 ** same column in the [xUpdate] method.
+**
+** The sqlite3_vtab_nochange() routine is an optimization.  Virtual table
+** implementations should continue to give a correct answer even if the
+** sqlite3_vtab_nochange() interface were to always return false.  In the
+** current implementation, the sqlite3_vtab_nochange() interface does always
+** returns false for the enhanced [UPDATE FROM] statement.
 */
 int sqlite3_vtab_nochange(sqlite3_context*);