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

In sqlite3_table_column_metadata(), hold the mutex on all attached BtShared objects while accessing schema objects. Fix for #3679. (CVS 6328)

FossilOrigin-Name: d197afd658eecfc0e24913e5a779c8f1e2a138a6
This commit is contained in:
danielk1977
2009-02-26 07:15:59 +00:00
parent da10822a61
commit 02b4e3b34e
5 changed files with 94 additions and 12 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.529 2009/02/23 14:42:53 danielk1977 Exp $
** $Id: main.c,v 1.530 2009/02/26 07:15:59 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -1933,7 +1933,6 @@ int sqlite3_table_column_metadata(
(void)sqlite3SafetyOn(db);
sqlite3BtreeEnterAll(db);
rc = sqlite3Init(db, &zErrMsg);
sqlite3BtreeLeaveAll(db);
if( SQLITE_OK!=rc ){
goto error_out;
}
@@ -1989,6 +1988,7 @@ int sqlite3_table_column_metadata(
}
error_out:
sqlite3BtreeLeaveAll(db);
(void)sqlite3SafetyOff(db);
/* Whether the function call succeeded or failed, set the output parameters