Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
c_dbconfig_defensive.html

Index Summary Markup Original


R-42790-23372-13524-47335-35146-00064-12684-28505 tcl slt th3 src

The sqlite3_db_config() interface will return a non-zero error code if a discontinued or unsupported configuration option is invoked.

src/main.c:959   th3/req1/dbconfig01.test:16

/* IMP: R-42790-23372 */
# EVIDENCE-OF: R-42790-23372 The sqlite3_db_config() interface will
# return a non-zero error code if a discontinued or unsupported
# configuration option is invoked.

R-19648-30943-40070-65065-35301-05411-03146-42916 tcl slt th3 src

This option takes three additional arguments that determine the lookaside memory allocator configuration for the database connection.

th3/req1/dbconfig01.test:38

/* IMP: R-19648-30943 */
# EVIDENCE-OF: R-19648-30943 This option takes three additional
# arguments that determine the lookaside memory allocator configuration
# for the database connection.

R-26835-10964-22323-42888-35777-38355-20607-28933 tcl slt th3 src

The first argument (the third parameter to sqlite3_db_config() is a pointer to a memory buffer to use for lookaside memory.

src/main.c:929   th3/req1/dbconfig01.test:82

/* IMP: R-26835-10964 */
# EVIDENCE-OF: R-26835-10964 The first argument (the third parameter to
# sqlite3_db_config() is a pointer to a memory buffer to use for
# lookaside memory.

R-61949-35727-14867-12999-21207-20215-20581-25391 tcl slt th3 src

The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb may be NULL in which case SQLite will allocate the lookaside buffer itself using sqlite3_malloc().

src/main.c:775   th3/req1/dbconfig01.test:42

/* IMP: R-61949-35727 */
# EVIDENCE-OF: R-61949-35727 The first argument after the
# SQLITE_DBCONFIG_LOOKASIDE verb may be NULL in which case SQLite will
# allocate the lookaside buffer itself using sqlite3_malloc().

R-47871-25994-62051-30257-22396-55190-62622-00222 tcl slt th3 src

The second argument is the size of each lookaside buffer slot.

src/main.c:930   th3/req1/dbconfig01.test:46

/* IMP: R-47871-25994 */
# EVIDENCE-OF: R-47871-25994 The second argument is the size of each
# lookaside buffer slot.

R-04460-53386-37328-50072-27408-53032-10915-39219 tcl slt th3 src

The third argument is the number of slots.

src/main.c:931   th3/req1/dbconfig01.test:49

/* IMP: R-04460-53386 */
# EVIDENCE-OF: R-04460-53386 The third argument is the number of slots.

R-33038-09382-52096-22256-12094-15064-07280-37767 tcl slt th3 src

If the second argument to SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally rounded down to the next smaller multiple of 8.

src/main.c:767

/* IMP: R-33038-09382 */
# EVIDENCE-OF: R-33038-09382 If the second argument to
# SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
# rounded down to the next smaller multiple of 8.

R-31654-04982-40216-33443-53639-14182-01361-16747 tcl slt th3 src

The lookaside memory configuration for a database connection can only be changed when that connection is not currently using lookaside memory, or in other words when the "current value" returned by sqlite3_db_status(D,SQLITE_DBSTATUS_LOOKASIDE_USED,...) is zero. Any attempt to change the lookaside memory configuration when lookaside memory is in use leaves the configuration unchanged and returns SQLITE_BUSY.

th3/req1/dbconfig01.test:102

/* IMP: R-31654-04982 */
# EVIDENCE-OF: R-31654-04982 The lookaside memory configuration for a
# database connection can only be changed when that connection is not
# currently using lookaside memory, or in other words when the "current
# value" returned by
# sqlite3_db_status(D,SQLITE_DBSTATUS_LOOKASIDE_USED,...) is zero. Any
# attempt to change the lookaside memory configuration when lookaside
# memory is in use leaves the configuration unchanged and returns
# SQLITE_BUSY.

R-25136-65062-60246-57323-36202-59774-22241-57010 tcl slt th3 src

This option is used to enable or disable the enforcement of foreign key constraints.

th3/cov1/main34.test:12

/* IMP: R-25136-65062 */
# EVIDENCE-OF: R-25136-65062 This option is used to enable or disable
# the enforcement of foreign key constraints.

R-02005-53466-64191-45009-56070-04146-49679-01840 tcl slt th3 src

This option is used to enable or disable triggers.

th3/cov1/main34.test:15

/* IMP: R-02005-53466 */
# EVIDENCE-OF: R-02005-53466 This option is used to enable or disable
# triggers.

R-56352-62404-53777-34179-15915-63338-07108-44476 tcl slt th3 src

However, since SQLite version 3.35.0, TEMP triggers are still allowed even if this option is off. So, in other words, this option now only disables triggers in the main database schema or in the schemas of ATTACH-ed databases.

/* IMP: R-56352-62404 */
# EVIDENCE-OF: R-56352-62404 However, since SQLite version 3.35.0, TEMP
# triggers are still allowed even if this option is off. So, in other
# words, this option now only disables triggers in the main database
# schema or in the schemas of ATTACH-ed databases.

R-12600-09115-43578-46772-34145-03685-53603-16884 tcl slt th3 src

This option is used to enable or disable views.

th3/cov1/view02.test:26

/* IMP: R-12600-09115 */
# EVIDENCE-OF: R-12600-09115 This option is used to enable or disable
# views.

R-46130-13641-40955-08660-38234-32467-56742-20127 tcl slt th3 src

However, since SQLite version 3.35.0, TEMP views are still allowed even if this option is off. So, in other words, this option now only disables views in the main database schema or in the schemas of ATTACH-ed databases.

th3/cov1/view02.test:33

/* IMP: R-46130-13641 */
# EVIDENCE-OF: R-46130-13641 However, since SQLite version 3.35.0, TEMP
# views are still allowed even if this option is off. So, in other
# words, this option now only disables views in the main database schema
# or in the schemas of ATTACH-ed databases.

R-48254-42943-07993-04131-52492-34370-46050-41806 tcl slt th3 src

This option is used to enable or disable the fts3_tokenizer() function which is part of the FTS3 full-text search engine extension.

/* IMP: R-48254-42943 */
# EVIDENCE-OF: R-48254-42943 This option is used to enable or disable
# the fts3_tokenizer() function which is part of the FTS3 full-text
# search engine extension.

R-27882-15425-11851-57208-29860-19997-13242-33591 tcl slt th3 src

This option is used to enable or disable the sqlite3_load_extension() interface independently of the load_extension() SQL function.

/* IMP: R-27882-15425 */
# EVIDENCE-OF: R-27882-15425 This option is used to enable or disable
# the sqlite3_load_extension() interface independently of the
# load_extension() SQL function.

R-06824-28531-04860-08794-38432-46623-19840-41642 tcl slt th3 src

This option is used to change the name of the "main" database schema.

src/main.c:922   th3/cov1/maindbname01.test:36

/* IMP: R-06824-28531 */
# EVIDENCE-OF: R-06824-28531 This option is used to change the name of
# the "main" database schema.

R-34937-45675-11260-35059-56178-30979-30227-02001 tcl slt th3 src

The sole argument is a pointer to a constant UTF8 string which will become the new schema name in place of "main".

th3/cov1/maindbname01.test:39

/* IMP: R-34937-45675 */
# EVIDENCE-OF: R-34937-45675 The sole argument is a pointer to a
# constant UTF8 string which will become the new schema name in place of
# "main".

R-36257-52125-15338-28227-38982-51329-51201-58164 tcl slt th3 src

SQLite does not make a copy of the new main schema name string, so the application must ensure that the argument passed into this DBCONFIG option is unchanged until after the database connection closes.

src/main.c:923   th3/cov1/maindbname01.test:43

/* IMP: R-36257-52125 */
# EVIDENCE-OF: R-36257-52125 SQLite does not make a copy of the new main
# schema name string, so the application must ensure that the argument
# passed into this DBCONFIG option is unchanged until after the database
# connection closes.

R-40979-20331-65132-35120-47137-32709-07069-35596 tcl slt th3 src

The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates the query planner stability guarantee (QPSG). When the QPSG is active, a single SQL query statement will always use the same algorithm regardless of values of bound parameters.

th3/cov1/qpsg01.test:10   th3/cov1/qpsg02.test:11

/* IMP: R-40979-20331 */
# EVIDENCE-OF: R-40979-20331 The SQLITE_DBCONFIG_ENABLE_QPSG option
# activates or deactivates the query planner stability guarantee (QPSG).
# When the QPSG is active, a single SQL query statement will always use
# the same algorithm regardless of values of bound parameters.