/ Check-in [293fbf0a]
Login

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

Overview
Comment:Don't invoke authorisation callback during database initialisation. (CVS 1588)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 293fbf0aa5c221bc341d0d9afc73d459f427f940
User & Date: danielk1977 2004-06-14 11:35:18
Context
2004-06-14
11:43
Have the TCL 'errorcode' interface call sqlite3_errcode(). (CVS 1589) check-in: f4b4df65 user: danielk1977 tags: trunk
11:35
Don't invoke authorisation callback during database initialisation. (CVS 1588) check-in: 293fbf0a user: danielk1977 tags: trunk
09:41
Bugfix for previous checkin. (CVS 1587) check-in: 2737505f user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/auth.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the sqlite3_set_authorizer()
    13     13   ** API.  This facility is an optional feature of the library.  Embedded
    14     14   ** systems that do not need this facility may omit it by recompiling
    15     15   ** the library with -DSQLITE_OMIT_AUTHORIZATION=1
    16     16   **
    17         -** $Id: auth.c,v 1.14 2004/05/10 10:34:34 danielk1977 Exp $
           17  +** $Id: auth.c,v 1.15 2004/06/14 11:35:18 danielk1977 Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   
    21     21   /*
    22     22   ** All of the code in this file may be omitted by defining a single
    23     23   ** macro.
    24     24   */
................................................................................
   169    169     int code,
   170    170     const char *zArg1,
   171    171     const char *zArg2,
   172    172     const char *zArg3
   173    173   ){
   174    174     sqlite *db = pParse->db;
   175    175     int rc;
          176  +
          177  +  /* Don't do any authorization checks if the database is initialising. */
          178  +  if( db->init.busy ){
          179  +    return SQLITE_OK;
          180  +  }
   176    181   
   177    182     if( db->xAuth==0 ){
   178    183       return SQLITE_OK;
   179    184     }
   180    185     rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
   181    186     if( rc==SQLITE_DENY ){
   182    187       sqlite3ErrorMsg(pParse, "not authorized");