From: drh <> Date: Mon, 22 Dec 2025 17:06:37 +0000 (+0000) Subject: API documentation enhancements. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=766389bd6522d1ee475e0bbc0728fb10aba77f1c;p=thirdparty%2Fsqlite.git API documentation enhancements. FossilOrigin-Name: 99ac94cb9a7a76312cda2d236dcc0c92b2ca269456daed06a1c2674c4f326867 --- diff --git a/manifest b/manifest index 43c3df6b92..cb5bd4a29e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\sSQLITE_PREPARE_FROM_DDL\sflag\sto\ssqlite3_prepare_v3().\sUse\sthis\sto\sprevent\sfts3/4\stables\sin\snon-trusted\sschemas\sfrom\scalling\sunsafe\sSQL\sfunctions. -D 2025-12-22T15:22:02.051 +C API\sdocumentation\senhancements. +D 2025-12-22T17:06:37.974 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -738,7 +738,7 @@ F src/resolve.c 47aa7fdc9ec4c19b103ac5e79d7887d30119b5675309facf5eed1118391c868b F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 85852256d860f3ba5be4a9edc1238e68dbea082a0167f31b7345c821ae45775d F src/shell.c.in c4b775c664c339ac0351549a998b5f8816bf2496af5385e3937050c1fb5688fe -F src/sqlite.h.in ecdd8ee84fe9e30d51433a4cc7951bb0423f588943f5d6f32c6c6ea779662f90 +F src/sqlite.h.in b6599377f02ef9d545a8da48959213928b63291ad83ff65e5f3a72bf4fec595d F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479 F src/sqlite3ext.h 5d5330f5f8461f5ce74960436ddcfa53ecd09c2b8b23901e22ae38aec3243998 F src/sqliteInt.h af67bc95fa6b66cd3c7f3d18d2d040ad386e4cbb02965ee318cc721ee9d5fa45 @@ -2187,8 +2187,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7 F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 403dafc7790a2e8d1772537800760addc47d3e3555bda343c3991d56c1b36e70 -R 7581ed8e32b81aa2384ce190ebdf96b2 -U dan -Z 1915d46eae49cba5052e06a07b4e8b93 +P 26f39ac806a5582fab1497e38a4ce68dad2b79df8c8aade43c4e21eed7576931 +R f6736e5abd17ab7be86d5f3036b5af5b +U drh +Z 0370adbba2f0d4da1290ff5d241c9a94 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 81b7170f2f..5a7c1f71bd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -26f39ac806a5582fab1497e38a4ce68dad2b79df8c8aade43c4e21eed7576931 +99ac94cb9a7a76312cda2d236dcc0c92b2ca269456daed06a1c2674c4f326867 diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 154fddcd56..a161d30b87 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -4435,11 +4435,19 @@ int sqlite3_limit(sqlite3*, int id, int newVal); ** logs the error. ** ** [[SQLITE_PREPARE_FROM_DDL]]
SQLITE_PREPARE_FROM_DDL
-**
The SQLITE_PREPARE_FROM_DDL causes the SQL compiler to behave as if -** the SQL statement was part of a database schema. This only makes a -** difference if the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is set to off. -** This flag may be used by virtual table implementations that do not -** completely control the SQL commands that they evaluate. +**
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. ** */ #define SQLITE_PREPARE_PERSISTENT 0x01 @@ -4460,8 +4468,9 @@ int sqlite3_limit(sqlite3*, int id, int newVal); ** ** The preferred routine to use is [sqlite3_prepare_v2()]. The ** [sqlite3_prepare()] interface is legacy and should be avoided. -** [sqlite3_prepare_v3()] has an extra "prepFlags" option that is used -** for special purposes. +** [sqlite3_prepare_v3()] has an extra +** [SQLITE_PREPARE_FROM_DDL|"prepFlags" option] that is some times +** needed for special purpose or to pass along security restrictions. ** ** The use of the UTF-8 interfaces is preferred, as SQLite currently ** does all parsing using UTF-8. The UTF-16 interfaces are provided