/ Check-in [5bcd0b1c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix name resolution problem in sub-selects within triggers, ticket [4ef7e3cfca].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5bcd0b1ca5d73ffbe7978ee9d73fe5e769e3d3a2
User & Date: mistachkin 2014-03-04 11:29:42
Context
2014-03-04
11:35
Add tests to verify the fix for bug [4ef7e3cfca]. check-in: 62410bb8 user: dan tags: trunk
11:29
Fix name resolution problem in sub-selects within triggers, ticket [4ef7e3cfca]. check-in: 5bcd0b1c user: mistachkin tags: trunk
11:16
Fix harmless compiler warning. check-in: 8d18a803 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

   333    333         assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
   334    334         if( op!=TK_DELETE && sqlite3StrICmp("new",zTab) == 0 ){
   335    335           pExpr->iTable = 1;
   336    336           pTab = pParse->pTriggerTab;
   337    337         }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){
   338    338           pExpr->iTable = 0;
   339    339           pTab = pParse->pTriggerTab;
          340  +      }else{
          341  +        pTab = 0;
   340    342         }
   341    343   
   342    344         if( pTab ){ 
   343    345           int iCol;
   344    346           pSchema = pTab->pSchema;
   345    347           cntTab++;
   346    348           for(iCol=0, pCol=pTab->aCol; iCol<pTab->nCol; iCol++, pCol++){