The sqlite_exec() function now returns SQLITE_AUTH when authorization fails.
Ticket #231. (CVS 857)

FossilOrigin-Name: d93c1aeb544a5b1056424945eb43854213b30e50
diff --git a/src/auth.c b/src/auth.c
index ca5af14..933416f 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -14,7 +14,7 @@
 ** systems that do not need this facility may omit it by recompiling
 ** the library with -DSQLITE_OMIT_AUTHORIZATION=1
 **
-** $Id: auth.c,v 1.3 2003/01/13 23:27:32 drh Exp $
+** $Id: auth.c,v 1.4 2003/01/31 17:21:50 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -71,6 +71,7 @@
     " from the authorization function - should be SQLITE_OK, "
     "SQLITE_IGNORE, or SQLITE_DENY", 0);
   pParse->nErr++;
+  pParse->rc = SQLITE_MISUSE;
 }
 
 /*
@@ -113,6 +114,7 @@
     sqliteSetString(&pParse->zErrMsg,"access to ",
         pTab->zName, ".", zCol, " is prohibited", 0);
     pParse->nErr++;
+    pParse->rc = SQLITE_AUTH;
   }else if( rc!=SQLITE_OK ){
     sqliteAuthBadReturnCode(pParse, rc);
   }
@@ -138,6 +140,7 @@
   rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2);
   if( rc==SQLITE_DENY ){
     sqliteSetString(&pParse->zErrMsg, "not authorized", 0);
+    pParse->rc = SQLITE_AUTH;
     pParse->nErr++;
   }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){
     rc = SQLITE_DENY;