SQLite

Check-in [919b06c3a8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Restrict the scope of the sqlite3_stmt_readonly() interface to a specific subset of prepared statement types.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 919b06c3a803abb9236606a9b5885f0d8181e730
User & Date: drh 2010-11-17 02:02:45.000
Context
2010-11-18
12:31
Prevent a possible segfault when the sqlite3_value_numeric_type() interface is misused to try to determine the numeric type of the NULL value returned from sqlite3_column_value() with an invalid column number. (check-in: 501b743bcb user: drh tags: trunk)
2010-11-17
02:02
Restrict the scope of the sqlite3_stmt_readonly() interface to a specific subset of prepared statement types. (check-in: 919b06c3a8 user: drh tags: trunk)
2010-11-16
23:10
Adding the sqlite3_stmt_readonly() interface. (check-in: fd5b2f23dd user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/sqlite.h.in.
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639

2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
*/
const char *sqlite3_sql(sqlite3_stmt *pStmt);

/*
** CAPI3REF: Determine If An SQL Statement Writes The Database
**
** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
** the [prepared statement] X is guaranteed to leave the database file
** unmodified.  ^If the sqlite3_stmt_readonly(X) interface returns false (zero)
** then evaluating the statement might change the database file, but this
** is not guaranteed as the write operation might be conditional and the
** condition might not be met.  ^If X is a NULL pointer then

** sqlite3_stmt_readonly(X) returns true.  If X is a non-NULL pointer but
** is not a pointer to a valid, unfinalized prepared statement, then the
** behavior is undefined and probably harmful.
*/
int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);

/*
** CAPI3REF: Dynamically Typed Value Object
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
**







|
|
|
<
|
>
|
<
|







2628
2629
2630
2631
2632
2633
2634
2635
2636
2637

2638
2639
2640

2641
2642
2643
2644
2645
2646
2647
2648
*/
const char *sqlite3_sql(sqlite3_stmt *pStmt);

/*
** CAPI3REF: Determine If An SQL Statement Writes The Database
**
** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
** the [prepared statement] X is [SELECT] statement and false (zero) if
** X is an [INSERT], [UPDATE], [DELETE], CREATE, DROP, [ANALYZE],
** [ALTER], or [REINDEX] statement.

** If X is a NULL pointer or any other kind of statement, including but
** not limited to [ATTACH], [DETACH], [COMMIT], [ROLLBACK], [RELEASE],
** [SAVEPOINT], [PRAGMA], or [VACUUM] the result of sqlite3_stmt_readonly(X) is

** undefined.
*/
int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);

/*
** CAPI3REF: Dynamically Typed Value Object
** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
**