*** DRAFT ***

SQLite Requirement Matrix Details
prepare.html

Index Summary Markup Original


R-58838-55911-33120-57542-55492-25177-48727-11020 tcl slt th3 src

If the nByte argument is negative, then zSql is read up to the first zero terminator.

th3/req1/prepare01.test:21

/* IMP: R-58838-55911 */
# EVIDENCE-OF: R-58838-55911 If the nByte argument is negative, then
# zSql is read up to the first zero terminator.

R-28279-44669-55028-49406-32452-64424-01870-54893 tcl slt th3 src

If nByte is positive, then it is the number of bytes read from zSql.

th3/req1/prepare01.test:102

/* IMP: R-28279-44669 */
# EVIDENCE-OF: R-28279-44669 If nByte is positive, then it is the number
# of bytes read from zSql.

R-48563-15053-26384-64007-26863-55213-59220-45966 tcl slt th3 src

If nByte is zero, then no prepared statement is generated.

th3/cov1/prepare07.test:66

/* IMP: R-48563-15053 */
# EVIDENCE-OF: R-48563-15053 If nByte is zero, then no prepared
# statement is generated.

R-24543-02373-21907-00972-51733-48834-36106-39581 tcl slt th3 src

If pzTail is not NULL then *pzTail is made to point to the first byte past the end of the first SQL statement in zSql.

th3/req1/prepare01.test:197

/* IMP: R-24543-02373 */
# EVIDENCE-OF: R-24543-02373 If pzTail is not NULL then *pzTail is made
# to point to the first byte past the end of the first SQL statement in
# zSql.

R-44830-52899-50578-35713-22195-41858-55847-16818 tcl slt th3 src

*ppStmt is left pointing to a compiled prepared statement that can be executed using sqlite3_step().

th3/req1/prepare01.test:24

/* IMP: R-44830-52899 */
# EVIDENCE-OF: R-44830-52899 *ppStmt is left pointing to a compiled
# prepared statement that can be executed using sqlite3_step().

R-11127-09633-57185-22901-21397-40062-06184-59885 tcl slt th3 src

If there is an error, *ppStmt is set to NULL.

th3/req1/prepare01.test:227

/* IMP: R-11127-09633 */
# EVIDENCE-OF: R-11127-09633 If there is an error, *ppStmt is set to
# NULL.

R-03880-38961-16553-20098-36513-53865-60133-40229 tcl slt th3 src

If the input text contains no SQL (if the input is an empty string or a comment) then *ppStmt is set to NULL.

th3/req1/prepare01.test:257

/* IMP: R-03880-38961 */
# EVIDENCE-OF: R-03880-38961 If the input text contains no SQL (if the
# input is an empty string or a comment) then *ppStmt is set to NULL.

R-60355-64447-23225-33179-21170-11020-20743-59440 tcl slt th3 src

On success, the sqlite3_prepare() family of routines return SQLITE_OK; otherwise an error code is returned.

th3/req1/prepare01.test:230   th3/req1/prepare01.test:27

/* IMP: R-60355-64447 */
# EVIDENCE-OF: R-60355-64447 On success, the sqlite3_prepare() family of
# routines return SQLITE_OK; otherwise an error code is returned.

R-26018-54615-20076-23782-57324-62216-58815-28451 tcl slt th3 src

In the "vX" interfaces, the prepared statement that is returned (the sqlite3_stmt object) contains a copy of the original SQL text.

th3/req1/prepare01.test:32

/* IMP: R-26018-54615 */
# EVIDENCE-OF: R-26018-54615 In the "vX" interfaces, the prepared
# statement that is returned (the sqlite3_stmt object) contains a copy
# of the original SQL text.

R-43237-50879-06987-12679-64583-33041-22126-56366 tcl slt th3 src

If the database schema changes, instead of returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will automatically recompile the SQL statement and try to run it again.

th3/req1/prepare02.test:43

/* IMP: R-43237-50879 */
# EVIDENCE-OF: R-43237-50879 If the database schema changes, instead of
# returning SQLITE_SCHEMA as it always used to do, sqlite3_step() will
# automatically recompile the SQL statement and try to run it again.

R-46616-26780-52699-16900-61811-04122-03606-62757 tcl slt th3 src

When an error occurs, sqlite3_step() will return one of the detailed error codes or extended error codes.

th3/req1/prepare03.test:36

/* IMP: R-46616-26780 */
# EVIDENCE-OF: R-46616-26780 When an error occurs, sqlite3_step() will
# return one of the detailed error codes or extended error codes.

R-30964-04756-41013-33290-38906-18403-44827-12997 tcl slt th3 src

The legacy behavior was that sqlite3_step() would only return a generic SQLITE_ERROR result code and the application would have to make a second call to sqlite3_reset() in order to find the underlying cause of the problem.

th3/req1/prepare03.test:60

/* IMP: R-30964-04756 */
# EVIDENCE-OF: R-30964-04756 The legacy behavior was that sqlite3_step()
# would only return a generic SQLITE_ERROR result code and the
# application would have to make a second call to sqlite3_reset() in
# order to find the underlying cause of the problem.

R-48440-37595-53228-62287-21780-44626-15603-42165 tcl slt th3 src

If the specific value bound to host parameter in the WHERE clause might influence the choice of query plan for a statement, then the statement will be automatically recompiled, as if there had been a schema change, on the first sqlite3_step() call following any change to the bindings of that parameter.

src/vdbeapi.c:1296   th3/req1/prepare04.test:32

/* IMP: R-48440-37595 */
# EVIDENCE-OF: R-48440-37595 If the specific value bound to host
# parameter in the WHERE clause might influence the choice of query plan
# for a statement, then the statement will be automatically recompiled,
# as if there had been a schema change, on the first sqlite3_step() call
# following any change to the bindings of that parameter.

R-31526-56213-47195-27280-32450-14597-41051-28661 tcl slt th3 src

The specific value of WHERE-clause parameter might influence the choice of query plan if the parameter is the left-hand side of a LIKE or GLOB operator or if the parameter is compared to an indexed column and the SQLITE_ENABLE_STAT3 compile-time option is enabled.

th3/req1/prepare04.test:38

/* IMP: R-31526-56213 */
# EVIDENCE-OF: R-31526-56213 The specific value of WHERE-clause
# parameter might influence the choice of query plan if the parameter is
# the left-hand side of a LIKE or GLOB operator or if the parameter is
# compared to an indexed column and the SQLITE_ENABLE_STAT3 compile-time
# option is enabled.

R-56861-42673-10667-36418-55159-59166-26000-55286 tcl slt th3 src

sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having the extra prepFlags parameter, which is a bit array consisting of zero or more of the SQLITE_PREPARE_* flags.

src/prepare.c:779

/* IMP: R-56861-42673 */
# EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from
# sqlite3_prepare_v2() only in having the extra prepFlags parameter,
# which is a bit array consisting of zero or more of the
# SQLITE_PREPARE_* flags.

R-37923-12173-52320-03983-04095-34314-35102-35798 tcl slt th3 src

The sqlite3_prepare_v2() interface works exactly the same as sqlite3_prepare_v3() with a zero prepFlags parameter.

src/prepare.c:760

/* IMP: R-37923-12173 */
# EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works
# exactly the same as sqlite3_prepare_v3() with a zero prepFlags
# parameter.