/ Check-in [4996ff93]
Login

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

Overview
Comment:Make sure all necessary mutexes are held prior to initializing the schema in sqlite3_table_column_metadata(). (CVS 4841)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4996ff93573c69b51eb7b1348058f85e6cb2728a
User & Date: drh 2008-03-07 21:37:19
Context
2008-03-08
06:16
Move a comment within the Parse structure to make it more accurate. No actual code changes. (CVS 4842) check-in: 0ca14399 user: danielk1977 tags: trunk
2008-03-07
21:37
Make sure all necessary mutexes are held prior to initializing the schema in sqlite3_table_column_metadata(). (CVS 4841) check-in: 4996ff93 user: drh tags: trunk
21:04
Fix an alignment problem in test_async.c. (CVS 4840) check-in: 752d8e21 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.420 2008/03/04 17:45:01 mlcreech Exp $
           17  +** $Id: main.c,v 1.421 2008/03/07 21:37:19 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <ctype.h>
    21     21   #ifdef SQLITE_ENABLE_FTS3
    22     22   # include "fts3.h"
    23     23   #endif
    24     24   
................................................................................
  1341   1341     int notnull = 0;
  1342   1342     int primarykey = 0;
  1343   1343     int autoinc = 0;
  1344   1344   
  1345   1345     /* Ensure the database schema has been loaded */
  1346   1346     (void)sqlite3SafetyOn(db);
  1347   1347     sqlite3_mutex_enter(db->mutex);
         1348  +  sqlite3BtreeEnterAll(db);
  1348   1349     rc = sqlite3Init(db, &zErrMsg);
         1350  +  sqlite3BtreeLeaveAll(db);
  1349   1351     if( SQLITE_OK!=rc ){
  1350   1352       goto error_out;
  1351   1353     }
  1352   1354   
  1353   1355     /* Locate the table in question */
  1354   1356     pTab = sqlite3FindTable(db, zTableName, zDbName);
  1355   1357     if( !pTab || pTab->pSelect ){