*** DRAFT ***

SQLite Requirement Matrix Details
pragma.html

Index Summary Markup Original


R-43042-22504-56439-09446-23422-01554-61314-54021 tcl slt th3 src

No error messages are generated if an unknown pragma is issued.

src/pragma.c:472   th3/req1/pragma03.test:10

/* IMP: R-43042-22504 */
# EVIDENCE-OF: R-43042-22504 No error messages are generated if an
# unknown pragma is issued.

R-64781-29425-02417-13736-38225-42517-23683-29387 tcl slt th3 src

Some pragmas take effect during the SQL compilation stage, not the execution stage.

th3/req1/pragma06.test:12

/* IMP: R-64781-29425 */
# EVIDENCE-OF: R-64781-29425 Some pragmas take effect during the SQL
# compilation stage, not the execution stage.

R-42415-59396-18993-18875-54415-33588-07688-24488 tcl slt th3 src

Or the pragma might run during sqlite3_step() just like normal SQL statements.

th3/req1/pragma06.test:25

/* IMP: R-42415-59396 */
# EVIDENCE-OF: R-42415-59396 Or the pragma might run during
# sqlite3_step() just like normal SQL statements.

R-64973-09381-20072-06844-08666-32916-49559-16306 tcl slt th3 src

A pragma can take either zero or one argument.

th3/req1/pragma01.test:16

/* IMP: R-64973-09381 */
# EVIDENCE-OF: R-64973-09381 A pragma can take either zero or one
# argument.

R-60831-05341-23362-01720-38236-12013-65294-04816 tcl slt th3 src

The argument is may be either in parentheses or it may be separated from the pragma name by an equal sign.

th3/req1/pragma01.test:19

/* IMP: R-60831-05341 */
# EVIDENCE-OF: R-60831-05341 The argument is may be either in
# parentheses or it may be separated from the pragma name by an equal
# sign.

R-04709-28430-14842-03600-36278-03324-37525-06420 tcl slt th3 src

The two syntaxes yield identical results.

th3/req1/pragma01.test:23

/* IMP: R-04709-28430 */
# EVIDENCE-OF: R-04709-28430 The two syntaxes yield identical results.

R-36822-49898-51267-28801-22242-39926-43860-26511 tcl slt th3 src

In many pragmas, the argument is a boolean. The boolean can be one of:

1 yes true on
0 no false off

th3/req1/pragma01.test:49

/* IMP: R-36822-49898 */
# EVIDENCE-OF: R-36822-49898 In many pragmas, the argument is a boolean.
# The boolean can be one of: 1 yes true on0 no false off

R-15737-42560-39966-60421-02348-13704-23907-48839 tcl slt th3 src

Keyword arguments can optionally appear in quotes.

th3/req1/pragma01.test:52

/* IMP: R-15737-42560 */
# EVIDENCE-OF: R-15737-42560 Keyword arguments can optionally appear in
# quotes.

R-63043-31985-03147-25743-35105-56824-27105-53861 tcl slt th3 src

A pragma may have an optional schema-name before the pragma name.

th3/req1/pragma01.test:89

/* IMP: R-63043-31985 */
# EVIDENCE-OF: R-63043-31985 A pragma may have an optional schema-name
# before the pragma name.

R-46762-41357-02891-26535-53181-26230-38926-40574 tcl slt th3 src

The schema-name is the name of an ATTACH-ed database or "main" or "temp" for the main and the TEMP databases.

th3/req1/pragma01.test:92

/* IMP: R-46762-41357 */
# EVIDENCE-OF: R-46762-41357 The schema-name is the name of an ATTACH-ed
# database or "main" or "temp" for the main and the TEMP databases.

R-45642-41863-02575-26055-57853-43447-11909-01929 tcl slt th3 src

If the optional schema name is omitted, "main" is assumed.

th3/req1/pragma01.test:95

/* IMP: R-45642-41863 */
# EVIDENCE-OF: R-45642-41863 If the optional schema name is omitted,
# "main" is assumed.

R-37137-45553-37587-45054-45881-44464-34262-16786 tcl slt th3 src

In some pragmas, the schema name is meaningless and is simply ignored.

th3/req1/pragma01.test:119

/* IMP: R-37137-45553 */
# EVIDENCE-OF: R-37137-45553 In some pragmas, the schema name is
# meaningless and is simply ignored.

R-26022-39063-15323-00044-24129-45502-60784-59294 tcl slt th3 src

PRAGMA analysis_limit;
PRAGMA analysis_limit =
N;

th3/cov1/analyze18.test:9

/* IMP: R-26022-39063 */
# EVIDENCE-OF: R-26022-39063 PRAGMA analysis_limit; PRAGMA
# analysis_limit = N;

R-27308-47543-55805-42661-24314-07406-38480-42723 tcl slt th3 src

Query or change a limit on the approximate ANALYZE setting. This is the approximate number of rows examined in each index by the ANALYZE command.

th3/cov1/analyze18.test:13

/* IMP: R-27308-47543 */
# EVIDENCE-OF: R-27308-47543 Query or change a limit on the approximate
# ANALYZE setting. This is the approximate number of rows examined in
# each index by the ANALYZE command.

R-55089-42193-42390-08039-05012-03378-63784-16707 tcl slt th3 src

If the argument N is omitted, then the analysis limit is unchanged.

/* IMP: R-55089-42193 */
# EVIDENCE-OF: R-55089-42193 If the argument N is omitted, then the
# analysis limit is unchanged.

R-64444-28602-34432-27879-08826-07495-40207-13752 tcl slt th3 src

If the limit is zero, then the analysis limit is disabled and the ANALYZE command will examine all rows of each index.

th3/cov1/analyze18.test:105

/* IMP: R-64444-28602 */
# EVIDENCE-OF: R-64444-28602 If the limit is zero, then the analysis
# limit is disabled and the ANALYZE command will examine all rows of
# each index.

R-42714-29052-62793-36764-55594-49553-21277-61265 tcl slt th3 src

If N is greater than zero, then the analysis limit is set to N and subsequent ANALYZE commands will stop analyzing each index after it has examined approximately N rows.

th3/cov1/analyze18.test:74

/* IMP: R-42714-29052 */
# EVIDENCE-OF: R-42714-29052 If N is greater than zero, then the
# analysis limit is set to N and subsequent ANALYZE commands will stop
# analyzing each index after it has examined approximately N rows.

R-40975-20399-26495-18141-01831-14670-61544-00270 tcl slt th3 src

If N is a negative number or something other than an integer value, then the pragma behaves as if the N argument was omitted.

src/pragma.c:2503   th3/cov1/analyze18.test:38

/* IMP: R-40975-20399 */
# EVIDENCE-OF: R-40975-20399 If N is a negative number or something
# other than an integer value, then the pragma behaves as if the N
# argument was omitted.

R-57594-65522-56996-47204-62238-07875-00187-41859 tcl slt th3 src

In all cases, the value returned is the new analysis limit used for subsequent ANALYZE commands.

src/pragma.c:2508

/* IMP: R-57594-65522 */
# EVIDENCE-OF: R-57594-65522 In all cases, the value returned is the new
# analysis limit used for subsequent ANALYZE commands.

R-42924-00638-21387-26968-40165-13268-56405-46606 tcl slt th3 src

The current implementation only uses the lower 31 bits of the N value - higher order bits are silently ignored. Future versions of SQLite might begin using higher order bits.

th3/cov1/analyze18.test:27

/* IMP: R-42924-00638 */
# EVIDENCE-OF: R-42924-00638 The current implementation only uses the
# lower 31 bits of the N value - higher order bits are silently ignored.
# Future versions of SQLite might begin using higher order bits.

R-60755-45226-57184-35002-64218-27799-00922-32350 tcl slt th3 src

The application_id PRAGMA is used to query or set the 32-bit signed big-endian "Application ID" integer located at offset 68 into the database header.

th3/cov1/pragma20.test:169

/* IMP: R-60755-45226 */
# EVIDENCE-OF: R-60755-45226 The application_id PRAGMA is used to query
# or set the 32-bit signed big-endian "Application ID" integer located
# at offset 68 into the database header.

R-50578-26484-60015-06758-51752-02916-33934-51751 tcl slt th3 src

The default setting for auto-vacuum is 0 or "none", unless the SQLITE_DEFAULT_AUTOVACUUM compile-time option is used.

th3/req1/pragma07.test:11

/* IMP: R-50578-26484 */
# EVIDENCE-OF: R-50578-26484 The default setting for auto-vacuum is 0 or
# "none", unless the SQLITE_DEFAULT_AUTOVACUUM compile-time option is
# used.

R-11896-08162-39829-09724-10165-05972-28450-60411 tcl slt th3 src

The "none" setting means that auto-vacuum is disabled.

th3/req1/pragma07.test:24

/* IMP: R-11896-08162 */
# EVIDENCE-OF: R-11896-08162 The "none" setting means that auto-vacuum
# is disabled.

R-12526-56546-27211-20254-24569-61288-04911-18504 tcl slt th3 src

When auto-vacuum is disabled and data is deleted data from a database, the database file remains the same size.

th3/req1/pragma07.test:27

/* IMP: R-12526-56546 */
# EVIDENCE-OF: R-12526-56546 When auto-vacuum is disabled and data is
# deleted data from a database, the database file remains the same size.

R-64629-22390-19344-37404-07828-61811-57666-02667 tcl slt th3 src

Unused database file pages are added to a "freelist" and reused for subsequent inserts.

th3/req1/pragma07.test:30

/* IMP: R-64629-22390 */
# EVIDENCE-OF: R-64629-22390 Unused database file pages are added to a
# "freelist" and reused for subsequent inserts.

R-43482-09713-62461-41415-00231-20987-55224-61145 tcl slt th3 src

In this mode the VACUUM command can be used to rebuild the entire database file and thus reclaim unused disk space.

th3/req1/pragma07.test:51

/* IMP: R-43482-09713 */
# EVIDENCE-OF: R-43482-09713 In this mode the VACUUM command can be used
# to rebuild the entire database file and thus reclaim unused disk
# space.

R-18500-08619-10931-07451-20568-56201-09385-55546 tcl slt th3 src

When the auto-vacuum mode is 1 or "full", the freelist pages are moved to the end of the database file and the database file is truncated to remove the freelist pages at every transaction commit.

th3/req1/pragma07.test:66

/* IMP: R-18500-08619 */
# EVIDENCE-OF: R-18500-08619 When the auto-vacuum mode is 1 or "full",
# the freelist pages are moved to the end of the database file and the
# database file is truncated to remove the freelist pages at every
# transaction commit.

R-57803-30267-35390-49714-00774-40493-44920-28706 tcl slt th3 src

Note, however, that auto-vacuum only truncates the freelist pages from the file. Auto-vacuum does not defragment the database nor repack individual database pages the way that the VACUUM command does.

th3/req1/pragma07.test:88

/* IMP: R-57803-30267 */
# EVIDENCE-OF: R-57803-30267 Note, however, that auto-vacuum only
# truncates the freelist pages from the file. Auto-vacuum does not
# defragment the database nor repack individual database pages the way
# that the VACUUM command does.

R-40212-32858-03884-52961-15925-53384-61113-63305 tcl slt th3 src

Therefore, auto-vacuuming must be turned on before any tables are created.

th3/req1/pragma07.test:118

/* IMP: R-40212-32858 */
# EVIDENCE-OF: R-40212-32858 Therefore, auto-vacuuming must be turned on
# before any tables are created.

R-24519-28304-27679-62184-02249-08056-49023-13978 tcl slt th3 src

When the value of auto-vacuum is 2 or "incremental" then the additional information needed to do auto-vacuuming is stored in the database file but auto-vacuuming does not occur automatically at each commit as it does with auto_vacuum=full.

th3/req1/pragma07.test:131

/* IMP: R-24519-28304 */
# EVIDENCE-OF: R-24519-28304 When the value of auto-vacuum is 2 or
# "incremental" then the additional information needed to do
# auto-vacuuming is stored in the database file but auto-vacuuming does
# not occur automatically at each commit as it does with
# auto_vacuum=full.

R-15909-61171-23810-45611-13574-21954-09176-43834 tcl slt th3 src

In incremental mode, the separate incremental_vacuum pragma must be invoked to cause the auto-vacuum to occur.

th3/req1/pragma07.test:137

/* IMP: R-15909-61171 */
# EVIDENCE-OF: R-15909-61171 In incremental mode, the separate
# incremental_vacuum pragma must be invoked to cause the auto-vacuum to
# occur.

R-25616-61116-19772-20982-08386-58484-18398-18419 tcl slt th3 src

The database connection can be changed between full and incremental autovacuum mode at any time.

th3/req1/pragma07.test:159

/* IMP: R-25616-61116 */
# EVIDENCE-OF: R-25616-61116 The database connection can be changed
# between full and incremental autovacuum mode at any time.

R-03934-63400-35021-15759-28695-34964-02248-59433 tcl slt th3 src

However, changing from "none" to "full" or "incremental" can only occur when the database is new (no tables have yet been created) or by running the VACUUM command.

th3/req1/pragma07.test:179

/* IMP: R-03934-63400 */
# EVIDENCE-OF: R-03934-63400 However, changing from "none" to "full" or
# "incremental" can only occur when the database is new (no tables have
# yet been created) or by running the VACUUM command.

R-03040-34580-06414-61878-61161-08528-60209-55771 tcl slt th3 src

To change auto-vacuum modes, first use the auto_vacuum pragma to set the new desired mode, then invoke the VACUUM command to reorganize the entire database file.

th3/req1/pragma07.test:183

/* IMP: R-03040-34580 */
# EVIDENCE-OF: R-03040-34580 To change auto-vacuum modes, first use the
# auto_vacuum pragma to set the new desired mode, then invoke the VACUUM
# command to reorganize the entire database file.

R-62740-39384-05078-12157-18759-37018-24032-16854 tcl slt th3 src

To change from "full" or "incremental" back to "none" always requires running VACUUM even on an empty database.

th3/req1/pragma07.test:216

/* IMP: R-62740-39384 */
# EVIDENCE-OF: R-62740-39384 To change from "full" or "incremental" back
# to "none" always requires running VACUUM even on an empty database.

R-48932-13175-31748-44734-45646-26291-63323-36256 tcl slt th3 src

When the auto_vacuum pragma is invoked with no arguments, it returns the current auto_vacuum mode.

th3/req1/pragma07.test:219

/* IMP: R-48932-13175 */
# EVIDENCE-OF: R-48932-13175 When the auto_vacuum pragma is invoked with
# no arguments, it returns the current auto_vacuum mode.

R-34271-33106-55360-31605-05941-37144-32278-15012 tcl slt th3 src

PRAGMA automatic_index;
PRAGMA automatic_index =
boolean;

Query, set, or clear the automatic indexing capability.

tcl/autoindex1.test:14   th3/req1/pragma08.test:9

/* IMP: R-34271-33106 */
# EVIDENCE-OF: R-34271-33106 PRAGMA automatic_index; PRAGMA
# automatic_index = boolean; Query, set, or clear the automatic indexing
# capability.

R-23579-05241-28343-33967-00321-51471-16387-08197 tcl slt th3 src

PRAGMA busy_timeout;
PRAGMA busy_timeout =
milliseconds;

Query or change the setting of the busy timeout.

tcl/lock.test:244   th3/cov1/main21.test:76

/* IMP: R-23579-05241 */
# EVIDENCE-OF: R-23579-05241 PRAGMA busy_timeout; PRAGMA busy_timeout =
# milliseconds; Query or change the setting of the busy timeout.

R-13861-56665-11866-23865-35263-00368-63176-40609 tcl slt th3 src

PRAGMA schema.cache_size;
PRAGMA
schema.cache_size = pages;
PRAGMA
schema.cache_size = -kibibytes;

Query or change the suggested maximum number of database disk pages that SQLite will hold in memory at once per open database file.

tcl/pragma.test:86   th3/req1/pragma09.test:9

/* IMP: R-13861-56665 */
# EVIDENCE-OF: R-13861-56665 PRAGMA schema.cache_size; PRAGMA
# schema.cache_size = pages; PRAGMA schema.cache_size = -kibibytes;
# Query or change the suggested maximum number of database disk pages
# that SQLite will hold in memory at once per open database file.

R-30185-15359-41231-64088-51727-20362-49126-10873 tcl slt th3 src

The default suggested cache size is -2000, which means the cache size is limited to 2048000 bytes of memory.

src/sqliteLimit.h:100   th3/req1/pragma09.test:14

/* IMP: R-30185-15359 */
# EVIDENCE-OF: R-30185-15359 The default suggested cache size is -2000,
# which means the cache size is limited to 2048000 bytes of memory.

R-48205-43578-08481-37323-43342-53439-37471-23722 tcl slt th3 src

The default suggested cache size can be altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options.

src/sqliteLimit.h:102

/* IMP: R-48205-43578 */
# EVIDENCE-OF: R-48205-43578 The default suggested cache size can be
# altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options.

R-27461-16942-46149-61363-05307-36708-49016-10103 tcl slt th3 src

The TEMP database has a default suggested cache size of 0 pages.

th3/req1/pragma09.test:41

/* IMP: R-27461-16942 */
# EVIDENCE-OF: R-27461-16942 The TEMP database has a default suggested
# cache size of 0 pages.

R-42059-47211-64082-08084-07412-31027-38938-26624 tcl slt th3 src

If the argument N is positive then the suggested cache size is set to N.

src/pcache.c:266   tcl/pragma.test:102

/* IMP: R-42059-47211 */
# EVIDENCE-OF: R-42059-47211 If the argument N is positive then the
# suggested cache size is set to N.

R-59858-46238-55910-38218-36749-39219-09135-02336 tcl slt th3 src

If the argument N is negative, then the number of cache pages is adjusted to be a number of pages that would use approximately abs(N*1024) bytes of memory based on the current page size.

/* IMP: R-59858-46238 */
# EVIDENCE-OF: R-59858-46238 If the argument N is negative, then the
# number of cache pages is adjusted to be a number of pages that would
# use approximately abs(N*1024) bytes of memory based on the current
# page size.

R-41134-27890-19387-23998-27179-40954-57167-14106 tcl slt th3 src

When you change the cache size using the cache_size pragma, the change only endures for the current session.

th3/req1/pragma09.test:50

/* IMP: R-41134-27890 */
# EVIDENCE-OF: R-41134-27890 When you change the cache size using the
# cache_size pragma, the change only endures for the current session.

R-48331-62427-58525-15123-43794-40933-40016-08024 tcl slt th3 src

The cache size reverts to the default value when the database is closed and reopened.

th3/req1/pragma09.test:53

/* IMP: R-48331-62427 */
# EVIDENCE-OF: R-48331-62427 The cache size reverts to the default value
# when the database is closed and reopened.

R-63549-59887-30432-35575-09108-37055-29466-09817 tcl slt th3 src

PRAGMA cache_spill;
PRAGMA cache_spill=
boolean;
PRAGMA
schema.cache_spill=N;

tcl/pragma2.test:128

/* IMP: R-63549-59887 */
# EVIDENCE-OF: R-63549-59887 PRAGMA cache_spill; PRAGMA
# cache_spill=boolean; PRAGMA schema.cache_spill=N;

R-07634-40532-31370-54179-45276-35620-20661-11259 tcl slt th3 src

The cache_spill pragma enables or disables the ability of the pager to spill dirty cache pages to the database file in the middle of a transaction.

tcl/pragma2.test:172

/* IMP: R-07634-40532 */
# EVIDENCE-OF: R-07634-40532 The cache_spill pragma enables or disables
# the ability of the pager to spill dirty cache pages to the database
# file in the middle of a transaction.

R-23955-02765-61832-08091-33535-52671-43903-30817 tcl slt th3 src

Cache_spill is enabled by default

tcl/pragma2.test:131

/* IMP: R-23955-02765 */
# EVIDENCE-OF: R-23955-02765 Cache_spill is enabled by default

R-34657-61226-12617-43692-19153-03581-17665-29840 tcl slt th3 src

The "PRAGMA cache_spill=N" form of this pragma sets a minimum cache size threshold required for spilling to occur.

tcl/pragma2.test:195

/* IMP: R-34657-61226 */
# EVIDENCE-OF: R-34657-61226 The "PRAGMA cache_spill=N" form of this
# pragma sets a minimum cache size threshold required for spilling to
# occur.

R-30164-60316-40156-60446-50221-53227-39726-53106 tcl slt th3 src

The number of pages in cache must exceed both the cache_spill threshold and the maximum cache size set by the PRAGMA cache_size statement in order for spilling to occur.

/* IMP: R-30164-60316 */
# EVIDENCE-OF: R-30164-60316 The number of pages in cache must exceed
# both the cache_spill threshold and the maximum cache size set by the
# PRAGMA cache_size statement in order for spilling to occur.

R-23786-28684-07406-43966-34623-43310-02646-59578 tcl slt th3 src

The "PRAGMA cache_spill=boolean" form of this pragma applies across all databases attached to the database connection.

/* IMP: R-23786-28684 */
# EVIDENCE-OF: R-23786-28684 The "PRAGMA cache_spill=boolean" form of
# this pragma applies across all databases attached to the database
# connection.

R-22872-18005-62981-26187-32897-04943-19086-58374 tcl slt th3 src

But the "PRAGMA cache_spill=N" form of this statement only applies to the "main" schema or whatever other schema is specified as part of the statement.

/* IMP: R-22872-18005 */
# EVIDENCE-OF: R-22872-18005 But the "PRAGMA cache_spill=N" form of this
# statement only applies to the "main" schema or whatever other schema
# is specified as part of the statement.

R-57216-60803-31079-31964-02291-43639-29753-51457 tcl slt th3 src

The default behavior of the LIKE operator is to ignore case for ASCII characters. Hence, by default 'a' LIKE 'A' is true.

th3/req1/pragma10.test:34

/* IMP: R-57216-60803 */
# EVIDENCE-OF: R-57216-60803 The default behavior of the LIKE operator
# is to ignore case for ASCII characters. Hence, by default 'a' LIKE 'A'
# is true.

R-34730-53445-15838-11944-46041-12438-53750-14468 tcl slt th3 src

The case_sensitive_like pragma installs a new application-defined LIKE function that is either case sensitive or insensitive depending on the value of the case_sensitive_like pragma.

th3/req1/pragma10.test:66

/* IMP: R-34730-53445 */
# EVIDENCE-OF: R-34730-53445 The case_sensitive_like pragma installs a
# new application-defined LIKE function that is either case sensitive or
# insensitive depending on the value of the case_sensitive_like pragma.

R-06710-22511-57136-17945-50070-33110-36192-14395 tcl slt th3 src

When case_sensitive_like is disabled, the default LIKE behavior is expressed.

th3/req1/pragma10.test:70

/* IMP: R-06710-22511 */
# EVIDENCE-OF: R-06710-22511 When case_sensitive_like is disabled, the
# default LIKE behavior is expressed.

R-23019-08375-23742-45203-57540-44774-03255-16704 tcl slt th3 src

When case_sensitive_like is enabled, case becomes significant. So, for example, 'a' LIKE 'A' is false but 'a' LIKE 'a' is still true.

th3/req1/pragma10.test:73

/* IMP: R-23019-08375 */
# EVIDENCE-OF: R-23019-08375 When case_sensitive_like is enabled, case
# becomes significant. So, for example, 'a' LIKE 'A' is false but 'a'
# LIKE 'a' is still true.

R-54349-27488-43340-32008-63380-57974-11339-53896 tcl slt th3 src

This pragma uses sqlite3_create_function() to overload the LIKE and GLOB functions, which may override previous implementations of LIKE and GLOB registered by the application.

th3/req1/pragma10.test:135

/* IMP: R-54349-27488 */
# EVIDENCE-OF: R-54349-27488 This pragma uses sqlite3_create_function()
# to overload the LIKE and GLOB functions, which may override previous
# implementations of LIKE and GLOB registered by the application.

R-02597-60207-27800-53923-18122-14559-36270-03523 tcl slt th3 src

This pragma only changes the behavior of the SQL LIKE operator. It does not change the behavior of the sqlite3_strlike() C-language interface, which is always case insensitive.

/* IMP: R-02597-60207 */
# EVIDENCE-OF: R-02597-60207 This pragma only changes the behavior of
# the SQL LIKE operator. It does not change the behavior of the
# sqlite3_strlike() C-language interface, which is always case
# insensitive.

R-47085-17460-48136-50298-50839-31630-41230-33764 tcl slt th3 src

PRAGMA cell_size_check
PRAGMA cell_size_check =
boolean;

The cell_size_check pragma enables or disables additional sanity checking on database b-tree pages as they are initially read from disk.

/* IMP: R-47085-17460 */
# EVIDENCE-OF: R-47085-17460 PRAGMA cell_size_check PRAGMA
# cell_size_check = boolean; The cell_size_check pragma enables or
# disables additional sanity checking on database b-tree pages as they
# are initially read from disk.

R-59941-62933-38106-18791-02770-37169-39632-35636 tcl slt th3 src

PRAGMA checkpoint_fullfsync
PRAGMA checkpoint_fullfsync =
boolean;

Query or change the fullfsync flag for checkpoint operations.

th3/req1/pragma11.test:21

/* IMP: R-59941-62933 */
# EVIDENCE-OF: R-59941-62933 PRAGMA checkpoint_fullfsync PRAGMA
# checkpoint_fullfsync = boolean; Query or change the fullfsync flag for
# checkpoint operations.

R-14970-42377-34844-46496-15895-42662-06341-12505 tcl slt th3 src

If this flag is set, then the F_FULLFSYNC syncing method is used during checkpoint operations on systems that support F_FULLFSYNC.

th3/req1/pragma11.test:41

/* IMP: R-14970-42377 */
# EVIDENCE-OF: R-14970-42377 If this flag is set, then the F_FULLFSYNC
# syncing method is used during checkpoint operations on systems that
# support F_FULLFSYNC.

R-58560-23968-28537-53654-45621-13227-05416-28279 tcl slt th3 src

The default value of the checkpoint_fullfsync flag is off.

th3/req1/pragma11.test:25

/* IMP: R-58560-23968 */
# EVIDENCE-OF: R-58560-23968 The default value of the
# checkpoint_fullfsync flag is off.

R-48930-58522-23866-61724-42615-58170-25168-58351 tcl slt th3 src

If the fullfsync flag is set, then the F_FULLFSYNC syncing method is used for all sync operations and the checkpoint_fullfsync setting is irrelevant.

th3/req1/pragma11.test:72

/* IMP: R-48930-58522 */
# EVIDENCE-OF: R-48930-58522 If the fullfsync flag is set, then the
# F_FULLFSYNC syncing method is used for all sync operations and the
# checkpoint_fullfsync setting is irrelevant.

R-08469-46782-59132-04592-41153-65090-64039-23228 tcl slt th3 src

PRAGMA collation_list;

Return a list of the collating sequences defined for the current database connection.

th3/req1/pragma13.test:12

/* IMP: R-08469-46782 */
# EVIDENCE-OF: R-08469-46782 PRAGMA collation_list; Return a list of the
# collating sequences defined for the current database connection.

R-40541-16535-13486-20808-32771-40014-56894-53399 tcl slt th3 src

This pragma returns the names of compile-time options used when building SQLite, one option per row.

th3/req1/pragma13.test:34

/* IMP: R-40541-16535 */
# EVIDENCE-OF: R-40541-16535 This pragma returns the names of
# compile-time options used when building SQLite, one option per row.

R-58101-01610-39291-65519-22714-56029-10662-40806 tcl slt th3 src

The "SQLITE_" prefix is omitted from the returned option names.

th3/req1/pragma13.test:37

/* IMP: R-58101-01610 */
# EVIDENCE-OF: R-58101-01610 The "SQLITE_" prefix is omitted from the
# returned option names.

R-27726-60934-44670-59608-21152-24326-11375-20798 tcl slt th3 src

The "PRAGMA data_version" command provides an indication that the database file has been modified.

tcl/pragma3.test:37   th3/cov1/pragma26.test:30

/* IMP: R-27726-60934 */
# EVIDENCE-OF: R-27726-60934 The "PRAGMA data_version" command provides
# an indication that the database file has been modified.

R-63005-41812-25626-08915-56924-18701-34240-17116 tcl slt th3 src

The integer values returned by two invocations of "PRAGMA data_version" from the same connection will be different if changes were committed to the database by any other connection in the interim.

tcl/pragma3.test:75   th3/cov1/pragma26.test:25

/* IMP: R-63005-41812 */
# EVIDENCE-OF: R-63005-41812 The integer values returned by two
# invocations of "PRAGMA data_version" from the same connection will be
# different if changes were committed to the database by any other
# connection in the interim.

R-47505-58569-20472-23148-40328-48365-60870-06508 tcl slt th3 src

The "PRAGMA data_version" value is unchanged for commits made on the same database connection.

tcl/pragma3.test:40   th3/cov1/pragma26.test:9

/* IMP: R-47505-58569 */
# EVIDENCE-OF: R-47505-58569 The "PRAGMA data_version" value is
# unchanged for commits made on the same database connection.

R-54562-06892-25259-07703-54157-59355-38292-12890 tcl slt th3 src

The behavior of "PRAGMA data_version" is the same for all database connections, including database connections in separate processes and shared cache database connections.

tcl/pragma3.test:137   tcl/pragma3.test:165

/* IMP: R-54562-06892 */
# EVIDENCE-OF: R-54562-06892 The behavior of "PRAGMA data_version" is
# the same for all database connections, including database connections
# in separate processes and shared cache database connections.

R-19326-44825-19062-24470-23880-46223-50935-31383 tcl slt th3 src

The "PRAGMA data_version" value is a local property of each database connection and so values returned by two concurrent invocations of "PRAGMA data_version" on separate database connections are often different even though the underlying database is identical.

tcl/pragma3.test:127   th3/cov1/pragma26.test:95

/* IMP: R-19326-44825 */
# EVIDENCE-OF: R-19326-44825 The "PRAGMA data_version" value is a local
# property of each database connection and so values returned by two
# concurrent invocations of "PRAGMA data_version" on separate database
# connections are often different even though the underlying database is
# identical.

R-57464-30285-51678-51682-55772-21804-29928-17163 tcl slt th3 src

PRAGMA database_list;

This pragma works like a query to return one row for each database attached to the current database connection.

th3/req1/pragma14.test:12

/* IMP: R-57464-30285 */
# EVIDENCE-OF: R-57464-30285 PRAGMA database_list; This pragma works
# like a query to return one row for each database attached to the
# current database connection.

R-49128-31170-23004-04082-05241-62766-17146-48048 tcl slt th3 src

The second column is "main" for the main database file, "temp" for the database file used to store TEMP objects, or the name of the ATTACHed database for other database files.

th3/req1/pragma14.test:16

/* IMP: R-49128-31170 */
# EVIDENCE-OF: R-49128-31170 The second column is "main" for the main
# database file, "temp" for the database file used to store TEMP
# objects, or the name of the ATTACHed database for other database
# files.

R-61005-38009-10424-51044-09118-00847-38862-56166 tcl slt th3 src

The third column is the name of the database file itself, or an empty string if the database is not associated with a file.

th3/req1/pragma14.test:21

/* IMP: R-61005-38009 */
# EVIDENCE-OF: R-61005-38009 The third column is the name of the
# database file itself, or an empty string if the database is not
# associated with a file.

R-00373-55350-22476-46693-17788-34313-52165-34922 tcl slt th3 src

PRAGMA schema.default_cache_size;
PRAGMA
schema.default_cache_size = Number-of-pages;

This pragma queries or sets the suggested maximum number of pages of disk cache that will be allocated per open database file.

th3/req1/pragma09.test:64

/* IMP: R-00373-55350 */
# EVIDENCE-OF: R-00373-55350 PRAGMA schema.default_cache_size; PRAGMA
# schema.default_cache_size = Number-of-pages; This pragma queries or
# sets the suggested maximum number of pages of disk cache that will be
# allocated per open database file.

R-52058-53560-05683-08265-32399-18917-51840-34472 tcl slt th3 src

The difference between this pragma and cache_size is that the value set here persists across database connections.

th3/req1/pragma09.test:88

/* IMP: R-52058-53560 */
# EVIDENCE-OF: R-52058-53560 The difference between this pragma and
# cache_size is that the value set here persists across database
# connections.

R-61141-39803-04912-41496-05961-04473-04345-36188 tcl slt th3 src

The value of the default cache size is stored in the 4-byte big-endian integer located at offset 48 in the header of the database file.

th3/req1/pragma09.test:97

/* IMP: R-61141-39803 */
# EVIDENCE-OF: R-61141-39803 The value of the default cache size is
# stored in the 4-byte big-endian integer located at offset 48 in the
# header of the database file.

R-18981-16292-44177-39464-49712-02547-36593-34843 tcl slt th3 src

When the defer_foreign_keys PRAGMA is on, enforcement of all foreign key constraints is delayed until the outermost transaction is committed.

tcl/fkey6.test:16   th3/cov1/fkey24.test:103

/* IMP: R-18981-16292 */
# EVIDENCE-OF: R-18981-16292 When the defer_foreign_keys PRAGMA is on,
# enforcement of all foreign key constraints is delayed until the
# outermost transaction is committed.

R-28911-57501-45271-30589-18471-43910-24083-24523 tcl slt th3 src

The defer_foreign_keys pragma defaults to OFF so that foreign key constraints are only deferred if they are created as "DEFERRABLE INITIALLY DEFERRED".

tcl/fkey6.test:20   th3/cov1/fkey24.test:46

/* IMP: R-28911-57501 */
# EVIDENCE-OF: R-28911-57501 The defer_foreign_keys pragma defaults to
# OFF so that foreign key constraints are only deferred if they are
# created as "DEFERRABLE INITIALLY DEFERRED".

R-21752-26913-20480-58251-45591-43193-62846-17726 tcl slt th3 src

The defer_foreign_keys pragma is automatically switched off at each COMMIT or ROLLBACK. Hence, the defer_foreign_keys pragma must be separately enabled for each transaction.

tcl/fkey6.test:86   th3/cov1/fkey24.test:127   th3/cov1/fkey24.test:60

/* IMP: R-21752-26913 */
# EVIDENCE-OF: R-21752-26913 The defer_foreign_keys pragma is
# automatically switched off at each COMMIT or ROLLBACK. Hence, the
# defer_foreign_keys pragma must be separately enabled for each
# transaction.

R-05688-29289-29845-29411-51913-58756-05388-39596 tcl slt th3 src

PRAGMA encoding;
PRAGMA encoding = 'UTF-8';
PRAGMA encoding = 'UTF-16';
PRAGMA encoding = 'UTF-16le';
PRAGMA encoding = 'UTF-16be';

th3/req1/pragma16.test:9

/* IMP: R-05688-29289 */
# EVIDENCE-OF: R-05688-29289 PRAGMA encoding; PRAGMA encoding = 'UTF-8';
# PRAGMA encoding = 'UTF-16'; PRAGMA encoding = 'UTF-16le'; PRAGMA
# encoding = 'UTF-16be';

R-22504-36456-63205-11923-40332-44268-43890-46191 tcl slt th3 src

In first form, if the main database has already been created, then this pragma returns the text encoding used by the main database, one of 'UTF-8', 'UTF-16le' (little-endian UTF-16 encoding) or 'UTF-16be' (big-endian UTF-16 encoding).

th3/req1/pragma16.test:15

/* IMP: R-22504-36456 */
# EVIDENCE-OF: R-22504-36456 In first form, if the main database has
# already been created, then this pragma returns the text encoding used
# by the main database, one of 'UTF-8', 'UTF-16le' (little-endian UTF-16
# encoding) or 'UTF-16be' (big-endian UTF-16 encoding).

R-47754-42489-63490-59015-30535-62379-17829-51875 tcl slt th3 src

If the main database has not already been created, then the value returned is the text encoding that will be used to create the main database, if it is created by this session.

th3/req1/pragma16.test:22

/* IMP: R-47754-42489 */
# EVIDENCE-OF: R-47754-42489 If the main database has not already been
# created, then the value returned is the text encoding that will be
# used to create the main database, if it is created by this session.

R-44382-28097-05870-38154-27344-49810-07099-20883 tcl slt th3 src

The second through fifth forms of this pragma set the encoding that the main database will be created with if it is created by this session.

th3/req1/pragma16.test:28

/* IMP: R-44382-28097 */
# EVIDENCE-OF: R-44382-28097 The second through fifth forms of this
# pragma set the encoding that the main database will be created with if
# it is created by this session.

R-56236-11699-62098-20167-23584-50570-40984-46383 tcl slt th3 src

The string 'UTF-16' is interpreted as "UTF-16 encoding using native machine byte-ordering".

th3/req1/pragma16.test:125

/* IMP: R-56236-11699 */
# EVIDENCE-OF: R-56236-11699 The string 'UTF-16' is interpreted as
# "UTF-16 encoding using native machine byte-ordering".

R-39746-16618-18331-39876-26719-11435-38479-45574 tcl slt th3 src

It is not possible to change the text encoding of a database after it has been created and any attempt to do so will be silently ignored.

th3/req1/pragma16.test:92

/* IMP: R-39746-16618 */
# EVIDENCE-OF: R-39746-16618 It is not possible to change the text
# encoding of a database after it has been created and any attempt to do
# so will be silently ignored.

R-16040-25925-39944-42727-17957-08154-60392-58357 tcl slt th3 src

If no encoding is first set with this pragma, then the encoding with which the main database will be created defaults to one determined by the API used to open the connection.

/* IMP: R-16040-25925 */
# EVIDENCE-OF: R-16040-25925 If no encoding is first set with this
# pragma, then the encoding with which the main database will be created
# defaults to one determined by the API used to open the connection.

R-37812-47407-44151-24694-62524-58711-37886-57014 tcl slt th3 src

Once an encoding has been set for a database, it cannot be changed.

th3/req1/pragma16.test:96

/* IMP: R-37812-47407 */
# EVIDENCE-OF: R-37812-47407 Once an encoding has been set for a
# database, it cannot be changed.

R-46702-22190-08999-08775-06967-16190-65475-37101 tcl slt th3 src

Databases created by the ATTACH command always use the same encoding as the main database.

th3/req1/pragma16.test:161

/* IMP: R-46702-22190 */
# EVIDENCE-OF: R-46702-22190 Databases created by the ATTACH command
# always use the same encoding as the main database.

R-09943-43999-40050-60099-27352-31262-44628-15476 tcl slt th3 src

An attempt to ATTACH a database with a different text encoding from the "main" database will fail.

th3/req1/pragma16.test:206

/* IMP: R-09943-43999 */
# EVIDENCE-OF: R-09943-43999 An attempt to ATTACH a database with a
# different text encoding from the "main" database will fail.

R-15402-03103-21390-36962-23389-49198-06887-52060 tcl slt th3 src

PRAGMA schema.foreign_key_check;
PRAGMA
schema.foreign_key_check(table-name);

tcl/fkey5.test:15   th3/cov1/fkey23.test:10

/* IMP: R-15402-03103 */
# EVIDENCE-OF: R-15402-03103 PRAGMA schema.foreign_key_check; PRAGMA
# schema.foreign_key_check(table-name);

R-41653-15278-35465-27999-04338-56048-26181-52623 tcl slt th3 src

The foreign_key_check pragma checks the database, or the table called "table-name", for foreign key constraints that are violated. The foreign_key_check pragma returns one row output for each foreign key violation.

tcl/fkey5.test:18   th3/cov1/fkey23.test:13

/* IMP: R-41653-15278 */
# EVIDENCE-OF: R-41653-15278 The foreign_key_check pragma checks the
# database, or the table called "table-name", for foreign key
# constraints that are violated. The foreign_key_check pragma returns
# one row output for each foreign key violation.

R-45728-08709-00373-57456-04392-57683-10379-45526 tcl slt th3 src

There are four columns in each result row.

tcl/fkey5.test:113   th3/cov1/fkey23.test:54

/* IMP: R-45728-08709 */
# EVIDENCE-OF: R-45728-08709 There are four columns in each result row.

R-55672-01620-31109-43050-24330-12239-06929-55084 tcl slt th3 src

The first column is the name of the table that contains the REFERENCES clause.

tcl/fkey5.test:115   th3/cov1/fkey23.test:56

/* IMP: R-55672-01620 */
# EVIDENCE-OF: R-55672-01620 The first column is the name of the table
# that contains the REFERENCES clause.

R-00471-55166-06832-40836-07519-56638-61190-55255 tcl slt th3 src

The second column is the rowid of the row that contains the invalid REFERENCES clause, or NULL if the child table is a WITHOUT ROWID table.

tcl/fkey5.test:118   tcl/fkey5.test:413   th3/cov1/fkey23.test:203   th3/cov1/fkey23.test:59

/* IMP: R-00471-55166 */
# EVIDENCE-OF: R-00471-55166 The second column is the rowid of the row
# that contains the invalid REFERENCES clause, or NULL if the child
# table is a WITHOUT ROWID table.

R-40482-20265-47732-31040-18704-35090-36000-12311 tcl slt th3 src

The third column is the name of the table that is referred to.

tcl/fkey5.test:124   th3/cov1/fkey23.test:63

/* IMP: R-40482-20265 */
# EVIDENCE-OF: R-40482-20265 The third column is the name of the table
# that is referred to.

R-62839-07969-20835-12393-10949-34728-00422-57830 tcl slt th3 src

The fourth column is the index of the specific foreign key constraint that failed.

tcl/fkey5.test:127   th3/cov1/fkey23.test:66

/* IMP: R-62839-07969 */
# EVIDENCE-OF: R-62839-07969 The fourth column is the index of the
# specific foreign key constraint that failed.

R-31235-42643-53508-27982-17967-09319-44968-07098 tcl slt th3 src

The fourth column in the output of the foreign_key_check pragma is the same integer as the first column in the output of the foreign_key_list pragma.

th3/cov1/fkey23.test:50

/* IMP: R-31235-42643 */
# EVIDENCE-OF: R-31235-42643 The fourth column in the output of the
# foreign_key_check pragma is the same integer as the first column in
# the output of the foreign_key_list pragma.

R-29523-01234-45433-34913-07391-02140-19209-23434 tcl slt th3 src

When a "table-name" is specified, the only foreign key constraints checked are those created by REFERENCES clauses in the CREATE TABLE statement for table-name.

th3/cov1/fkey23.test:100

/* IMP: R-29523-01234 */
# EVIDENCE-OF: R-29523-01234 When a "table-name" is specified, the only
# foreign key constraints checked are those created by REFERENCES
# clauses in the CREATE TABLE statement for table-name.

R-12507-28763-48132-30913-24133-27495-38799-45736 tcl slt th3 src

PRAGMA foreign_key_list(table-name);

This pragma returns one row for each foreign key constraint created by a REFERENCES clause in the CREATE TABLE statement of table "table-name".

th3/req1/pragma17.test:9

/* IMP: R-12507-28763 */
# EVIDENCE-OF: R-12507-28763 PRAGMA foreign_key_list(table-name); This
# pragma returns one row for each foreign key constraint created by a
# REFERENCES clause in the CREATE TABLE statement of table "table-name".

R-18160-43138-45730-29033-18368-13452-34551-31953 tcl slt th3 src

PRAGMA foreign_keys;
PRAGMA foreign_keys =
boolean;

Query, set, or clear the enforcement of foreign key constraints.

th3/req1/pragma18.test:17

/* IMP: R-18160-43138 */
# EVIDENCE-OF: R-18160-43138 PRAGMA foreign_keys; PRAGMA foreign_keys =
# boolean; Query, set, or clear the enforcement of foreign key
# constraints.

R-53547-37067-09638-20252-03189-64013-38251-09094 tcl slt th3 src

This pragma is a no-op within a transaction; foreign key constraint enforcement may only be enabled or disabled when there is no pending BEGIN or SAVEPOINT.

th3/req1/pragma18.test:30

/* IMP: R-53547-37067 */
# EVIDENCE-OF: R-53547-37067 This pragma is a no-op within a
# transaction; foreign key constraint enforcement may only be enabled or
# disabled when there is no pending BEGIN or SAVEPOINT.

R-54105-45069-36894-51687-59300-29186-60662-50296 tcl slt th3 src

Changing the foreign_keys setting affects the execution of all statements prepared using the database connection, including those prepared before the setting was changed.

th3/req1/pragma18.test:58

/* IMP: R-54105-45069 */
# EVIDENCE-OF: R-54105-45069 Changing the foreign_keys setting affects
# the execution of all statements prepared using the database
# connection, including those prepared before the setting was changed.

R-64276-00534-35608-51878-49907-08473-11116-64004 tcl slt th3 src

Any existing statements prepared using the legacy sqlite3_prepare() interface may fail with an SQLITE_SCHEMA error after the foreign_keys setting is changed.

th3/req1/pragma19.test:37

/* IMP: R-64276-00534 */
# EVIDENCE-OF: R-64276-00534 Any existing statements prepared using the
# legacy sqlite3_prepare() interface may fail with an SQLITE_SCHEMA
# error after the foreign_keys setting is changed.

R-09033-01493-08484-25490-18731-61378-37357-02599 tcl slt th3 src

As of SQLite version 3.6.19, the default setting for foreign key enforcement is OFF.

th3/req1/pragma18.test:10   th3/req1/pragma19.test:14

/* IMP: R-09033-01493 */
# EVIDENCE-OF: R-09033-01493 As of SQLite version 3.6.19, the default
# setting for foreign key enforcement is OFF.

R-11211-21323-44589-16843-54908-31937-00970-23693 tcl slt th3 src

PRAGMA schema.freelist_count;

Return the number of unused pages in the database file.

tcl/pragma2.test:45   th3/req1/pragma21.test:24

/* IMP: R-11211-21323 */
# EVIDENCE-OF: R-11211-21323 PRAGMA schema.freelist_count; Return the
# number of unused pages in the database file.

R-29353-26294-62114-45133-33417-28665-47147-29185 tcl slt th3 src

PRAGMA fullfsync
PRAGMA fullfsync =
boolean;

Query or change the fullfsync flag.

th3/req1/pragma11b.test:21

/* IMP: R-29353-26294 */
# EVIDENCE-OF: R-29353-26294 PRAGMA fullfsync PRAGMA fullfsync =
# boolean; Query or change the fullfsync flag.

R-09748-03241-62835-60245-32173-07711-55769-04429 tcl slt th3 src

This flag determines whether or not the F_FULLFSYNC syncing method is used on systems that support it.

th3/req1/pragma11b.test:39

/* IMP: R-09748-03241 */
# EVIDENCE-OF: R-09748-03241 This flag determines whether or not the
# F_FULLFSYNC syncing method is used on systems that support it.

R-30269-25284-41363-48378-16742-02348-00072-11353 tcl slt th3 src

The default value of the fullfsync flag is off.

th3/req1/pragma11b.test:24

/* IMP: R-30269-25284 */
# EVIDENCE-OF: R-30269-25284 The default value of the fullfsync flag is
# off.

R-24539-09359-22756-36895-58208-42463-58275-24865 tcl slt th3 src

PRAGMA function_list;

This pragma returns a list of SQL functions known to the database connection.

/* IMP: R-24539-09359 */
# EVIDENCE-OF: R-24539-09359 PRAGMA function_list; This pragma returns a
# list of SQL functions known to the database connection.

R-06033-51812-54641-21311-09702-50904-10745-36536 tcl slt th3 src

This pragma invokes the sqlite3_hard_heap_limit64() interface with the argument N, if N is specified and N is a positive integer that is less than the current hard heap limit.

/* IMP: R-06033-51812 */
# EVIDENCE-OF: R-06033-51812 This pragma invokes the
# sqlite3_hard_heap_limit64() interface with the argument N, if N is
# specified and N is a positive integer that is less than the current
# hard heap limit.

R-07358-23974-16513-21105-25104-49768-42018-55781 tcl slt th3 src

The hard_heap_limit pragma always returns the same integer that would be returned by the sqlite3_hard_heap_limit64(-1) C-language function.

/* IMP: R-07358-23974 */
# EVIDENCE-OF: R-07358-23974 The hard_heap_limit pragma always returns
# the same integer that would be returned by the
# sqlite3_hard_heap_limit64(-1) C-language function.

R-09205-13964-09517-20139-64262-42567-60907-13459 tcl slt th3 src

That is to say, it always returns the value of the hard heap limit that is set after any changes imposed by this PRAGMA.

/* IMP: R-09205-13964 */
# EVIDENCE-OF: R-09205-13964 That is to say, it always returns the value
# of the hard heap limit that is set after any changes imposed by this
# PRAGMA.

R-23984-49501-37243-56289-03587-60124-22633-25227 tcl slt th3 src

PRAGMA ignore_check_constraints = boolean;

This pragma enables or disables the enforcement of CHECK constraints.

th3/req1/pragma20.test:21

/* IMP: R-23984-49501 */
# EVIDENCE-OF: R-23984-49501 PRAGMA ignore_check_constraints = boolean;
# This pragma enables or disables the enforcement of CHECK constraints.

R-26888-26313-07515-35775-03599-15989-59200-07369 tcl slt th3 src

The default setting is off, meaning that CHECK constraints are enforced by default.

th3/req1/pragma20.test:10

/* IMP: R-26888-26313 */
# EVIDENCE-OF: R-26888-26313 The default setting is off, meaning that
# CHECK constraints are enforced by default.

R-33848-17975-36657-57635-49129-43335-29769-30640 tcl slt th3 src

PRAGMA schema.incremental_vacuum(N);
PRAGMA
schema.incremental_vacuum;

The incremental_vacuum pragma causes up to N pages to be removed from the freelist.

th3/req1/pragma21.test:37

/* IMP: R-33848-17975 */
# EVIDENCE-OF: R-33848-17975 PRAGMA schema.incremental_vacuum(N); PRAGMA
# schema.incremental_vacuum; The incremental_vacuum pragma causes up to
# N pages to be removed from the freelist.

R-52155-58082-26086-07987-14656-12581-61413-44017 tcl slt th3 src

The database file is truncated by the same amount.

th3/req1/pragma21.test:41

/* IMP: R-52155-58082 */
# EVIDENCE-OF: R-52155-58082 The database file is truncated by the same
# amount.

R-42333-10376-25894-44230-56156-46004-61943-25934 tcl slt th3 src

The incremental_vacuum pragma has no effect if the database is not in auto_vacuum=incremental mode or if there are no pages on the freelist.

th3/req1/pragma21.test:77

/* IMP: R-42333-10376 */
# EVIDENCE-OF: R-42333-10376 The incremental_vacuum pragma has no effect
# if the database is not in auto_vacuum=incremental mode or if there are
# no pages on the freelist.

R-63684-00056-12744-41513-44383-51179-47104-18458 tcl slt th3 src

If there are fewer than N pages on the freelist, or if N is less than 1, or if the "(N)" argument is omitted, then the entire freelist is cleared.

th3/req1/pragma21.test:50

/* IMP: R-63684-00056 */
# EVIDENCE-OF: R-63684-00056 If there are fewer than N pages on the
# freelist, or if N is less than 1, or if the "(N)" argument is omitted,
# then the entire freelist is cleared.

R-29448-60346-55143-08707-47583-53661-32513-61785 tcl slt th3 src

PRAGMA schema.index_info(index-name);

This pragma returns one row for each key column in the named index.

tcl/pragma.test:809   th3/req1/pragma15.test:14

/* IMP: R-29448-60346 */
# EVIDENCE-OF: R-29448-60346 PRAGMA schema.index_info(index-name); This
# pragma returns one row for each key column in the named index.

R-23114-21695-36244-34709-35067-61095-03657-31992 tcl slt th3 src

The auxiliary index-columns are not shown by the index_info pragma, but they are listed by the index_xinfo pragma.

tcl/pragma.test:799   th3/req1/pragma15x.test:80

/* IMP: R-23114-21695 */
# EVIDENCE-OF: R-23114-21695 The auxiliary index-columns are not shown
# by the index_info pragma, but they are listed by the index_xinfo
# pragma.

R-34186-52914-35981-17820-54007-24600-55033-63809 tcl slt th3 src

The rank of the column within the index. (0 means left-most.)

tcl/pragma.test:813   th3/req1/pragma15.test:18

/* IMP: R-34186-52914 */
# EVIDENCE-OF: R-34186-52914 The rank of the column within the index. (0
# means left-most.)

R-65019-08383-37218-08161-37100-03292-58035-06860 tcl slt th3 src

The rank of the column within the table being indexed.

tcl/pragma.test:817   th3/req1/pragma15.test:22

/* IMP: R-65019-08383 */
# EVIDENCE-OF: R-65019-08383 The rank of the column within the table
# being indexed.

R-63234-56981-14437-01927-09804-62801-28815-37860 tcl slt th3 src

A value of -1 means rowid and a value of -2 means that an expression is being used.

/* IMP: R-63234-56981 */
# EVIDENCE-OF: R-63234-56981 A value of -1 means rowid and a value of -2
# means that an expression is being used.

R-09773-34266-19272-64425-39680-64969-31410-22959 tcl slt th3 src

The name of the column being indexed.

tcl/pragma.test:821   th3/req1/pragma15.test:26

/* IMP: R-09773-34266 */
# EVIDENCE-OF: R-09773-34266 The name of the column being indexed.

R-41438-32603-17646-55492-38195-10504-33475-54382 tcl slt th3 src

This columns is NULL if the column is the rowid or an expression.

/* IMP: R-41438-32603 */
# EVIDENCE-OF: R-41438-32603 This columns is NULL if the column is the
# rowid or an expression.

R-64103-17776-35606-10153-57490-26630-22697-19436 tcl slt th3 src

PRAGMA schema.index_list(table-name);

This pragma returns one row for each index associated with the given table.

tcl/pragma.test:1993   tcl/pragma.test:896   th3/req1/pragma15.test:72

/* IMP: R-64103-17776 */
# EVIDENCE-OF: R-64103-17776 PRAGMA schema.index_list(table-name); This
# pragma returns one row for each index associated with the given table.

R-02753-24748-27922-38844-00567-47453-02164-18624 tcl slt th3 src

A sequence number assigned to each index for internal tracking purposes.

tcl/pragma.test:1997   th3/req1/pragma15.test:76

/* IMP: R-02753-24748 */
# EVIDENCE-OF: R-02753-24748 A sequence number assigned to each index
# for internal tracking purposes.

R-35496-03635-05800-19681-11567-09775-48933-50480 tcl slt th3 src

The name of the index.

tcl/pragma.test:2001   th3/req1/pragma15.test:80

/* IMP: R-35496-03635 */
# EVIDENCE-OF: R-35496-03635 The name of the index.

R-57301-64506-10586-49672-48759-26432-01783-64495 tcl slt th3 src

"1" if the index is UNIQUE and "0" if not.

tcl/pragma.test:2004   th3/req1/pragma15.test:83

/* IMP: R-57301-64506 */
# EVIDENCE-OF: R-57301-64506 "1" if the index is UNIQUE and "0" if not.

R-36609-39554-02465-47159-11232-33677-21086-13785 tcl slt th3 src

"c" if the index was created by a CREATE INDEX statement, "u" if the index was created by a UNIQUE constraint, or "pk" if the index was created by a PRIMARY KEY constraint.

tcl/pragma.test:2007   th3/req1/pragma15.test:86

/* IMP: R-36609-39554 */
# EVIDENCE-OF: R-36609-39554 "c" if the index was created by a CREATE
# INDEX statement, "u" if the index was created by a UNIQUE constraint,
# or "pk" if the index was created by a PRIMARY KEY constraint.

R-34457-09668-37447-61343-26020-24066-28137-60426 tcl slt th3 src

"1" if the index is a partial index and "0" if not.

tcl/index7.test:66   th3/req1/pragma15.test:91

/* IMP: R-34457-09668 */
# EVIDENCE-OF: R-34457-09668 "1" if the index is a partial index and "0"
# if not.

R-56143-29319-15474-25022-04217-21901-07164-36607 tcl slt th3 src

PRAGMA schema.index_xinfo(index-name);

This pragma returns information about every column in an index.

tcl/pragma.test:1945   th3/req1/pragma15x.test:12

/* IMP: R-56143-29319 */
# EVIDENCE-OF: R-56143-29319 PRAGMA schema.index_xinfo(index-name); This
# pragma returns information about every column in an index.

R-45970-35618-54800-59485-17030-46204-37187-33805 tcl slt th3 src

Unlike this index_info pragma, this pragma returns information about every column in the index, not just the key columns.

tcl/pragma.test:1948   th3/req1/pragma15x.test:15

/* IMP: R-45970-35618 */
# EVIDENCE-OF: R-45970-35618 Unlike this index_info pragma, this pragma
# returns information about every column in the index, not just the key
# columns.

R-00197-14279-64967-54349-51250-28289-13484-05768 tcl slt th3 src

The rank of the column within the index. (0 means left-most. Key columns come before auxiliary columns.)

tcl/pragma.test:1958   th3/req1/pragma15x.test:20

/* IMP: R-00197-14279 */
# EVIDENCE-OF: R-00197-14279 The rank of the column within the index. (0
# means left-most. Key columns come before auxiliary columns.)

R-06603-49335-45148-37548-51354-29602-47904-63601 tcl slt th3 src

The rank of the column within the table being indexed, or -1 if the index-column is the rowid of the table being indexed and -2 if the index is on an expression.

tcl/pragma.test:1962   th3/req1/pragma15x.test:24

/* IMP: R-06603-49335 */
# EVIDENCE-OF: R-06603-49335 The rank of the column within the table
# being indexed, or -1 if the index-column is the rowid of the table
# being indexed and -2 if the index is on an expression.

R-40641-22898-05833-02924-09975-01966-21919-53888 tcl slt th3 src

The name of the column being indexed, or NULL if the index-column is the rowid of the table being indexed or an expression.

tcl/pragma.test:1967   th3/req1/pragma15x.test:29

/* IMP: R-40641-22898 */
# EVIDENCE-OF: R-40641-22898 The name of the column being indexed, or
# NULL if the index-column is the rowid of the table being indexed or an
# expression.

R-11847-09179-40053-04599-51829-21779-50650-56945 tcl slt th3 src

1 if the index-column is sorted in reverse (DESC) order by the index and 0 otherwise.

tcl/pragma.test:1972   th3/req1/pragma15x.test:34

/* IMP: R-11847-09179 */
# EVIDENCE-OF: R-11847-09179 1 if the index-column is sorted in reverse
# (DESC) order by the index and 0 otherwise.

R-15313-19540-00987-59181-43377-13803-46289-24513 tcl slt th3 src

The name for the collating sequence used to compare values in the index-column.

tcl/pragma.test:1976   th3/req1/pragma15x.test:38

/* IMP: R-15313-19540 */
# EVIDENCE-OF: R-15313-19540 The name for the collating sequence used to
# compare values in the index-column.

R-14310-64553-52878-24653-31344-14066-48757-18483 tcl slt th3 src

1 if the index-column is a key column and 0 if the index-column is an auxiliary column.

tcl/pragma.test:1980   th3/req1/pragma15x.test:42

/* IMP: R-14310-64553 */
# EVIDENCE-OF: R-14310-64553 1 if the index-column is a key column and 0
# if the index-column is an auxiliary column.

R-55700-34343-49028-33969-14549-05550-41139-48792 tcl slt th3 src

This pragma does a low-level formatting and consistency check of the database.

/* IMP: R-55700-34343 */
# EVIDENCE-OF: R-55700-34343 This pragma does a low-level formatting and
# consistency check of the database.

R-50173-30557-65428-54259-43210-11188-24430-56909 tcl slt th3 src

The integrity_check pragma look for:

/* IMP: R-50173-30557 */
# EVIDENCE-OF: R-50173-30557 The integrity_check pragma look for: Table
# or index entries that are out of sequence Misformatted records Missing
# pages Missing or surplus index entries UNIQUE, CHECK, and NOT NULL
# constraint errors Integrity of the freelist Sections of the database
# that are used more than once, or not at all

R-05529-49311-19385-25088-51848-47183-58001-39726 tcl slt th3 src

If the integrity_check pragma finds problems, strings are returned (as multiple rows with a single column per row) which describe the problems.

th3/req1/integrityck01.test:72

/* IMP: R-05529-49311 */
# EVIDENCE-OF: R-05529-49311 If the integrity_check pragma finds
# problems, strings are returned (as multiple rows with a single column
# per row) which describe the problems.

R-41914-07968-11618-38374-65120-62637-18868-18201 tcl slt th3 src

Pragma integrity_check will return at most N errors before the analysis quits, with N defaulting to 100.

th3/req1/integrityck01.test:29

/* IMP: R-41914-07968 */
# EVIDENCE-OF: R-41914-07968 Pragma integrity_check will return at most
# N errors before the analysis quits, with N defaulting to 100.

R-35592-43376-11648-07628-49784-57585-43144-43201 tcl slt th3 src

If pragma integrity_check finds no errors, a single row with the value 'ok' is returned.

th3/req1/integrityck01.test:11

/* IMP: R-35592-43376 */
# EVIDENCE-OF: R-35592-43376 If pragma integrity_check finds no errors,
# a single row with the value 'ok' is returned.

R-00143-55862-36284-22296-28662-09257-51521-03944 tcl slt th3 src

The usual case is that the entire database file is checked.

/* IMP: R-00143-55862 */
# EVIDENCE-OF: R-00143-55862 The usual case is that the entire database
# file is checked.

R-39763-46240-25727-03918-12212-03992-13820-06726 tcl slt th3 src

PRAGMA schema.journal_mode;
PRAGMA
schema.journal_mode = DELETE | TRUNCATE | PERSIST | MEMORY | WAL | OFF

This pragma queries or sets the journal mode for databases associated with the current database connection.

th3/req1/pragma23.test:11

/* IMP: R-39763-46240 */
# EVIDENCE-OF: R-39763-46240 PRAGMA schema.journal_mode; PRAGMA
# schema.journal_mode = DELETE | TRUNCATE | PERSIST | MEMORY | WAL | OFF
# This pragma queries or sets the journal mode for databases associated
# with the current database connection.

R-34456-00884-53550-63882-43324-33974-40030-43057 tcl slt th3 src

The first form of this pragma queries the current journaling mode for database.

th3/req1/pragma23.test:16

/* IMP: R-34456-00884 */
# EVIDENCE-OF: R-34456-00884 The first form of this pragma queries the
# current journaling mode for database.

R-45251-44035-31636-37177-08697-29378-39945-28652 tcl slt th3 src

When database is omitted, the "main" database is queried.

th3/req1/pragma23.test:19

/* IMP: R-45251-44035 */
# EVIDENCE-OF: R-45251-44035 When database is omitted, the "main"
# database is queried.

R-45883-43943-57871-65431-07060-17806-58519-01354 tcl slt th3 src

The second form changes the journaling mode for "database" or for all attached databases if "database" is omitted.

th3/req1/pragma23.test:22

/* IMP: R-45883-43943 */
# EVIDENCE-OF: R-45883-43943 The second form changes the journaling mode
# for "database" or for all attached databases if "database" is omitted.

R-62787-27093-28776-07696-30673-33201-48142-02108 tcl slt th3 src

The new journal mode is returned.

th3/req1/pragma23.test:25

/* IMP: R-62787-27093 */
# EVIDENCE-OF: R-62787-27093 The new journal mode is returned.

R-10827-60271-29957-56948-24015-30184-30486-05573 tcl slt th3 src

If the journal mode could not be changed, the original journal mode is returned.

th3/req1/pragma23.test:65

/* IMP: R-10827-60271 */
# EVIDENCE-OF: R-10827-60271 If the journal mode could not be changed,
# the original journal mode is returned.

R-19245-12964-15266-21259-12378-18812-33916-24209 tcl slt th3 src

The DELETE journaling mode is the normal behavior.

th3/req1/pragma23.test:129

/* IMP: R-19245-12964 */
# EVIDENCE-OF: R-19245-12964 The DELETE journaling mode is the normal
# behavior.

R-05617-50091-64320-09946-64698-41149-46478-61865 tcl slt th3 src

In the DELETE mode, the rollback journal is deleted at the conclusion of each transaction.

th3/req1/pragma24.test:11

/* IMP: R-05617-50091 */
# EVIDENCE-OF: R-05617-50091 In the DELETE mode, the rollback journal is
# deleted at the conclusion of each transaction.

R-08198-48522-54017-24058-29188-47107-45936-39213 tcl slt th3 src

The TRUNCATE journaling mode commits transactions by truncating the rollback journal to zero-length instead of deleting it.

th3/req1/pragma24.test:32

/* IMP: R-08198-48522 */
# EVIDENCE-OF: R-08198-48522 The TRUNCATE journaling mode commits
# transactions by truncating the rollback journal to zero-length instead
# of deleting it.

R-44624-50921-54896-40195-40598-14115-12715-41655 tcl slt th3 src

The PERSIST journaling mode prevents the rollback journal from being deleted at the end of each transaction. Instead, the header of the journal is overwritten with zeros.

th3/req1/pragma24.test:47

/* IMP: R-44624-50921 */
# EVIDENCE-OF: R-44624-50921 The PERSIST journaling mode prevents the
# rollback journal from being deleted at the end of each transaction.
# Instead, the header of the journal is overwritten with zeros.

R-43520-58856-06723-52893-53353-04776-19721-26256 tcl slt th3 src

The MEMORY journaling mode stores the rollback journal in volatile RAM.

th3/req1/pragma25.test:69

/* IMP: R-43520-58856 */
# EVIDENCE-OF: R-43520-58856 The MEMORY journaling mode stores the
# rollback journal in volatile RAM.

R-03364-08004-01846-16626-35041-21418-01059-33152 tcl slt th3 src

This saves disk I/O but at the expense of database safety and integrity.

th3/req1/pragma25.test:30

/* IMP: R-03364-08004 */
# EVIDENCE-OF: R-03364-08004 This saves disk I/O but at the expense of
# database safety and integrity.

R-05226-30063-38393-23337-31220-10155-17682-45217 tcl slt th3 src

If the application using SQLite crashes in the middle of a transaction when the MEMORY journaling mode is set, then the database file will very likely go corrupt.

th3/req1/pragma25.test:94

/* IMP: R-05226-30063 */
# EVIDENCE-OF: R-05226-30063 If the application using SQLite crashes in
# the middle of a transaction when the MEMORY journaling mode is set,
# then the database file will very likely go corrupt.

R-41417-64456-42642-02544-40631-11378-24048-47614 tcl slt th3 src

The WAL journaling mode uses a write-ahead log instead of a rollback journal to implement transactions.

th3/req1/pragma24.test:68

/* IMP: R-41417-64456 */
# EVIDENCE-OF: R-41417-64456 The WAL journaling mode uses a write-ahead
# log instead of a rollback journal to implement transactions.

R-64967-62742-25252-37896-34522-17857-15899-52885 tcl slt th3 src

The WAL journaling mode is persistent; after being set it stays in effect across multiple database connections and after closing and reopening the database.

th3/req1/pragma24.test:86

/* IMP: R-64967-62742 */
# EVIDENCE-OF: R-64967-62742 The WAL journaling mode is persistent;
# after being set it stays in effect across multiple database
# connections and after closing and reopening the database.

R-18981-44563-59556-01794-47708-02337-53296-37760 tcl slt th3 src

The OFF journaling mode disables the rollback journal completely.

th3/req1/pragma25.test:124

/* IMP: R-18981-44563 */
# EVIDENCE-OF: R-18981-44563 The OFF journaling mode disables the
# rollback journal completely.

R-20262-06249-08007-38401-43127-56610-34465-06889 tcl slt th3 src

No rollback journal is ever created and hence there is never a rollback journal to delete.

th3/req1/pragma25.test:127

/* IMP: R-20262-06249 */
# EVIDENCE-OF: R-20262-06249 No rollback journal is ever created and
# hence there is never a rollback journal to delete.

R-41969-26805-23474-17997-34431-40001-19681-04714 tcl slt th3 src

If the application crashes in the middle of a transaction when the OFF journaling mode is set, then the database file will very likely go corrupt.

th3/req1/pragma25.test:166

/* IMP: R-41969-26805 */
# EVIDENCE-OF: R-41969-26805 If the application crashes in the middle of
# a transaction when the OFF journaling mode is set, then the database
# file will very likely go corrupt.

R-26383-00685-00003-12709-20041-02640-63629-60960 tcl slt th3 src

Note that the journal_mode for an in-memory database is either MEMORY or OFF and can not be changed to a different value.

th3/req1/pragma23.test:68

/* IMP: R-26383-00685 */
# EVIDENCE-OF: R-26383-00685 Note that the journal_mode for an in-memory
# database is either MEMORY or OFF and can not be changed to a different
# value.

R-04857-57605-48133-44150-30535-05379-36560-24650 tcl slt th3 src

An attempt to change the journal_mode of an in-memory database to any setting other than MEMORY or OFF is ignored.

th3/req1/pragma23.test:72

/* IMP: R-04857-57605 */
# EVIDENCE-OF: R-04857-57605 An attempt to change the journal_mode of an
# in-memory database to any setting other than MEMORY or OFF is ignored.

R-44336-03155-46084-50304-15554-44543-05811-18658 tcl slt th3 src

Note also that the journal_mode cannot be changed while a transaction is active.

th3/req1/pragma23.test:114

/* IMP: R-44336-03155 */
# EVIDENCE-OF: R-44336-03155 Note also that the journal_mode cannot be
# changed while a transaction is active.

R-23038-23996-21339-41009-49120-44197-27486-19934 tcl slt th3 src

If a database connection is operating in exclusive locking mode or in persistent journal mode (PRAGMA journal_mode=persist) then after committing a transaction the rollback journal file may remain in the file-system.

th3/req1/pragma26.test:123

/* IMP: R-23038-23996 */
# EVIDENCE-OF: R-23038-23996 If a database connection is operating in
# exclusive locking mode or in persistent journal mode (PRAGMA
# journal_mode=persist) then after committing a transaction the rollback
# journal file may remain in the file-system.

R-05912-10167-55658-18265-62443-52976-18281-50268 tcl slt th3 src

The journal_size_limit pragma may be used to limit the size of rollback-journal and WAL files left in the file-system after transactions or checkpoints.

th3/req1/pragma26.test:10

/* IMP: R-05912-10167 */
# EVIDENCE-OF: R-05912-10167 The journal_size_limit pragma may be used
# to limit the size of rollback-journal and WAL files left in the
# file-system after transactions or checkpoints.

R-58293-02725-64867-56851-12538-45360-38316-49543 tcl slt th3 src

Each time a transaction is committed or a WAL file resets, SQLite compares the size of the rollback journal file or WAL file left in the file-system to the size limit set by this pragma and if the journal or WAL file is larger it is truncated to the limit.

th3/req1/pragma26.test:117

/* IMP: R-58293-02725 */
# EVIDENCE-OF: R-58293-02725 Each time a transaction is committed or a
# WAL file resets, SQLite compares the size of the rollback journal file
# or WAL file left in the file-system to the size limit set by this
# pragma and if the journal or WAL file is larger it is truncated to the
# limit.

R-20915-35810-14572-42507-50726-14071-51730-17527 tcl slt th3 src

The second form of the pragma listed above is used to set a new limit in bytes for the specified database.

th3/req1/pragma26.test:28

/* IMP: R-20915-35810 */
# EVIDENCE-OF: R-20915-35810 The second form of the pragma listed above
# is used to set a new limit in bytes for the specified database.

R-17615-49737-42602-31197-05538-64484-08202-17390 tcl slt th3 src

A negative number implies no limit.

th3/req1/pragma26.test:159

/* IMP: R-17615-49737 */
# EVIDENCE-OF: R-17615-49737 A negative number implies no limit.

R-42584-44456-56130-43487-49627-44255-00000-11489 tcl slt th3 src

To always truncate rollback journals and WAL files to their minimum size, set the journal_size_limit to zero.

/* IMP: R-42584-44456 */
# EVIDENCE-OF: R-42584-44456 To always truncate rollback journals and
# WAL files to their minimum size, set the journal_size_limit to zero.

R-10777-25114-28148-35067-60781-11341-59885-20930 tcl slt th3 src

Both the first and second forms of the pragma listed above return a single result row containing a single integer column - the value of the journal size limit in bytes.

th3/req1/pragma26.test:24

/* IMP: R-10777-25114 */
# EVIDENCE-OF: R-10777-25114 Both the first and second forms of the
# pragma listed above return a single result row containing a single
# integer column - the value of the journal size limit in bytes.

R-35812-46755-23531-40873-62145-48640-15024-41940 tcl slt th3 src

The default journal size limit is -1 (no limit).

th3/req1/pragma26.test:15

/* IMP: R-35812-46755 */
# EVIDENCE-OF: R-35812-46755 The default journal size limit is -1 (no
# limit).

R-48576-42125-14408-22326-23329-43841-05542-05024 tcl slt th3 src

This pragma only operates on the single database specified prior to the pragma name (or on the "main" database if no database is specified.

th3/req1/pragma26.test:68

/* IMP: R-48576-42125 */
# EVIDENCE-OF: R-48576-42125 This pragma only operates on the single
# database specified prior to the pragma name (or on the "main" database
# if no database is specified.

R-31816-13824-03247-24421-35841-11575-32489-23110 tcl slt th3 src

PRAGMA legacy_alter_table;
PRAGMA legacy_alter_table = boolean

This pragma sets or queries the value of the legacy_alter_table flag.

/* IMP: R-31816-13824 */
# EVIDENCE-OF: R-31816-13824 PRAGMA legacy_alter_table; PRAGMA
# legacy_alter_table = boolean This pragma sets or queries the value of
# the legacy_alter_table flag.

R-49851-43011-30572-52632-23403-60290-47065-63539 tcl slt th3 src

When this flag is on, the ALTER TABLE RENAME command (for changing the name of a table) works as it did in SQLite 3.24.0 (2018-06-04) and earlier.

/* IMP: R-49851-43011 */
# EVIDENCE-OF: R-49851-43011 When this flag is on, the ALTER TABLE
# RENAME command (for changing the name of a table) works as it did in
# SQLite 3.24.0 (2018-06-04) and earlier.

R-33724-43128-37475-21517-54367-56577-55269-13573 tcl slt th3 src

PRAGMA legacy_file_format;

This pragma no longer functions. It has become a no-op.

/* IMP: R-33724-43128 */
# EVIDENCE-OF: R-33724-43128 PRAGMA legacy_file_format; This pragma no
# longer functions. It has become a no-op.

R-53361-24419-19828-49263-36591-42427-29848-60757 tcl slt th3 src

PRAGMA schema.locking_mode;
PRAGMA
schema.locking_mode = NORMAL | EXCLUSIVE

th3/req1/pragma04.test:13

/* IMP: R-53361-24419 */
# EVIDENCE-OF: R-53361-24419 PRAGMA schema.locking_mode; PRAGMA
# schema.locking_mode = NORMAL | EXCLUSIVE

R-39608-49000-51968-24842-19070-08094-34539-25072 tcl slt th3 src

This pragma sets or queries the database connection locking-mode.

th3/req1/pragma04.test:16

/* IMP: R-39608-49000 */
# EVIDENCE-OF: R-39608-49000 This pragma sets or queries the database
# connection locking-mode.

R-12374-37755-19006-43319-29109-21110-40176-02153 tcl slt th3 src

The locking-mode is either NORMAL or EXCLUSIVE.

th3/req1/pragma04.test:19

/* IMP: R-12374-37755 */
# EVIDENCE-OF: R-12374-37755 The locking-mode is either NORMAL or
# EXCLUSIVE.

R-43797-56749-02967-54481-29642-02482-32480-02233 tcl slt th3 src

In NORMAL locking-mode (the default unless overridden at compile-time using SQLITE_DEFAULT_LOCKING_MODE), a database connection unlocks the database file at the conclusion of each read or write transaction.

th3/req1/pragma04.test:52

/* IMP: R-43797-56749 */
# EVIDENCE-OF: R-43797-56749 In NORMAL locking-mode (the default unless
# overridden at compile-time using SQLITE_DEFAULT_LOCKING_MODE), a
# database connection unlocks the database file at the conclusion of
# each read or write transaction.

R-29276-00741-11068-20150-45137-35653-26807-40835 tcl slt th3 src

When the locking-mode is set to EXCLUSIVE, the database connection never releases file-locks.

th3/req1/pragma04.test:87

/* IMP: R-29276-00741 */
# EVIDENCE-OF: R-29276-00741 When the locking-mode is set to EXCLUSIVE,
# the database connection never releases file-locks.

R-07178-42569-23822-25165-44123-64804-39149-01193 tcl slt th3 src

The first time the database is read in EXCLUSIVE mode, a shared lock is obtained and held.

th3/req1/pragma04.test:90

/* IMP: R-07178-42569 */
# EVIDENCE-OF: R-07178-42569 The first time the database is read in
# EXCLUSIVE mode, a shared lock is obtained and held.

R-39464-36566-10218-24417-22703-07867-12954-27805 tcl slt th3 src

The first time the database is written, an exclusive lock is obtained and held.

th3/req1/pragma04.test:132

/* IMP: R-39464-36566 */
# EVIDENCE-OF: R-39464-36566 The first time the database is written, an
# exclusive lock is obtained and held.

R-50610-58991-40013-53389-28738-38932-29911-53900 tcl slt th3 src

Database locks obtained by a connection in EXCLUSIVE mode may be released either by closing the database connection, or by setting the locking-mode back to NORMAL using this pragma and then accessing the database file (for read or write).

th3/req1/pragma04.test:148

/* IMP: R-50610-58991 */
# EVIDENCE-OF: R-50610-58991 Database locks obtained by a connection in
# EXCLUSIVE mode may be released either by closing the database
# connection, or by setting the locking-mode back to NORMAL using this
# pragma and then accessing the database file (for read or write).

R-00099-40772-25508-42886-05693-46370-34145-00683 tcl slt th3 src

Simply setting the locking-mode to NORMAL is not enough - locks are not released until the next time the database file is accessed.

th3/req1/pragma04.test:164

/* IMP: R-00099-40772 */
# EVIDENCE-OF: R-00099-40772 Simply setting the locking-mode to NORMAL
# is not enough - locks are not released until the next time the
# database file is accessed.

R-43609-64396-32492-00883-25685-46145-60531-30223 tcl slt th3 src

The application wants to prevent other processes from accessing the database file.

th3/req1/pragma04.test:96

/* IMP: R-43609-64396 */
# EVIDENCE-OF: R-43609-64396 The application wants to prevent other
# processes from accessing the database file.

R-38462-47168-00802-29232-37957-12454-50485-62719 tcl slt th3 src

The number of system calls for filesystem operations is reduced, possibly resulting in a small performance increase.

th3/req1/pragma05.test:97

/* IMP: R-38462-47168 */
# EVIDENCE-OF: R-38462-47168 The number of system calls for filesystem
# operations is reduced, possibly resulting in a small performance
# increase.

R-52075-50256-20099-08079-26279-42286-42612-03538 tcl slt th3 src

WAL databases can be accessed in EXCLUSIVE mode without the use of shared memory.

th3/req1/pragma05.test:128

/* IMP: R-52075-50256 */
# EVIDENCE-OF: R-52075-50256 WAL databases can be accessed in EXCLUSIVE
# mode without the use of shared memory.

R-36370-26473-13900-17379-03927-31715-15091-47108 tcl slt th3 src

When the locking_mode pragma specifies a particular database, for example:

PRAGMA main.locking_mode=EXCLUSIVE;

then the locking mode applies only to the named database.

th3/req1/pragma04.test:197

/* IMP: R-36370-26473 */
# EVIDENCE-OF: R-36370-26473 When the locking_mode pragma specifies a
# particular database, for example: PRAGMA main.locking_mode=EXCLUSIVE;
# then the locking mode applies only to the named database.

R-46677-03283-38607-60635-61745-23618-46045-62138 tcl slt th3 src

If no database name qualifier precedes the "locking_mode" keyword then the locking mode is applied to all databases, including any new databases added by subsequent ATTACH commands.

th3/req1/pragma04.test:236

/* IMP: R-46677-03283 */
# EVIDENCE-OF: R-46677-03283 If no database name qualifier precedes the
# "locking_mode" keyword then the locking mode is applied to all
# databases, including any new databases added by subsequent ATTACH
# commands.

R-05196-58733-44887-26524-08639-58577-62968-38394 tcl slt th3 src

The "temp" database (in which TEMP tables and indices are stored) and in-memory databases always uses exclusive locking mode.

th3/req1/pragma04.test:329

/* IMP: R-05196-58733 */
# EVIDENCE-OF: R-05196-58733 The "temp" database (in which TEMP tables
# and indices are stored) and in-memory databases always uses exclusive
# locking mode.

R-30526-43432-10994-07089-02178-39041-60976-54446 tcl slt th3 src

The locking mode of temp and in-memory databases cannot be changed.

th3/req1/pragma04.test:333

/* IMP: R-30526-43432 */
# EVIDENCE-OF: R-30526-43432 The locking mode of temp and in-memory
# databases cannot be changed.

R-28307-32767-23693-57600-42950-25827-15696-21088 tcl slt th3 src

All other databases use the normal locking mode by default and are affected by this pragma.

th3/req1/pragma04.test:354

/* IMP: R-28307-32767 */
# EVIDENCE-OF: R-28307-32767 All other databases use the normal locking
# mode by default and are affected by this pragma.

R-15629-60483-22088-30931-50587-36197-35177-56236 tcl slt th3 src

If the locking mode is EXCLUSIVE when first entering WAL journal mode, then the locking mode cannot be changed to NORMAL until after exiting WAL journal mode.

th3/req1/pragma05.test:170

/* IMP: R-15629-60483 */
# EVIDENCE-OF: R-15629-60483 If the locking mode is EXCLUSIVE when first
# entering WAL journal mode, then the locking mode cannot be changed to
# NORMAL until after exiting WAL journal mode.

R-52874-10360-37775-63380-13039-47698-21027-19281 tcl slt th3 src

If the locking mode is NORMAL when first entering WAL journal mode, then the locking mode can be changed between NORMAL and EXCLUSIVE and back again at any time and without needing to exit WAL journal mode.

th3/req1/pragma05.test:139

/* IMP: R-52874-10360 */
# EVIDENCE-OF: R-52874-10360 If the locking mode is NORMAL when first
# entering WAL journal mode, then the locking mode can be changed
# between NORMAL and EXCLUSIVE and back again at any time and without
# needing to exit WAL journal mode.

R-48957-47016-25285-15223-13940-44175-60524-56619 tcl slt th3 src

PRAGMA schema.max_page_count;
PRAGMA
schema.max_page_count = N;

Query or set the maximum number of pages in the database file.

th3/req1/pragma12.test:25

/* IMP: R-48957-47016 */
# EVIDENCE-OF: R-48957-47016 PRAGMA schema.max_page_count; PRAGMA
# schema.max_page_count = N; Query or set the maximum number of pages in
# the database file.

R-31839-40105-47825-07965-38954-04263-02531-41060 tcl slt th3 src

Both forms of the pragma return the maximum page count.

th3/req1/pragma12.test:29

/* IMP: R-31839-40105 */
# EVIDENCE-OF: R-31839-40105 Both forms of the pragma return the maximum
# page count.

R-39051-42271-46025-06225-43154-22193-07696-21282 tcl slt th3 src

The second form attempts to modify the maximum page count.

th3/req1/pragma12.test:32

/* IMP: R-39051-42271 */
# EVIDENCE-OF: R-39051-42271 The second form attempts to modify the
# maximum page count.

R-23025-34321-53440-17551-64635-00032-03474-62946 tcl slt th3 src

The maximum page count cannot be reduced below the current database size.

th3/req1/pragma12.test:47

/* IMP: R-23025-34321 */
# EVIDENCE-OF: R-23025-34321 The maximum page count cannot be reduced
# below the current database size.

R-57347-36071-40541-19557-35566-60658-39421-45937 tcl slt th3 src


PRAGMA schema.mmap_size;
PRAGMA
schema.mmap_size=N

Query or change the maximum number of bytes that are set aside for memory-mapped I/O on a single database.

/* IMP: R-57347-36071 */
# EVIDENCE-OF: R-57347-36071 PRAGMA schema.mmap_size; PRAGMA
# schema.mmap_size=N Query or change the maximum number of bytes that
# are set aside for memory-mapped I/O on a single database.

R-08181-17347-07123-49289-35480-05775-37202-24874 tcl slt th3 src

The first form (without an argument) queries the current limit.

/* IMP: R-08181-17347 */
# EVIDENCE-OF: R-08181-17347 The first form (without an argument)
# queries the current limit.

R-01255-31602-49480-12710-05718-10731-47284-31520 tcl slt th3 src

The second form (with a numeric argument) sets the limit for the specified database, or for all databases if the optional database name is omitted.

/* IMP: R-01255-31602 */
# EVIDENCE-OF: R-01255-31602 The second form (with a numeric argument)
# sets the limit for the specified database, or for all databases if the
# optional database name is omitted.

R-08698-00464-45876-62927-50774-10665-22959-52892 tcl slt th3 src

In the second form, if the database name is omitted, the limit that is set becomes the default limit for all databases that are added to the database connection by subsequent ATTACH statements.

/* IMP: R-08698-00464 */
# EVIDENCE-OF: R-08698-00464 In the second form, if the database name is
# omitted, the limit that is set becomes the default limit for all
# databases that are added to the database connection by subsequent
# ATTACH statements.

R-53782-41596-18711-17394-59679-49399-55234-36791 tcl slt th3 src

The argument N is the maximum number of bytes of the database file that will be accessed using memory-mapped I/O.

/* IMP: R-53782-41596 */
# EVIDENCE-OF: R-53782-41596 The argument N is the maximum number of
# bytes of the database file that will be accessed using memory-mapped
# I/O.

R-14451-19951-27480-60238-09584-48372-64711-58964 tcl slt th3 src

If N is zero then memory mapped I/O is disabled.

/* IMP: R-14451-19951 */
# EVIDENCE-OF: R-14451-19951 If N is zero then memory mapped I/O is
# disabled.

R-27289-46867-00795-18230-38785-61782-07002-59582 tcl slt th3 src

If N is negative, then the limit reverts to the default value determined by the most recent sqlite3_config(SQLITE_CONFIG_MMAP_SIZE), or to the compile time default determined by SQLITE_DEFAULT_MMAP_SIZE if not start-time limit has been set.

/* IMP: R-27289-46867 */
# EVIDENCE-OF: R-27289-46867 If N is negative, then the limit reverts to
# the default value determined by the most recent
# sqlite3_config(SQLITE_CONFIG_MMAP_SIZE), or to the compile time
# default determined by SQLITE_DEFAULT_MMAP_SIZE if not start-time limit
# has been set.

R-09711-30533-26237-33578-24208-22217-47498-41477 tcl slt th3 src

PRAGMA module_list;

This pragma returns a list of virtual table modules registered with the database connection.

/* IMP: R-09711-30533 */
# EVIDENCE-OF: R-09711-30533 PRAGMA module_list; This pragma returns a
# list of virtual table modules registered with the database connection.

R-49713-24018-00307-59185-08643-49847-38156-16208 tcl slt th3 src

PRAGMA optimize;
PRAGMA optimize(
MASK);
PRAGMA
schema.optimize;
PRAGMA
schema.optimize(MASK);

Attempt to optimize the database.

/* IMP: R-49713-24018 */
# EVIDENCE-OF: R-49713-24018 PRAGMA optimize; PRAGMA optimize(MASK);
# PRAGMA schema.optimize; PRAGMA schema.optimize(MASK); Attempt to
# optimize the database.

R-27380-17544-22852-64378-45230-22316-25696-47821 tcl slt th3 src

All schemas are optimized in the first two forms, and only the specified schema is optimized in the latter two.

/* IMP: R-27380-17544 */
# EVIDENCE-OF: R-27380-17544 All schemas are optimized in the first two
# forms, and only the specified schema is optimized in the latter two.

R-15672-33611-05081-27963-61291-19773-24542-63496 tcl slt th3 src

PRAGMA schema.page_count;

Return the total number of pages in the database file.

tcl/pragma.test:1504   th3/req1/pragma12.test:13

/* IMP: R-15672-33611 */
# EVIDENCE-OF: R-15672-33611 PRAGMA schema.page_count; Return the total
# number of pages in the database file.

R-36190-27688-09198-02833-32879-47498-11674-13730 tcl slt th3 src

PRAGMA schema.page_size;
PRAGMA
schema.page_size = bytes;

Query or set the page size of the database.

/* IMP: R-36190-27688 */
# EVIDENCE-OF: R-36190-27688 PRAGMA schema.page_size; PRAGMA
# schema.page_size = bytes; Query or set the page size of the database.

R-58424-53543-49718-27899-29509-07852-05490-25692 tcl slt th3 src

The page size must be a power of two between 512 and 65536 inclusive.

/* IMP: R-58424-53543 */
# EVIDENCE-OF: R-58424-53543 The page size must be a power of two
# between 512 and 65536 inclusive.

R-01365-26226-58886-08210-39128-53586-42636-52900 tcl slt th3 src

When a new database is created, SQLite assigns a page size to the database based on platform and filesystem.

/* IMP: R-01365-26226 */
# EVIDENCE-OF: R-01365-26226 When a new database is created, SQLite
# assigns a page size to the database based on platform and filesystem.

R-58393-10545-21271-47622-25351-02846-49007-50648 tcl slt th3 src

Specifying a new page size does not change the page size immediately. Instead, the new page size is remembered and is used to set the page size when the database is first created, if it does not already exist when the page_size pragma is issued, or at the next VACUUM command that is run on the same database connection while not in WAL mode.

/* IMP: R-58393-10545 */
# EVIDENCE-OF: R-58393-10545 Specifying a new page size does not change
# the page size immediately. Instead, the new page size is remembered
# and is used to set the page size when the database is first created,
# if it does not already exist when the page_size pragma is issued, or
# at the next VACUUM command that is run on the same database connection
# while not in WAL mode.

R-64208-53052-48559-48683-00395-47002-65177-30547 tcl slt th3 src

The SQLITE_DEFAULT_PAGE_SIZE compile-time option can be used to change the default page size assigned to new databases.

/* IMP: R-64208-53052 */
# EVIDENCE-OF: R-64208-53052 The SQLITE_DEFAULT_PAGE_SIZE compile-time
# option can be used to change the default page size assigned to new
# databases.

R-13381-51663-43618-16606-57611-35526-29566-64189 tcl slt th3 src

PRAGMA pragma_list;

This pragma returns a list of PRAGMA commands known to the database connection.

/* IMP: R-13381-51663 */
# EVIDENCE-OF: R-13381-51663 PRAGMA pragma_list; This pragma returns a
# list of PRAGMA commands known to the database connection.

R-63124-28591-54682-33320-59572-27756-28507-16643 tcl slt th3 src

The pragma is like integrity_check except that it does not verify UNIQUE constraints and does not verify that index content matches table content.

/* IMP: R-63124-28591 */
# EVIDENCE-OF: R-63124-28591 The pragma is like integrity_check except
# that it does not verify UNIQUE constraints and does not verify that
# index content matches table content.

R-52129-08912-02677-16711-14942-51135-37066-54539 tcl slt th3 src

Otherwise the two pragmas are the same.

/* IMP: R-52129-08912 */
# EVIDENCE-OF: R-52129-08912 Otherwise the two pragmas are the same.

R-15997-27576-09912-47070-23601-24983-46411-48984 tcl slt th3 src

PRAGMA read_uncommitted;
PRAGMA read_uncommitted =
boolean;

Query, set, or clear READ UNCOMMITTED isolation.

/* IMP: R-15997-27576 */
# EVIDENCE-OF: R-15997-27576 PRAGMA read_uncommitted; PRAGMA
# read_uncommitted = boolean; Query, set, or clear READ UNCOMMITTED
# isolation.

R-13547-45635-56676-46930-62295-21423-36076-50678 tcl slt th3 src

The default isolation level for SQLite is SERIALIZABLE.

/* IMP: R-13547-45635 */
# EVIDENCE-OF: R-13547-45635 The default isolation level for SQLite is
# SERIALIZABLE.

R-43230-40115-50366-23982-20450-64068-63336-08552 tcl slt th3 src

Any process or thread can select READ UNCOMMITTED isolation, but SERIALIZABLE will still be used except between connections that share a common page and schema cache.

/* IMP: R-43230-40115 */
# EVIDENCE-OF: R-43230-40115 Any process or thread can select READ
# UNCOMMITTED isolation, but SERIALIZABLE will still be used except
# between connections that share a common page and schema cache.

R-14195-12074-64677-06793-17072-43123-33020-17925 tcl slt th3 src

PRAGMA recursive_triggers;
PRAGMA recursive_triggers =
boolean;

Query, set, or clear the recursive trigger capability.

/* IMP: R-14195-12074 */
# EVIDENCE-OF: R-14195-12074 PRAGMA recursive_triggers; PRAGMA
# recursive_triggers = boolean; Query, set, or clear the recursive
# trigger capability.

R-55422-28457-57897-11786-10838-58259-25547-52567 tcl slt th3 src

Changing the recursive_triggers setting affects the execution of all statements prepared using the database connection, including those prepared before the setting was changed.

/* IMP: R-55422-28457 */
# EVIDENCE-OF: R-55422-28457 Changing the recursive_triggers setting
# affects the execution of all statements prepared using the database
# connection, including those prepared before the setting was changed.

R-44241-31306-56883-60998-04220-09447-33322-42012 tcl slt th3 src

Any existing statements prepared using the legacy sqlite3_prepare() interface may fail with an SQLITE_SCHEMA error after the recursive_triggers setting is changed.

/* IMP: R-44241-31306 */
# EVIDENCE-OF: R-44241-31306 Any existing statements prepared using the
# legacy sqlite3_prepare() interface may fail with an SQLITE_SCHEMA
# error after the recursive_triggers setting is changed.

R-10284-11658-30925-56941-44506-24940-01613-45379 tcl slt th3 src

The depth of recursion for triggers has a hard upper limit set by the SQLITE_MAX_TRIGGER_DEPTH compile-time option and a run-time limit set by sqlite3_limit(db,SQLITE_LIMIT_TRIGGER_DEPTH,...).

/* IMP: R-10284-11658 */
# EVIDENCE-OF: R-10284-11658 The depth of recursion for triggers has a
# hard upper limit set by the SQLITE_MAX_TRIGGER_DEPTH compile-time
# option and a run-time limit set by
# sqlite3_limit(db,SQLITE_LIMIT_TRIGGER_DEPTH,...).

R-10260-62465-16896-41827-00033-64414-58979-23233 tcl slt th3 src

PRAGMA reverse_unordered_selects;
PRAGMA reverse_unordered_selects =
boolean;

th3/req1/pragma27.test:10

/* IMP: R-10260-62465 */
# EVIDENCE-OF: R-10260-62465 PRAGMA reverse_unordered_selects; PRAGMA
# reverse_unordered_selects = boolean;

R-01669-33464-29023-56990-09830-45167-30109-01082 tcl slt th3 src

When enabled, this PRAGMA causes many SELECT statements without an ORDER BY clause to emit their results in the reverse order from what they normally would.

th3/req1/pragma27.test:13

/* IMP: R-01669-33464 */
# EVIDENCE-OF: R-01669-33464 When enabled, this PRAGMA causes many
# SELECT statements without an ORDER BY clause to emit their results in
# the reverse order from what they normally would.

R-56910-04118-27168-31313-21595-13844-47285-28502 tcl slt th3 src

The reverse_unordered_selects pragma works for most SELECT statements, however the query planner may sometimes choose an algorithm that is not easily reversed, in which case the output will appear in the same order regardless of the reverse_unordered_selects setting.

th3/req1/pragma27.test:30

/* IMP: R-56910-04118 */
# EVIDENCE-OF: R-56910-04118 The reverse_unordered_selects pragma works
# for most SELECT statements, however the query planner may sometimes
# choose an algorithm that is not easily reversed, in which case the
# output will appear in the same order regardless of the
# reverse_unordered_selects setting.

R-04985-23577-44603-16684-59773-10654-23647-01316 tcl slt th3 src

The schema_version pragma will get or set the value of the schema-version integer at offset 40 in the database header.

th3/req1/pragma28.test:35

/* IMP: R-04985-23577 */
# EVIDENCE-OF: R-04985-23577 The schema_version pragma will get or set
# the value of the schema-version integer at offset 40 in the database
# header.

R-34230-56049-07873-23044-54462-14755-43207-20479 tcl slt th3 src

SQLite automatically increments the schema-version whenever the schema changes.

src/build.c:2048   th3/req1/pragma28.test:49   th3/req1/pragma28.test:89

/* IMP: R-34230-56049 */
# EVIDENCE-OF: R-34230-56049 SQLite automatically increments the
# schema-version whenever the schema changes.

R-03189-51135-06714-56467-07556-62916-33702-61870 tcl slt th3 src

As each SQL statement runs, the schema version is checked to ensure that the schema has not changed since the SQL statement was prepared.

src/vdbe.c:3958   th3/req1/pragma28.test:85

/* IMP: R-03189-51135 */
# EVIDENCE-OF: R-03189-51135 As each SQL statement runs, the schema
# version is checked to ensure that the schema has not changed since the
# SQL statement was prepared.

R-61095-64052-59910-44043-27756-28387-34455-40099 tcl slt th3 src

Subverting this mechanism by using "PRAGMA schema_version=N" to change the value of the schema_version may cause SQL statement to run using an obsolete schema, which can lead to incorrect answers and/or database corruption.

th3/req1/pragma28.test:108

/* IMP: R-61095-64052 */
# EVIDENCE-OF: R-61095-64052 Subverting this mechanism by using "PRAGMA
# schema_version=N" to change the value of the schema_version may cause
# SQL statement to run using an obsolete schema, which can lead to
# incorrect answers and/or database corruption.

R-37394-17492-49473-10319-52468-07209-31067-52433 tcl slt th3 src

For this reason, attempts to change the value of schema_version are a silent no-op when defensive mode is enabled for a database connection.

th3/cov1/pragma12.test:91

/* IMP: R-37394-17492 */
# EVIDENCE-OF: R-37394-17492 For this reason, attempts to change the
# value of schema_version are a silent no-op when defensive mode is
# enabled for a database connection.

R-32342-15392-01527-34070-05408-45314-06867-01459 tcl slt th3 src

For the purposes of this pragma, the VACUUM command is considered a schema change, since VACUUM will usually alter the "rootpage" values for entries in the sqlite_schema table.

th3/req1/pragma28.test:75

/* IMP: R-32342-15392 */
# EVIDENCE-OF: R-32342-15392 For the purposes of this pragma, the VACUUM
# command is considered a schema change, since VACUUM will usually alter
# the "rootpage" values for entries in the sqlite_schema table.

R-41129-04825-55392-49717-44063-44499-04205-01374 tcl slt th3 src

PRAGMA schema.secure_delete;
PRAGMA
schema.secure_delete = boolean|FAST

Query or change the secure-delete setting.

th3/cov1/pragma20.test:10   th3/cov1/pragma21.test:11

/* IMP: R-41129-04825 */
# EVIDENCE-OF: R-41129-04825 PRAGMA schema.secure_delete; PRAGMA
# schema.secure_delete = boolean|FAST Query or change the secure-delete
# setting.

R-26512-02966-03467-49127-26389-10088-58457-04547 tcl slt th3 src

When secure_delete is on, SQLite overwrites deleted content with zeros.

th3/cov1/pragma20.test:51

/* IMP: R-26512-02966 */
# EVIDENCE-OF: R-26512-02966 When secure_delete is on, SQLite overwrites
# deleted content with zeros.

R-65080-38137-04546-49301-16311-04630-53630-13035 tcl slt th3 src

The default setting for secure_delete is determined by the SQLITE_SECURE_DELETE compile-time option and is normally off.

th3/cov1/pragma20.test:107   th3/cov1/pragma21.test:60

/* IMP: R-65080-38137 */
# EVIDENCE-OF: R-65080-38137 The default setting for secure_delete is
# determined by the SQLITE_SECURE_DELETE compile-time option and is
# normally off.

R-43448-12354-12620-62746-36446-48855-45456-57112 tcl slt th3 src

When there are attached databases and no database is specified in the pragma, all databases have their secure-delete setting altered.

th3/cov1/pragma20.test:122   th3/cov1/pragma21.test:75

/* IMP: R-43448-12354 */
# EVIDENCE-OF: R-43448-12354 When there are attached databases and no
# database is specified in the pragma, all databases have their
# secure-delete setting altered.

R-36620-34941-18970-44416-30193-42757-18271-60128 tcl slt th3 src

The secure-delete setting for newly attached databases is the setting of the main database at the time the ATTACH command is evaluated.

th3/cov1/pragma20.test:145   th3/cov1/pragma21.test:98

/* IMP: R-36620-34941 */
# EVIDENCE-OF: R-36620-34941 The secure-delete setting for newly
# attached databases is the setting of the main database at the time the
# ATTACH command is evaluated.

R-15326-32258-55998-27349-46389-10665-40357-65139 tcl slt th3 src

When multiple database connections share the same cache, changing the secure-delete flag on one database connection changes it for them all.

th3/cov1/pragma21.test:119

/* IMP: R-15326-32258 */
# EVIDENCE-OF: R-15326-32258 When multiple database connections share
# the same cache, changing the secure-delete flag on one database
# connection changes it for them all.

R-23445-46109-37360-43495-15091-19372-04158-40881 tcl slt th3 src

This pragma causes the database connection on which it is invoked to free up as much memory as it can, by calling sqlite3_db_release_memory().

src/pragma.c:2293

/* IMP: R-23445-46109 */
# EVIDENCE-OF: R-23445-46109 This pragma causes the database connection
# on which it is invoked to free up as much memory as it can, by calling
# sqlite3_db_release_memory().

R-26343-45930-10507-06945-56497-65367-59680-35735 tcl slt th3 src

This pragma invokes the sqlite3_soft_heap_limit64() interface with the argument N, if N is specified and is a non-negative integer.

src/pragma.c:2437   tcl/softheap1.test:27

/* IMP: R-26343-45930 */
# EVIDENCE-OF: R-26343-45930 This pragma invokes the
# sqlite3_soft_heap_limit64() interface with the argument N, if N is
# specified and is a non-negative integer.

R-64451-07163-52994-32419-24914-21127-60728-58807 tcl slt th3 src

The soft_heap_limit pragma always returns the same integer that would be returned by the sqlite3_soft_heap_limit64(-1) C-language function.

src/pragma.c:2440   tcl/softheap1.test:31

/* IMP: R-64451-07163 */
# EVIDENCE-OF: R-64451-07163 The soft_heap_limit pragma always returns
# the same integer that would be returned by the
# sqlite3_soft_heap_limit64(-1) C-language function.

R-02545-26933-18999-48013-24665-54880-01582-10256 tcl slt th3 src

PRAGMA stats;

th3/cov1/index02.test:134

/* IMP: R-02545-26933 */
# EVIDENCE-OF: R-02545-26933 PRAGMA stats;

R-51288-13280-04102-45116-03468-31022-16818-18887 tcl slt th3 src

PRAGMA schema.synchronous;
PRAGMA
schema.synchronous = 0 | OFF | 1 | NORMAL | 2 | FULL | 3 | EXTRA;

Query or change the setting of the "synchronous" flag.

/* IMP: R-51288-13280 */
# EVIDENCE-OF: R-51288-13280 PRAGMA schema.synchronous; PRAGMA
# schema.synchronous = 0 | OFF | 1 | NORMAL | 2 | FULL | 3 | EXTRA;
# Query or change the setting of the "synchronous" flag.

R-41050-23052-29095-23436-46083-00331-23025-31647 tcl slt th3 src

The first (query) form will return the synchronous setting as an integer.

/* IMP: R-41050-23052 */
# EVIDENCE-OF: R-41050-23052 The first (query) form will return the
# synchronous setting as an integer.

R-18023-38297-26646-57171-09733-60965-00209-38549 tcl slt th3 src

EXTRA synchronous is like FULL with the addition that the directory containing a rollback journal is synced after that journal is unlinked to commit a transaction in DELETE mode.

/* IMP: R-18023-38297 */
# EVIDENCE-OF: R-18023-38297 EXTRA synchronous is like FULL with the
# addition that the directory containing a rollback journal is synced
# after that journal is unlinked to commit a transaction in DELETE mode.

R-52949-04679-63640-64673-56558-51308-22602-53102 tcl slt th3 src

When synchronous is FULL (2), the SQLite database engine will use the xSync method of the VFS to ensure that all content is safely written to the disk surface prior to continuing.

/* IMP: R-52949-04679 */
# EVIDENCE-OF: R-52949-04679 When synchronous is FULL (2), the SQLite
# database engine will use the xSync method of the VFS to ensure that
# all content is safely written to the disk surface prior to continuing.

R-05646-15132-11020-10123-43884-18508-24247-46472 tcl slt th3 src

When synchronous is NORMAL (1), the SQLite database engine will still sync at the most critical moments, but less often than in FULL mode.

/* IMP: R-05646-15132 */
# EVIDENCE-OF: R-05646-15132 When synchronous is NORMAL (1), the SQLite
# database engine will still sync at the most critical moments, but less
# often than in FULL mode.

R-18846-05946-40974-48701-32199-53032-10077-35779 tcl slt th3 src

With synchronous OFF (0), SQLite continues without syncing as soon as it has handed data off to the operating system.

/* IMP: R-18846-05946 */
# EVIDENCE-OF: R-18846-05946 With synchronous OFF (0), SQLite continues
# without syncing as soon as it has handed data off to the operating
# system.

R-50747-49923-21483-58514-27398-43836-46861-05011 tcl slt th3 src

In WAL mode when synchronous is NORMAL (1), the WAL file is synchronized before each checkpoint and the database file is synchronized after each completed checkpoint and the WAL file header is synchronized when a WAL file begins to be reused after a checkpoint, but no sync operations occur during most transactions.

/* IMP: R-50747-49923 */
# EVIDENCE-OF: R-50747-49923 In WAL mode when synchronous is NORMAL (1),
# the WAL file is synchronized before each checkpoint and the database
# file is synchronized after each completed checkpoint and the WAL file
# header is synchronized when a WAL file begins to be reused after a
# checkpoint, but no sync operations occur during most transactions.

R-11549-19921-03928-49162-57832-06313-31858-02375 tcl slt th3 src

With synchronous=FULL in WAL mode, an additional sync operation of the WAL file happens after each transaction commit.

/* IMP: R-11549-19921 */
# EVIDENCE-OF: R-11549-19921 With synchronous=FULL in WAL mode, an
# additional sync operation of the WAL file happens after each
# transaction commit.

R-58425-30487-64888-60990-28368-26086-41233-31997 tcl slt th3 src

PRAGMA schema.table_info(table-name);

This pragma returns one row for each normal column in the named table.

th3/req1/pragma15.test:121

/* IMP: R-58425-30487 */
# EVIDENCE-OF: R-58425-30487 PRAGMA schema.table_info(table-name); This
# pragma returns one row for each normal column in the named table.

R-18626-02544-16999-06814-32702-16026-07475-11297 tcl slt th3 src

Columns in the result set include: "name" (its name); "type" (data type if given, else ''); "notnull" (whether or not the column can be NULL); "dflt_value" (the default value for the column); and "pk" (either zero for columns that are not part of the primary key, or the 1-based index of the column within the primary key).

th3/req1/pragma15.test:124

/* IMP: R-18626-02544 */
# EVIDENCE-OF: R-18626-02544 Columns in the result set include: "name"
# (its name); "type" (data type if given, else ''); "notnull" (whether
# or not the column can be NULL); "dflt_value" (the default value for
# the column); and "pk" (either zero for columns that are not part of
# the primary key, or the 1-based index of the column within the primary
# key).

R-47374-62206-25437-62669-05844-08921-64095-55884 tcl slt th3 src

The "cid" column should not be taken to mean more than "rank within the current result set".

/* IMP: R-47374-62206 */
# EVIDENCE-OF: R-47374-62206 The "cid" column should not be taken to
# mean more than "rank within the current result set".

R-35224-32827-55933-44478-17553-06933-55583-57822 tcl slt th3 src

The table named in the table_info pragma can also be a view.

/* IMP: R-35224-32827 */
# EVIDENCE-OF: R-35224-32827 The table named in the table_info pragma
# can also be a view.

R-25104-48225-19091-14145-56675-46526-40431-27704 tcl slt th3 src

PRAGMA table_list;
PRAGMA
schema.table_list;
PRAGMA table_list(
table-name);

th3/cov1/pragma30.test:10

/* IMP: R-25104-48225 */
# EVIDENCE-OF: R-25104-48225 PRAGMA table_list; PRAGMA
# schema.table_list; PRAGMA table_list(table-name);

R-64605-35184-01138-49428-61932-51728-21145-21694 tcl slt th3 src

This pragma returns information about the tables and views in the schema, one table per row of output.

th3/cov1/pragma30.test:26

/* IMP: R-64605-35184 */
# EVIDENCE-OF: R-64605-35184 This pragma returns information about the
# tables and views in the schema, one table per row of output.

R-47688-12400-24635-20697-59785-15322-38040-02905 tcl slt th3 src

schema: the schema in which the table or view appears (for example "main" or "temp").

th3/cov1/pragma30.test:29

/* IMP: R-47688-12400 */
# EVIDENCE-OF: R-47688-12400 schema: the schema in which the table or
# view appears (for example "main" or "temp").

R-01476-65268-29904-09518-33798-08842-57956-04141 tcl slt th3 src

name: the name of the table or view.

th3/cov1/pragma30.test:32

/* IMP: R-01476-65268 */
# EVIDENCE-OF: R-01476-65268 name: the name of the table or view.

R-06243-18128-07233-40060-03685-38189-10986-27525 tcl slt th3 src

type: the type of object - one of "table", "view", "shadow" (for shadow tables), or "virtual" for virtual tables.

th3/cov1/pragma30.test:34

/* IMP: R-06243-18128 */
# EVIDENCE-OF: R-06243-18128 type: the type of object - one of "table",
# "view", "shadow" (for shadow tables), or "virtual" for virtual tables.

R-56498-08746-01778-64119-24503-60496-01262-20715 tcl slt th3 src

ncol: the number of columns in the table, including generated columns and hidden columns.

th3/cov1/pragma30.test:37

/* IMP: R-56498-08746 */
# EVIDENCE-OF: R-56498-08746 ncol: the number of columns in the table,
# including generated columns and hidden columns.

R-41844-39914-25907-17067-52318-47550-49786-01710 tcl slt th3 src

wr: 1 if the table is a WITHOUT ROWID table or 0 if is not.

th3/cov1/pragma30.test:40

/* IMP: R-41844-39914 */
# EVIDENCE-OF: R-41844-39914 wr: 1 if the table is a WITHOUT ROWID table
# or 0 if is not.

R-04408-33575-11489-29916-52648-61638-42382-13069 tcl slt th3 src

strict: 1 if the table is a STRICT table or 0 if it is not.

th3/cov1/pragma30.test:43

/* IMP: R-04408-33575 */
# EVIDENCE-OF: R-04408-33575 strict: 1 if the table is a STRICT table or
# 0 if it is not.

R-50131-31524-20441-42950-32072-08480-18169-31602 tcl slt th3 src

The default behavior is to show all tables in all schemas.

th3/cov1/pragma30.test:46

/* IMP: R-50131-31524 */
# EVIDENCE-OF: R-50131-31524 The default behavior is to show all tables
# in all schemas.

R-17459-35869-64710-40623-30328-29665-02946-35693 tcl slt th3 src

If the schema. name appears before the pragma, then only tables in that one schema are shown.

th3/cov1/pragma30.test:68

/* IMP: R-17459-35869 */
# EVIDENCE-OF: R-17459-35869 If the schema. name appears before the
# pragma, then only tables in that one schema are shown.

R-37687-21505-22371-30401-23060-65345-45987-08312 tcl slt th3 src

If a table-name argument is supplied, then only information about that one table is returned.

th3/cov1/pragma30.test:81

/* IMP: R-37687-21505 */
# EVIDENCE-OF: R-37687-21505 If a table-name argument is supplied, then
# only information about that one table is returned.

R-53903-19135-58886-00685-59827-03617-13635-37528 tcl slt th3 src

PRAGMA schema.table_xinfo(table-name);

This pragma returns one row for each column in the named table, including generated columns and hidden columns. ^The output has the same columns as for PRAGMA table_info plus a column, "hidden", whose value signifies a normal column (0), a dynamic or stored generated column (2 or 3), or a hidden column in a virtual table (1). The rows for which this field is non-zero are those omitted for PRAGMA table_info. PRAGMA temp_store


^(PRAGMA temp_store;
PRAGMA temp_store =
0 | DEFAULT | 1 | FILE | 2 | MEMORY;

Query or change the setting of the "temp_store" parameter.

/* IMP: R-53903-19135 */
# EVIDENCE-OF: R-53903-19135 PRAGMA schema.table_xinfo(table-name); This
# pragma returns one row for each column in the named table, including
# generated columns and hidden columns. ^The output has the same columns
# as for PRAGMA table_info plus a column, "hidden", whose value
# signifies a normal column (0), a dynamic or stored generated column (2
# or 3), or a hidden column in a virtual table (1). The rows for which
# this field is non-zero are those omitted for PRAGMA table_info. PRAGMA
# temp_store ^(PRAGMA temp_store; PRAGMA temp_store = 0 | DEFAULT | 1 |
# FILE | 2 | MEMORY; Query or change the setting of the "temp_store"
# parameter.

R-41435-15049-20553-57196-01541-07225-45251-60631 tcl slt th3 src

When temp_store is DEFAULT (0), the compile-time C preprocessor macro SQLITE_TEMP_STORE is used to determine where temporary tables and indices are stored.

/* IMP: R-41435-15049 */
# EVIDENCE-OF: R-41435-15049 When temp_store is DEFAULT (0), the
# compile-time C preprocessor macro SQLITE_TEMP_STORE is used to
# determine where temporary tables and indices are stored.

R-03927-05794-15006-18553-14579-16403-31114-06185 tcl slt th3 src

When temp_store is MEMORY (2) temporary tables and indices are kept as if they were in pure in-memory databases.

/* IMP: R-03927-05794 */
# EVIDENCE-OF: R-03927-05794 When temp_store is MEMORY (2) temporary
# tables and indices are kept as if they were in pure in-memory
# databases.

R-60292-04128-28566-07483-18233-58006-62395-18068 tcl slt th3 src

When temp_store is FILE (1) temporary tables and indices are stored in a file.

/* IMP: R-60292-04128 */
# EVIDENCE-OF: R-60292-04128 When temp_store is FILE (1) temporary
# tables and indices are stored in a file.

R-64488-01207-41542-36370-36584-38548-35733-59275 tcl slt th3 src

The temp_store_directory pragma can be used to specify the directory containing temporary files when FILE is specified.

/* IMP: R-64488-01207 */
# EVIDENCE-OF: R-64488-01207 The temp_store_directory pragma can be used
# to specify the directory containing temporary files when FILE is
# specified.

R-28465-35432-54989-58142-09664-10793-19950-25889 tcl slt th3 src

When the temp_store setting is changed, all existing temporary tables, indices, triggers, and views are immediately deleted.

/* IMP: R-28465-35432 */
# EVIDENCE-OF: R-28465-35432 When the temp_store setting is changed, all
# existing temporary tables, indices, triggers, and views are
# immediately deleted.

R-26406-03647-33657-03652-13422-62298-62842-50282 tcl slt th3 src

It is possible for the library compile-time C preprocessor symbol SQLITE_TEMP_STORE to override this pragma setting.

/* IMP: R-26406-03647 */
# EVIDENCE-OF: R-26406-03647 It is possible for the library compile-time
# C preprocessor symbol SQLITE_TEMP_STORE to override this pragma
# setting.

R-33570-18895-27619-21793-53436-58897-32599-21994 tcl slt th3 src

The following table summarizes the interaction of the SQLITE_TEMP_STORE preprocessor macro and the temp_store pragma:

SQLITE_TEMP_STORE PRAGMA
temp_store
Storage used for
TEMP tables and indices
0 any file
1 0 file
1 1 file
1 2 memory
2 0 memory
2 1 file
2 2 memory
3 any memory

/* IMP: R-33570-18895 */
# EVIDENCE-OF: R-33570-18895 The following table summarizes the
# interaction of the SQLITE_TEMP_STORE preprocessor macro and the
# temp_store pragma: SQLITE_TEMP_STORE PRAGMAtemp_store Storage used
# forTEMP tables and indices 0 any file 1 0 file 1 1 file 1 2 memory 2 0
# memory 2 1 file 2 2 memory 3 any memory

R-13589-35647-28651-60437-43307-35330-17084-47057 tcl slt th3 src

The user_version pragma will get or set the value of the user-version integer at offset 60 in the database header.

th3/req1/pragma28.test:10

/* IMP: R-13589-35647 */
# EVIDENCE-OF: R-13589-35647 The user_version pragma will get or set the
# value of the user-version integer at offset 60 in the database header.

R-41970-42722-40683-07259-21331-17616-49232-32709 tcl slt th3 src

This pragma queries or sets the write-ahead log auto-checkpoint interval.

/* IMP: R-41970-42722 */
# EVIDENCE-OF: R-41970-42722 This pragma queries or sets the write-ahead
# log auto-checkpoint interval.

R-56511-46089-40273-37812-64837-44245-01436-05433 tcl slt th3 src

When the write-ahead log is enabled (via the journal_mode pragma) a checkpoint will be run automatically whenever the write-ahead log equals or exceeds N pages in length.

/* IMP: R-56511-46089 */
# EVIDENCE-OF: R-56511-46089 When the write-ahead log is enabled (via
# the journal_mode pragma) a checkpoint will be run automatically
# whenever the write-ahead log equals or exceeds N pages in length.

R-48730-20169-40246-20306-06910-57968-05795-57037 tcl slt th3 src

Setting the auto-checkpoint size to zero or a negative value turns auto-checkpointing off.

/* IMP: R-48730-20169 */
# EVIDENCE-OF: R-48730-20169 Setting the auto-checkpoint size to zero or
# a negative value turns auto-checkpointing off.

R-19785-02834-31233-04888-56980-35561-24739-27802 tcl slt th3 src

This pragma is a wrapper around the sqlite3_wal_autocheckpoint() C interface.

/* IMP: R-19785-02834 */
# EVIDENCE-OF: R-19785-02834 This pragma is a wrapper around the
# sqlite3_wal_autocheckpoint() C interface.

R-30195-08968-16924-33658-13499-65099-07965-35563 tcl slt th3 src

All automatic checkpoints are PASSIVE.

/* IMP: R-30195-08968 */
# EVIDENCE-OF: R-30195-08968 All automatic checkpoints are PASSIVE.

R-41040-47502-07753-07518-58818-60449-29305-32446 tcl slt th3 src

Autocheckpointing is enabled by default with an interval of 1000 or SQLITE_DEFAULT_WAL_AUTOCHECKPOINT.

/* IMP: R-41040-47502 */
# EVIDENCE-OF: R-41040-47502 Autocheckpointing is enabled by default
# with an interval of 1000 or SQLITE_DEFAULT_WAL_AUTOCHECKPOINT.

R-64021-07698-52025-10986-56394-35084-34302-37940 tcl slt th3 src

If the write-ahead log is enabled (via the journal_mode pragma), this pragma causes a checkpoint operation to run on database database, or on all attached databases if database is omitted.

/* IMP: R-64021-07698 */
# EVIDENCE-OF: R-64021-07698 If the write-ahead log is enabled (via the
# journal_mode pragma), this pragma causes a checkpoint operation to run
# on database database, or on all attached databases if database is
# omitted.

R-14350-06824-15886-23716-53356-08607-64991-22845 tcl slt th3 src

If write-ahead log mode is disabled, this pragma is a harmless no-op.

th3/req1/pragma29.test:15

/* IMP: R-14350-06824 */
# EVIDENCE-OF: R-14350-06824 If write-ahead log mode is disabled, this
# pragma is a harmless no-op.

R-64531-59395-59522-15917-19627-46695-59010-51244 tcl slt th3 src

Invoking this pragma without an argument is equivalent to calling the sqlite3_wal_checkpoint() C interface.

th3/req1/checkpoint01.test:295

/* IMP: R-64531-59395 */
# EVIDENCE-OF: R-64531-59395 Invoking this pragma without an argument is
# equivalent to calling the sqlite3_wal_checkpoint() C interface.

R-47175-52442-38801-17858-62181-59243-23138-32376 tcl slt th3 src

Invoking this pragma with an argument is equivalent to calling the sqlite3_wal_checkpoint_v2() C interface with a 3rd parameter corresponding to the argument:

th3/req1/checkpoint01.test:238

/* IMP: R-47175-52442 */
# EVIDENCE-OF: R-47175-52442 Invoking this pragma with an argument is
# equivalent to calling the sqlite3_wal_checkpoint_v2() C interface with
# a 3rd parameter corresponding to the argument:

R-30105-58549-25183-38919-44198-38701-12397-38507 tcl slt th3 src

PASSIVE Checkpoint as many frames as possible without waiting for any database readers or writers to finish. Sync the db file if all frames in the log are checkpointed.

th3/req1/checkpoint01.test:226

/* IMP: R-30105-58549 */
# EVIDENCE-OF: R-30105-58549 PASSIVE Checkpoint as many frames as
# possible without waiting for any database readers or writers to
# finish. Sync the db file if all frames in the log are checkpointed.

R-45162-11578-30985-60631-31894-17735-12127-52197 tcl slt th3 src

This mode is the same as calling the sqlite3_wal_checkpoint() C interface.

th3/req1/checkpoint01.test:273

/* IMP: R-45162-11578 */
# EVIDENCE-OF: R-45162-11578 This mode is the same as calling the
# sqlite3_wal_checkpoint() C interface.

R-17186-50053-08160-14434-65470-31031-28806-57680 tcl slt th3 src

The busy-handler callback is never invoked in this mode.

th3/req1/checkpoint01.test:220

/* IMP: R-17186-50053 */
# EVIDENCE-OF: R-17186-50053 The busy-handler callback is never invoked
# in this mode.

R-11553-06434-51801-18684-33273-42427-03932-31278 tcl slt th3 src

FULL This mode blocks (invokes the busy-handler callback) until there is no database writer and all readers are reading from the most recent database snapshot. It then checkpoints all frames in the log file and syncs the database file.

th3/req1/checkpoint01.test:347

/* IMP: R-11553-06434 */
# EVIDENCE-OF: R-11553-06434 FULL This mode blocks (invokes the
# busy-handler callback) until there is no database writer and all
# readers are reading from the most recent database snapshot. It then
# checkpoints all frames in the log file and syncs the database file.

R-29747-05924-20663-28243-45594-47687-47105-58596 tcl slt th3 src

FULL blocks concurrent writers while it is running, but readers can proceed.

/* IMP: R-29747-05924 */
# EVIDENCE-OF: R-29747-05924 FULL blocks concurrent writers while it is
# running, but readers can proceed.

R-24306-14960-36438-04276-35826-43147-57622-43704 tcl slt th3 src

RESTART This mode works the same way as FULL with the addition that after checkpointing the log file it blocks (calls the busy-handler callback) until all readers are finished with the log file.

th3/req1/checkpoint01.test:399

/* IMP: R-24306-14960 */
# EVIDENCE-OF: R-24306-14960 RESTART This mode works the same way as
# FULL with the addition that after checkpointing the log file it blocks
# (calls the busy-handler callback) until all readers are finished with
# the log file.

R-42024-63312-61234-05516-46921-52814-12711-65369 tcl slt th3 src

RESTART blocks concurrent writers while it is running, but allowed readers to proceed.

/* IMP: R-42024-63312 */
# EVIDENCE-OF: R-42024-63312 RESTART blocks concurrent writers while it
# is running, but allowed readers to proceed.

R-09155-31313-04558-40761-11557-49623-19488-24497 tcl slt th3 src

TRUNCATE This mode works the same way as RESTART with the addition that the WAL file is truncated to zero bytes upon successful completion.

th3/req1/checkpoint01.test:455

/* IMP: R-09155-31313 */
# EVIDENCE-OF: R-09155-31313 TRUNCATE This mode works the same way as
# RESTART with the addition that the WAL file is truncated to zero bytes
# upon successful completion.

R-21320-14810-43799-05408-58279-13675-12785-56952 tcl slt th3 src

The wal_checkpoint pragma returns a single row with three integer columns.

th3/req1/pragma29.test:18

/* IMP: R-21320-14810 */
# EVIDENCE-OF: R-21320-14810 The wal_checkpoint pragma returns a single
# row with three integer columns.

R-40779-12285-51949-10144-43789-15381-05710-53892 tcl slt th3 src

The first column is usually 0 but will be 1 if a RESTART or FULL or TRUNCATE checkpoint was blocked from completing, for example because another thread or process was actively using the database.

th3/req1/pragma29.test:31

/* IMP: R-40779-12285 */
# EVIDENCE-OF: R-40779-12285 The first column is usually 0 but will be 1
# if a RESTART or FULL or TRUNCATE checkpoint was blocked from
# completing, for example because another thread or process was actively
# using the database.

R-39544-28997-13653-57291-53593-51283-21786-51117 tcl slt th3 src

In other words, the first column is 0 if the equivalent call to sqlite3_wal_checkpoint_v2() would have returned SQLITE_OK or 1 if the equivalent call would have returned SQLITE_BUSY.

/* IMP: R-39544-28997 */
# EVIDENCE-OF: R-39544-28997 In other words, the first column is 0 if
# the equivalent call to sqlite3_wal_checkpoint_v2() would have returned
# SQLITE_OK or 1 if the equivalent call would have returned SQLITE_BUSY.

R-08680-42661-24971-27030-06181-52917-24320-47746 tcl slt th3 src

The second column is the number of modified pages that have been written to the write-ahead log file.

/* IMP: R-08680-42661 */
# EVIDENCE-OF: R-08680-42661 The second column is the number of modified
# pages that have been written to the write-ahead log file.

R-33490-49513-63336-09770-17828-12612-45403-52100 tcl slt th3 src

The third column is the number of pages in the write-ahead log file that have been successfully moved back into the database file at the conclusion of the checkpoint.

/* IMP: R-33490-49513 */
# EVIDENCE-OF: R-33490-49513 The third column is the number of pages in
# the write-ahead log file that have been successfully moved back into
# the database file at the conclusion of the checkpoint.

R-26335-36429-33832-38639-19447-31976-61151-28783 tcl slt th3 src

The second and third column are -1 if there is no write-ahead log, for example if this pragma is invoked on a database connection that is not in WAL mode.

th3/req1/pragma29.test:21

/* IMP: R-26335-36429 */
# EVIDENCE-OF: R-26335-36429 The second and third column are -1 if there
# is no write-ahead log, for example if this pragma is invoked on a
# database connection that is not in WAL mode.

R-47025-34765-08212-39437-51775-13790-00552-20287 tcl slt th3 src

PRAGMA writable_schema = boolean;
PRAGMA writable_schema = RESET

When this pragma is on, and the SQLITE_DBCONFIG_DEFENSIVE flag is off, then the sqlite_schema table can be changed using ordinary UPDATE, INSERT, and DELETE statements.

th3/req1/pragma30.test:18

/* IMP: R-47025-34765 */
# EVIDENCE-OF: R-47025-34765 PRAGMA writable_schema = boolean; PRAGMA
# writable_schema = RESET When this pragma is on, and the
# SQLITE_DBCONFIG_DEFENSIVE flag is off, then the sqlite_schema table
# can be changed using ordinary UPDATE, INSERT, and DELETE statements.

R-60817-01178-46366-05638-56603-60779-33180-29788 tcl slt th3 src

If the argument is "RESET" then schema writing is disabled (as with "PRAGMA writable_schema=OFF") and, in addition, the schema is reloaded.

src/pragma.c:1134   th3/req1/pragma30.test:55

/* IMP: R-60817-01178 */
# EVIDENCE-OF: R-60817-01178 If the argument is "RESET" then schema
# writing is disabled (as with "PRAGMA writable_schema=OFF") and, in
# addition, the schema is reloaded.

R-40798-35269-51954-12592-52405-01125-52034-02657 tcl slt th3 src

Warning: misuse of this pragma can easily result in a corrupt database file.

th3/req1/pragma30.test:52

/* IMP: R-40798-35269 */
# EVIDENCE-OF: R-40798-35269 Warning: misuse of this pragma can easily
# result in a corrupt database file.