Upgrade bundled library to 2.8.14 + misc fixes

(http://www.sqlite.org/cvstrac/chngview?cn=1742)
This commit is contained in:
Wez Furlong 2004-07-10 12:27:51 +00:00
parent cd732f1a3f
commit e563b4eafa
43 changed files with 5953 additions and 5559 deletions

View file

@ -85,12 +85,9 @@ int sqlite_set_authorizer(
** user-supplied authorization function returned an illegal value.
*/
static void sqliteAuthBadReturnCode(Parse *pParse, int rc){
char zBuf[20];
sprintf(zBuf, "(%d)", rc);
sqliteSetString(&pParse->zErrMsg, "illegal return value ", zBuf,
" from the authorization function - should be SQLITE_OK, "
"SQLITE_IGNORE, or SQLITE_DENY", (char*)0);
pParse->nErr++;
sqliteErrorMsg(pParse, "illegal return value (%d) from the "
"authorization function - should be SQLITE_OK, SQLITE_IGNORE, "
"or SQLITE_DENY", rc);
pParse->rc = SQLITE_MISUSE;
}
@ -150,13 +147,11 @@ void sqliteAuthRead(
pExpr->op = TK_NULL;
}else if( rc==SQLITE_DENY ){
if( db->nDb>2 || pExpr->iDb!=0 ){
sqliteSetString(&pParse->zErrMsg,"access to ", zDBase, ".",
pTab->zName, ".", zCol, " is prohibited", (char*)0);
sqliteErrorMsg(pParse, "access to %s.%s.%s is prohibited",
zDBase, pTab->zName, zCol);
}else{
sqliteSetString(&pParse->zErrMsg,"access to ", pTab->zName, ".",
zCol, " is prohibited", (char*)0);
sqliteErrorMsg(pParse, "access to %s.%s is prohibited", pTab->zName,zCol);
}
pParse->nErr++;
pParse->rc = SQLITE_AUTH;
}else if( rc!=SQLITE_OK ){
sqliteAuthBadReturnCode(pParse, rc);
@ -179,14 +174,13 @@ int sqliteAuthCheck(
sqlite *db = pParse->db;
int rc;
if( db->xAuth==0 ){
if( db->init.busy || db->xAuth==0 ){
return SQLITE_OK;
}
rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
if( rc==SQLITE_DENY ){
sqliteSetString(&pParse->zErrMsg, "not authorized", (char*)0);
sqliteErrorMsg(pParse, "not authorized");
pParse->rc = SQLITE_AUTH;
pParse->nErr++;
}else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){
rc = SQLITE_DENY;
sqliteAuthBadReturnCode(pParse, rc);