1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Do not invoke the authorizer when reparsing the schema after a schema

change or when trying to figure out the result set of a view. (CVS 4488)

FossilOrigin-Name: e756bc9b74ef357c088b3044527c41e6834ba1a2
This commit is contained in:
drh
2007-10-12 20:42:28 +00:00
parent 7d97efbe57
commit a6d0ffc359
5 changed files with 120 additions and 13 deletions

View File

@@ -13,7 +13,7 @@
** interface, and routines that contribute to loading the database schema
** from disk.
**
** $Id: prepare.c,v 1.61 2007/10/03 08:46:45 danielk1977 Exp $
** $Id: prepare.c,v 1.62 2007/10/12 20:42:30 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -301,7 +301,17 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
"SELECT name, rootpage, sql FROM '%q'.%s",
db->aDb[iDb].zName, zMasterName);
sqlite3SafetyOff(db);
rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);
#ifndef SQLITE_OMIT_AUTHORIZATION
{
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
xAuth = db->xAuth;
db->xAuth = 0;
#endif
rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);
#ifndef SQLITE_OMIT_AUTHORIZATION
db->xAuth = xAuth;
}
#endif
if( rc==SQLITE_ABORT ) rc = initData.rc;
sqlite3SafetyOn(db);
sqlite3_free(zSql);