/ Check-in [b18a758a]
Login

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

Overview
Comment:Enhance the documentation to clarify that SQLite is not reentrant through the authorization callback function. Ticket #2242. (CVS 3650)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b18a758a8fbd4b286ae3475af26f290d8cd583f0
User & Date: drh 2007-02-20 15:21:05
Context
2007-02-21
16:44
Add comments to the top of keywordhash.h. (CVS 3651) check-in: 0aa9ed5b user: drh tags: trunk
2007-02-20
15:21
Enhance the documentation to clarify that SQLite is not reentrant through the authorization callback function. Ticket #2242. (CVS 3650) check-in: b18a758a user: drh tags: trunk
2007-02-17
14:59
merge the second portion of the cross-compile cleanup (CVS 3649) check-in: 309f2de6 user: vapier tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to www/capi3ref.tcl.

     1         -set rcsid {$Id: capi3ref.tcl,v 1.51 2007/01/10 12:57:29 drh Exp $}
            1  +set rcsid {$Id: capi3ref.tcl,v 1.52 2007/02/20 15:21:05 drh Exp $}
     2      2   source common.tcl
     3      3   header {C/C++ Interface For SQLite Version 3}
     4      4   puts {
     5      5   <h2>C/C++ Interface For SQLite Version 3</h2>
     6      6   }
     7      7   
     8      8   proc api {name prototype desc {notused x}} {
................................................................................
  1346   1346   
  1347   1347    The 5th argument is the name
  1348   1348    of the database ("main", "temp", etc.) where applicable.  The 6th argument
  1349   1349    is the name of the inner-most trigger or view that is responsible for
  1350   1350    the access attempt or NULL if this access attempt is directly from 
  1351   1351    input SQL code.
  1352   1352   
  1353         - The return value of the authorization function should be one of the
         1353  + The return value of the authorization callback function should be one of the
  1354   1354    constants SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  A return of
  1355   1355    SQLITE_OK means that the operation is permitted and that 
  1356   1356    sqlite3_prepare_v2() can proceed as normal.
  1357   1357    A return of SQLITE_DENY means that the sqlite3_prepare_v2()
  1358   1358    should fail with an error.  A return of SQLITE_IGNORE causes the 
  1359   1359    sqlite3_prepare_v2() to continue as normal but the requested 
  1360   1360    operation is silently converted into a no-op.  A return of SQLITE_IGNORE
................................................................................
  1361   1361    in response to an SQLITE_READ or SQLITE_FUNCTION causes the column
  1362   1362    being read or the function being invoked to return a NULL.
  1363   1363   
  1364   1364    The intent of this routine is to allow applications to safely execute
  1365   1365    user-entered SQL.  An appropriate callback can deny the user-entered
  1366   1366    SQL access certain operations (ex: anything that changes the database)
  1367   1367    or to deny access to certain tables or columns within the database.
         1368  +
         1369  + SQLite is not reentrant through the authorization callback function.
         1370  + The authorization callback function should not attempt to invoke
         1371  + any other SQLite APIs for the same database connection.  If the
         1372  + authorization callback function invokes some other SQLite API, an
         1373  + SQLITE_MISUSE error or a segmentation fault may result.
  1368   1374   }
  1369   1375   
  1370   1376   api {} {
  1371   1377   int sqlite3_step(sqlite3_stmt*);
  1372   1378   } {
  1373   1379    After an SQL query has been prepared with a call to either
  1374   1380    sqlite3_prepare_v2() or sqlite3_prepare16_v2() or to one of