Initial check-in of the code for the new sqlite_set_authorizer() API function.
The code is mostly untested at this point. (CVS 827)

FossilOrigin-Name: 52d5007f64d0af5286b2a0e1f0b9e53c86bece3f
diff --git a/src/expr.c b/src/expr.c
index 21c2c03..5fcfd88 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.83 2002/10/31 00:09:40 drh Exp $
+** $Id: expr.c,v 1.84 2003/01/12 18:02:18 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -430,6 +430,7 @@
     case TK_ID: {
       int cnt = 0;      /* Number of matches */
       int i;            /* Loop counter */
+      int rc;           /* Return code */
       char *z;
       assert( pExpr->token.z );
       z = sqliteStrNDup(pExpr->token.z, pExpr->token.n);
@@ -488,6 +489,9 @@
         pParse->nErr++;
         return 1;
       }
+      if( pExpr->op==TK_COLUMN ){
+        sqliteAuthRead(pParse, pExpr, pTabList, base);
+      }
       break; 
     }
   
@@ -595,6 +599,7 @@
       sqliteExprDelete(pRight);
       pExpr->pRight = 0;
       pExpr->op = TK_COLUMN;
+      sqliteAuthRead(pParse, pExpr, pTabList, base);
       break;
     }