]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improvements to the SQLITE_PREPARE_FROM_DDL documentation.
authordrh <>
Thu, 26 Feb 2026 13:35:38 +0000 (13:35 +0000)
committerdrh <>
Thu, 26 Feb 2026 13:35:38 +0000 (13:35 +0000)
FossilOrigin-Name: c3288f16848866a2c846221c33631785f7b39938078bb95c61895f789395aa1d

manifest
manifest.uuid
src/sqlite.h.in

index 067c2fad3172f8ef33f548c1aeb855741b0a98d1..dda3e45248b0f6fbc6c10eeb568603154a9925d9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\san\sinconsequential\stypo\sin\sthe\soutput\sof\sthe\sdatedebug()\sSQL\sfunction.
-D 2026-02-26T12:17:19.803
+C Improvements\sto\sthe\sSQLITE_PREPARE_FROM_DDL\sdocumentation.
+D 2026-02-26T13:35:38.171
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -740,7 +740,7 @@ F src/resolve.c 928ff887f2a7c64275182060d94d06fdddbe32226c569781cf7e7edc6f58d7fd
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c 615d62112f5c14fb24facf9391492b42403875bfd4288db6ba10d7e6fbc22c4c
 F src/shell.c.in 2acdfca982deb70cdfefb8b422822d4e0234fe4dde6ff2bd9020b26445853917
-F src/sqlite.h.in c7582608c8270428b288a529f4a4170298a19548266b55edaa2e70ce8d607f0e
+F src/sqlite.h.in 5d01afb77c8254d856330b2338326a334de21dd62466edd85269d1b743383fd9
 F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
 F src/sqlite3ext.h 1b7a0ee438bb5c2896d0609c537e917d8057b3340f6ad004d2de44f03e3d3cca
 F src/sqliteInt.h 185abb373dc2a311e3292540ef177ea301d8140b976ecd8ba381a5a0162cd6e9
@@ -2195,8 +2195,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
 F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P 212c68249cc0e8904fc36d8e90646d04604f2b3b9d4c32eaeac7d920fa0fba99
-R 3f8504e826a6815f483ecb886c1e98ae
+P 3a92a53d8cf77822c22618dbf35851a20d27c4a659d23db2d24e7ccb3f61c7fc
+R d1b84334b6d4b2518d0ef54646f93142
 U drh
-Z 6f0fc114d1ec32a0f9ff43ae3bda77ba
+Z d883aa6ff4bade42b94571426eca9fb7
 # Remove this line to create a well-formed Fossil manifest.
index 64dd3404e95a0252dbe6e45b70cbfbe21480d441..dfb59e711d39a0233714b48aba2874deaf403cf0 100644 (file)
@@ -1 +1 @@
-3a92a53d8cf77822c22618dbf35851a20d27c4a659d23db2d24e7ccb3f61c7fc
+c3288f16848866a2c846221c33631785f7b39938078bb95c61895f789395aa1d
index 930c3a18143afbcc7954064a24a247fdb9492479..04dd1137b15de39e52727f90e2d4f65f8e3c6e7e 100644 (file)
@@ -4453,19 +4453,20 @@ int sqlite3_limit(sqlite3*, int id, int newVal);
 ** logs the error.
 **
 ** [[SQLITE_PREPARE_FROM_DDL]] <dt>SQLITE_PREPARE_FROM_DDL</dt>
-** <dd>The SQLITE_PREPARE_FROM_DDL flag causes the SQL compiler to behave as if
-** the SQL statement is part of a database schema. This makes a difference
-** when the [SQLITE_DBCONFIG_TRUSTED_SCHEMA] option is set to off.
-** When this option is used and SQLITE_DBCONFIG_TRUSTED_SCHEMA is off,
-** SQL functions may not be called unless they are tagged with
-** [SQLITE_INNOCUOUS] and virtual tables may not be used unless tagged
-** with [SQLITE_VTAB_INNOCUOUS].  Use the SQLITE_PREPARE_FROM_DDL option
-** when preparing SQL that is derived from parts of the database
-** schema. In particular, virtual table implementations that
-** run SQL statements based on the arguments to their CREATE VIRTUAL
-** TABLE statement should use [sqlite3_prepare_v3()] and set the
-** SQLITE_PREPARE_FROM_DLL flag to prevent bypass of the
-** [SQLITE_DBCONFIG_TRUSTED_SCHEMA] security checks.
+** <dd>The SQLITE_PREPARE_FROM_DDL flag causes the SQL compiler to enforce
+** security constraints that would otherwise only be enforced when parsing
+** the database schema.  In other words, the SQLITE_PREPARE_FROM_DDL flag
+** causes the SQL compiler to treat the SQL statement being prepared as if
+** it had come from an attacker.  When SQLITE_PREPARE_FROM_DLL is used and
+** [SQLITE_DBCONFIG_TRUSTED_SCHEMA] is off, SQL functions may only be called
+** if they are tagged with [SQLITE_INNOCUOUS] and virtual tables may only
+** be used if they are tagged with [SQLITE_VTAB_INNOCUOUS].  Best practice
+** is to use the SQLITE_PREPARE_FROM_DDL option when preparing any SQL that
+** is derived from parts of the database schema. In particular, virtual
+** table implementations that run SQL statements that are derived from
+** arguments to their CREATE VIRTUAL TABLE statement should always use
+** [sqlite3_prepare_v3()] and set the SQLITE_PREPARE_FROM_DLL flag to
+** prevent bypass of the [SQLITE_DBCONFIG_TRUSTED_SCHEMA] security checks.
 ** </dl>
 */
 #define SQLITE_PREPARE_PERSISTENT              0x01