Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
close.html

Index Summary Markup Original


R-04239-05140-34509-16246-41712-61041-39161-05924 tcl slt th3 src

The sqlite3_close() and sqlite3_close_v2() routines are destructors for the sqlite3 object.

th3/th3util.c:2763

/* IMP: R-04239-05140 */
# EVIDENCE-OF: R-04239-05140 The sqlite3_close() and sqlite3_close_v2()
# routines are destructors for the sqlite3 object.

R-26128-01625-01942-61645-49803-53494-49149-48512 tcl slt th3 src

Calls to sqlite3_close() and sqlite3_close_v2() return SQLITE_OK if the sqlite3 object is successfully destroyed and all associated resources are deallocated.

th3/th3util.c:2766

/* IMP: R-26128-01625 */
# EVIDENCE-OF: R-26128-01625 Calls to sqlite3_close() and
# sqlite3_close_v2() return SQLITE_OK if the sqlite3 object is
# successfully destroyed and all associated resources are deallocated.

R-36522-24811-64811-56384-05057-49516-54548-20894 tcl slt th3 src

If the database connection is associated with unfinalized prepared statements, BLOB handlers, and/or unfinished sqlite3_backup objects then sqlite3_close() will leave the database connection open and return SQLITE_BUSY.

th3/cov1/main23.test:69

/* IMP: R-36522-24811 */
# EVIDENCE-OF: R-36522-24811 If the database connection is associated
# with unfinalized prepared statements, BLOB handlers, and/or unfinished
# sqlite3_backup objects then sqlite3_close() will leave the database
# connection open and return SQLITE_BUSY.

R-49034-18526-14571-23024-35463-03575-44456-04746 tcl slt th3 src

If sqlite3_close_v2() is called with unfinalized prepared statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups, it returns SQLITE_OK regardless, but instead of deallocating the database connection immediately, it marks the database connection as an unusable "zombie" and makes arrangements to automatically deallocate the database connection after all prepared statements are finalized, all BLOB handles are closed, and all backups have finished.

th3/cov1/main39.test:101

/* IMP: R-49034-18526 */
# EVIDENCE-OF: R-49034-18526 If sqlite3_close_v2() is called with
# unfinalized prepared statements, unclosed BLOB handlers, and/or
# unfinished sqlite3_backups, it returns SQLITE_OK regardless, but
# instead of deallocating the database connection immediately, it marks
# the database connection as an unusable "zombie" and makes arrangements
# to automatically deallocate the database connection after all prepared
# statements are finalized, all BLOB handles are closed, and all backups
# have finished.

R-51885-42713-13450-15041-37294-08802-56652-50878 tcl slt th3 src

If an sqlite3 object is destroyed while a transaction is open, the transaction is automatically rolled back.

th3/cov1/main23.test:140

/* IMP: R-51885-42713 */
# EVIDENCE-OF: R-51885-42713 If an sqlite3 object is destroyed while a
# transaction is open, the transaction is automatically rolled back.

R-63257-11740-13370-40315-30257-30447-50403-36483 tcl slt th3 src

Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer argument is a harmless no-op.

src/main.c:1204   th3/cov1/main23.test:158

/* IMP: R-63257-11740 */
# EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or
# sqlite3_close_v2() with a NULL pointer argument is a harmless no-op.