Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
busy_handler.html

Index Summary Markup Original


R-31070-13763-03261-14688-14121-11229-57314-08102 tcl slt th3 src

The sqlite3_busy_handler(D,X,P) routine sets a callback function X that might be invoked with argument P whenever an attempt is made to access a database table associated with database connection D when another thread or process has the table locked.

th3/req1/busy01.test:13

/* IMP: R-31070-13763 */
# EVIDENCE-OF: R-31070-13763 The sqlite3_busy_handler(D,X,P) routine
# sets a callback function X that might be invoked with argument P
# whenever an attempt is made to access a database table associated with
# database connection D when another thread or process has the table
# locked.

R-62103-54815-14934-53724-30869-15955-58646-34076 tcl slt th3 src

If the busy callback is NULL, then SQLITE_BUSY is returned immediately upon encountering the lock.

th3/req1/busy01.test:74

/* IMP: R-62103-54815 */
# EVIDENCE-OF: R-62103-54815 If the busy callback is NULL, then
# SQLITE_BUSY is returned immediately upon encountering the lock.

R-47754-63122-64688-34803-40832-37059-61979-20469 tcl slt th3 src

If the busy callback is not NULL, then the callback might be invoked with two arguments.

th3/req1/busy01.test:85

/* IMP: R-47754-63122 */
# EVIDENCE-OF: R-47754-63122 If the busy callback is not NULL, then the
# callback might be invoked with two arguments.

R-19619-54598-52217-51985-41765-58210-14890-62978 tcl slt th3 src

The first argument to the busy handler is a copy of the void* pointer which is the third argument to sqlite3_busy_handler().

th3/req1/busy01.test:104   th3/req1/busy01.test:129

/* IMP: R-19619-54598 */
# EVIDENCE-OF: R-19619-54598 The first argument to the busy handler is a
# copy of the void* pointer which is the third argument to
# sqlite3_busy_handler().

R-29653-64292-04142-32577-33842-31550-59902-00796 tcl slt th3 src

The second argument to the busy handler callback is the number of times that the busy handler has been invoked previously for the same locking event.

th3/req1/busy01.test:124   th3/req1/busy01.test:99

/* IMP: R-29653-64292 */
# EVIDENCE-OF: R-29653-64292 The second argument to the busy handler
# callback is the number of times that the busy handler has been invoked
# previously for the same locking event.

R-42353-38420-62893-47772-45609-25296-37398-15241 tcl slt th3 src

If the busy callback returns 0, then no additional attempts are made to access the database and SQLITE_BUSY is returned to the application.

th3/req1/busy01.test:115   th3/req1/busy01.test:93

/* IMP: R-42353-38420 */
# EVIDENCE-OF: R-42353-38420 If the busy callback returns 0, then no
# additional attempts are made to access the database and SQLITE_BUSY is
# returned to the application.

R-28183-48984-04569-19175-13455-19458-08289-27795 tcl slt th3 src

If the callback returns non-zero, then another attempt is made to access the database and the cycle repeats.

th3/req1/busy01.test:120

/* IMP: R-28183-48984 */
# EVIDENCE-OF: R-28183-48984 If the callback returns non-zero, then
# another attempt is made to access the database and the cycle repeats.

R-38545-41243-15928-60739-42424-40199-61520-19344 tcl slt th3 src

If SQLite determines that invoking the busy handler could result in a deadlock, it will go ahead and return SQLITE_BUSY to the application instead of invoking the busy handler.

th3/req1/busy01.test:135

/* IMP: R-38545-41243 */
# EVIDENCE-OF: R-38545-41243 If SQLite determines that invoking the busy
# handler could result in a deadlock, it will go ahead and return
# SQLITE_BUSY to the application instead of invoking the busy handler.

R-11315-64212-00710-49784-05093-45690-30554-02549 tcl slt th3 src

The default busy callback is NULL.

th3/req1/busy01.test:72

/* IMP: R-11315-64212 */
# EVIDENCE-OF: R-11315-64212 The default busy callback is NULL.

R-30391-20943-57014-62404-57876-35219-41861-22105 tcl slt th3 src

There can only be a single busy handler defined for each database connection. Setting a new busy handler clears any previously set handler.

th3/req1/busy01.test:153

/* IMP: R-30391-20943 */
# EVIDENCE-OF: R-30391-20943 There can only be a single busy handler
# defined for each database connection. Setting a new busy handler
# clears any previously set handler.

R-12196-28473-08182-34058-05586-50846-36474-32114 tcl slt th3 src

Note that calling sqlite3_busy_timeout() or evaluating PRAGMA busy_timeout=N will change the busy handler and thus clear any previously set busy handler.

th3/req1/busy01.test:172

/* IMP: R-12196-28473 */
# EVIDENCE-OF: R-12196-28473 Note that calling sqlite3_busy_timeout() or
# evaluating PRAGMA busy_timeout=N will change the busy handler and thus
# clear any previously set busy handler.