/ Check-in [f9755f81]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New hyperlinks in comments used to generate documentation. No changes to code.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f9755f81b1c0fd29f242dce78a2fba570fa2714d76e93b8563f426a040352513
User & Date: drh 2018-11-12 15:20:44
Context
2018-11-13
19:51
Turn on ASAN for the dbfuzz2 utility. Fix a buffer overread associated with sqlite3_deserialize(). check-in: 4e38f27b user: drh tags: trunk
2018-11-12
15:20
New hyperlinks in comments used to generate documentation. No changes to code. check-in: f9755f81 user: drh tags: trunk
13:20
Fix a use-after-free problem in the fts5vocab virtual table. check-in: ac69d169 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqlite.h.in.

  2013   2013   ** Existing configuration options might be discontinued.  Applications
  2014   2014   ** should check the return code from [sqlite3_db_config()] to make sure that
  2015   2015   ** the call worked.  ^The [sqlite3_db_config()] interface will return a
  2016   2016   ** non-zero [error code] if a discontinued or unsupported configuration option
  2017   2017   ** is invoked.
  2018   2018   **
  2019   2019   ** <dl>
         2020  +** [[SQLITE_DBCONFIG_LOOKASIDE]]
  2020   2021   ** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
  2021   2022   ** <dd> ^This option takes three additional arguments that determine the 
  2022   2023   ** [lookaside memory allocator] configuration for the [database connection].
  2023   2024   ** ^The first argument (the third parameter to [sqlite3_db_config()] is a
  2024   2025   ** pointer to a memory buffer to use for lookaside memory.
  2025   2026   ** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
  2026   2027   ** may be NULL in which case SQLite will allocate the
................................................................................
  2035   2036   ** connection is not currently using lookaside memory, or in other words
  2036   2037   ** when the "current value" returned by
  2037   2038   ** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero.
  2038   2039   ** Any attempt to change the lookaside memory configuration when lookaside
  2039   2040   ** memory is in use leaves the configuration unchanged and returns 
  2040   2041   ** [SQLITE_BUSY].)^</dd>
  2041   2042   **
         2043  +** [[SQLITE_DBCONFIG_ENABLE_FKEY]]
  2042   2044   ** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
  2043   2045   ** <dd> ^This option is used to enable or disable the enforcement of
  2044   2046   ** [foreign key constraints].  There should be two additional arguments.
  2045   2047   ** The first argument is an integer which is 0 to disable FK enforcement,
  2046   2048   ** positive to enable FK enforcement or negative to leave FK enforcement
  2047   2049   ** unchanged.  The second parameter is a pointer to an integer into which
  2048   2050   ** is written 0 or 1 to indicate whether FK enforcement is off or on
  2049   2051   ** following this call.  The second parameter may be a NULL pointer, in
  2050   2052   ** which case the FK enforcement setting is not reported back. </dd>
  2051   2053   **
         2054  +** [[SQLITE_DBCONFIG_ENABLE_TRIGGER]]
  2052   2055   ** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>
  2053   2056   ** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].
  2054   2057   ** There should be two additional arguments.
  2055   2058   ** The first argument is an integer which is 0 to disable triggers,
  2056   2059   ** positive to enable triggers or negative to leave the setting unchanged.
  2057   2060   ** The second parameter is a pointer to an integer into which
  2058   2061   ** is written 0 or 1 to indicate whether triggers are disabled or enabled
  2059   2062   ** following this call.  The second parameter may be a NULL pointer, in
  2060   2063   ** which case the trigger setting is not reported back. </dd>
  2061   2064   **
         2065  +** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
  2062   2066   ** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
  2063   2067   ** <dd> ^This option is used to enable or disable the two-argument
  2064   2068   ** version of the [fts3_tokenizer()] function which is part of the
  2065   2069   ** [FTS3] full-text search engine extension.
  2066   2070   ** There should be two additional arguments.
  2067   2071   ** The first argument is an integer which is 0 to disable fts3_tokenizer() or
  2068   2072   ** positive to enable fts3_tokenizer() or negative to leave the setting
  2069   2073   ** unchanged.
  2070   2074   ** The second parameter is a pointer to an integer into which
  2071   2075   ** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
  2072   2076   ** following this call.  The second parameter may be a NULL pointer, in
  2073   2077   ** which case the new setting is not reported back. </dd>
  2074   2078   **
         2079  +** [[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION]]
  2075   2080   ** <dt>SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</dt>
  2076   2081   ** <dd> ^This option is used to enable or disable the [sqlite3_load_extension()]
  2077   2082   ** interface independently of the [load_extension()] SQL function.
  2078   2083   ** The [sqlite3_enable_load_extension()] API enables or disables both the
  2079   2084   ** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
  2080   2085   ** There should be two additional arguments.
  2081   2086   ** When the first argument to this interface is 1, then only the C-API is
................................................................................
  2085   2090   ** C-API or the SQL function.
  2086   2091   ** The second parameter is a pointer to an integer into which
  2087   2092   ** is written 0 or 1 to indicate whether [sqlite3_load_extension()] interface
  2088   2093   ** is disabled or enabled following this call.  The second parameter may
  2089   2094   ** be a NULL pointer, in which case the new setting is not reported back.
  2090   2095   ** </dd>
  2091   2096   **
  2092         -** <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
         2097  +** [[SQLITE_DBCONFIG_MAINDBNAME]] <dt>SQLITE_DBCONFIG_MAINDBNAME</dt>
  2093   2098   ** <dd> ^This option is used to change the name of the "main" database
  2094   2099   ** schema.  ^The sole argument is a pointer to a constant UTF8 string
  2095   2100   ** which will become the new schema name in place of "main".  ^SQLite
  2096   2101   ** does not make a copy of the new main schema name string, so the application
  2097   2102   ** must ensure that the argument passed into this DBCONFIG option is unchanged
  2098   2103   ** until after the database connection closes.
  2099   2104   ** </dd>
  2100   2105   **
         2106  +** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]] 
  2101   2107   ** <dt>SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</dt>
  2102   2108   ** <dd> Usually, when a database in wal mode is closed or detached from a 
  2103   2109   ** database handle, SQLite checks if this will mean that there are now no 
  2104   2110   ** connections at all to the database. If so, it performs a checkpoint 
  2105   2111   ** operation before closing the connection. This option may be used to
  2106   2112   ** override this behaviour. The first parameter passed to this operation
  2107   2113   ** is an integer - positive to disable checkpoints-on-close, or zero (the
  2108   2114   ** default) to enable them, and negative to leave the setting unchanged.
  2109   2115   ** The second parameter is a pointer to an integer
  2110   2116   ** into which is written 0 or 1 to indicate whether checkpoints-on-close
  2111   2117   ** have been disabled - 0 if they are not disabled, 1 if they are.
  2112   2118   ** </dd>
  2113   2119   **
  2114         -** <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
         2120  +** [[SQLITE_DBCONFIG_ENABLE_QPSG]] <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
  2115   2121   ** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
  2116   2122   ** the [query planner stability guarantee] (QPSG).  When the QPSG is active,
  2117   2123   ** a single SQL query statement will always use the same algorithm regardless
  2118   2124   ** of values of [bound parameters].)^ The QPSG disables some query optimizations
  2119   2125   ** that look at the values of bound parameters, which can make some queries
  2120   2126   ** slower.  But the QPSG has the advantage of more predictable behavior.  With
  2121   2127   ** the QPSG active, SQLite will always use the same query plan in the field as
................................................................................
  2123   2129   ** The first argument to this setting is an integer which is 0 to disable 
  2124   2130   ** the QPSG, positive to enable QPSG, or negative to leave the setting
  2125   2131   ** unchanged. The second parameter is a pointer to an integer into which
  2126   2132   ** is written 0 or 1 to indicate whether the QPSG is disabled or enabled
  2127   2133   ** following this call.
  2128   2134   ** </dd>
  2129   2135   **
  2130         -** <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
         2136  +** [[SQLITE_DBCONFIG_TRIGGER_EQP]] <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
  2131   2137   ** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not 
  2132   2138   ** include output for any operations performed by trigger programs. This
  2133   2139   ** option is used to set or clear (the default) a flag that governs this
  2134   2140   ** behavior. The first parameter passed to this operation is an integer -
  2135   2141   ** positive to enable output for trigger programs, or zero to disable it,
  2136   2142   ** or negative to leave the setting unchanged.
  2137   2143   ** The second parameter is a pointer to an integer into which is written 
  2138   2144   ** 0 or 1 to indicate whether output-for-triggers has been disabled - 0 if 
  2139   2145   ** it is not disabled, 1 if it is.  
  2140   2146   ** </dd>
  2141   2147   **
  2142         -** <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt>
         2148  +** [[SQLITE_DBCONFIG_RESET_DATABASE]] <dt>SQLITE_DBCONFIG_RESET_DATABASE</dt>
  2143   2149   ** <dd> Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run
  2144   2150   ** [VACUUM] in order to reset a database back to an empty database
  2145   2151   ** with no schema and no content. The following process works even for
  2146   2152   ** a badly corrupted database file:
  2147   2153   ** <ol>
  2148   2154   ** <li> If the database connection is newly opened, make sure it has read the
  2149   2155   **      database schema by preparing then discarding some query against the
................................................................................
  2155   2161   ** <li> [sqlite3_exec](db, "[VACUUM]", 0, 0, 0);
  2156   2162   ** <li> sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0);
  2157   2163   ** </ol>
  2158   2164   ** Because resetting a database is destructive and irreversible, the
  2159   2165   ** process requires the use of this obscure API and multiple steps to help
  2160   2166   ** ensure that it does not happen by accident.
  2161   2167   **
  2162         -** <dt>SQLITE_DBCONFIG_DEFENSIVE</dt>
         2168  +** [[SQLITE_DBCONFIG_DEFENSIVE]] <dt>SQLITE_DBCONFIG_DEFENSIVE</dt>
  2163   2169   ** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the
  2164   2170   ** "defensive" flag for a database connection.  When the defensive
  2165   2171   ** flag is enabled, language features that allow ordinary SQL to 
  2166   2172   ** deliberately corrupt the database file are disabled.  The disabled
  2167   2173   ** features include but are not limited to the following:
  2168   2174   ** <ul>
  2169   2175   ** <li> The [PRAGMA writable_schema=ON] statement.
  2170   2176   ** <li> Writes to the [sqlite_dbpage] virtual table.
  2171         -** <li> Direct writes to shadow tables.
         2177  +** <li> Direct writes to [shadow tables].
  2172   2178   ** </ul>
  2173   2179   ** </dd>
  2174   2180   ** </dl>
  2175   2181   */
  2176   2182   #define SQLITE_DBCONFIG_MAINDBNAME            1000 /* const char* */
  2177   2183   #define SQLITE_DBCONFIG_LOOKASIDE             1001 /* void* int int */
  2178   2184   #define SQLITE_DBCONFIG_ENABLE_FKEY           1002 /* int int* */
................................................................................
  8644   8650   ** CAPI3REF: Virtual Table Configuration Options
  8645   8651   **
  8646   8652   ** These macros define the various options to the
  8647   8653   ** [sqlite3_vtab_config()] interface that [virtual table] implementations
  8648   8654   ** can use to customize and optimize their behavior.
  8649   8655   **
  8650   8656   ** <dl>
         8657  +** [[SQLITE_VTAB_CONSTRAINT_SUPPORT]]
  8651   8658   ** <dt>SQLITE_VTAB_CONSTRAINT_SUPPORT
  8652   8659   ** <dd>Calls of the form
  8653   8660   ** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported,
  8654   8661   ** where X is an integer.  If X is zero, then the [virtual table] whose
  8655   8662   ** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not
  8656   8663   ** support constraints.  In this configuration (which is the default) if
  8657   8664   ** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire