SQLite

Check-in [4996ff9357]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4996ff93573c69b51eb7b1348058f85e6cb2728a
User & Date: drh 2008-03-07 21:37:19.000
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: 0ca14399b1 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: 4996ff9357 user: drh tags: trunk)
21:04
Fix an alignment problem in test_async.c. (CVS 4840) (check-in: 752d8e21bb user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/main.c.
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
10
11
12
13
14
15
16

17
18
19
20
21
22
23
24







-
+







**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.420 2008/03/04 17:45:01 mlcreech Exp $
** $Id: main.c,v 1.421 2008/03/07 21:37:19 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
#ifdef SQLITE_ENABLE_FTS3
# include "fts3.h"
#endif

1341
1342
1343
1344
1345
1346
1347

1348

1349
1350
1351
1352
1353
1354
1355
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357







+

+







  int notnull = 0;
  int primarykey = 0;
  int autoinc = 0;

  /* Ensure the database schema has been loaded */
  (void)sqlite3SafetyOn(db);
  sqlite3_mutex_enter(db->mutex);
  sqlite3BtreeEnterAll(db);
  rc = sqlite3Init(db, &zErrMsg);
  sqlite3BtreeLeaveAll(db);
  if( SQLITE_OK!=rc ){
    goto error_out;
  }

  /* Locate the table in question */
  pTab = sqlite3FindTable(db, zTableName, zDbName);
  if( !pTab || pTab->pSelect ){