1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix a race condition that can occur when reloading the database schema in shared-cache mode. (CVS 4643)

FossilOrigin-Name: b37babef913fcceae7f0bd461a3105e184518d62
This commit is contained in:
danielk1977
2007-12-27 15:12:16 +00:00
parent 641b0f4ffa
commit 4eab8b7b41
5 changed files with 21 additions and 13 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.63 2007/10/03 08:46:44 danielk1977 Exp $
** $Id: attach.c,v 1.64 2007/12/27 15:12:17 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -187,7 +187,9 @@ static void attachFunc(
*/
if( rc==SQLITE_OK ){
sqlite3SafetyOn(db);
sqlite3BtreeEnterAll(db);
rc = sqlite3Init(db, &zErrDyn);
sqlite3BtreeLeaveAll(db);
sqlite3SafetyOff(db);
}
if( rc ){