/ 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 Unified Diffs Ignore Whitespace Patch

Changes to src/resolve.c.

333
334
335
336
337
338
339


340
341
342
343
344
345
346
      assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
      if( op!=TK_DELETE && sqlite3StrICmp("new",zTab) == 0 ){
        pExpr->iTable = 1;
        pTab = pParse->pTriggerTab;
      }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){
        pExpr->iTable = 0;
        pTab = pParse->pTriggerTab;


      }

      if( pTab ){ 
        int iCol;
        pSchema = pTab->pSchema;
        cntTab++;
        for(iCol=0, pCol=pTab->aCol; iCol<pTab->nCol; iCol++, pCol++){







>
>







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

      if( pTab ){ 
        int iCol;
        pSchema = pTab->pSchema;
        cntTab++;
        for(iCol=0, pCol=pTab->aCol; iCol<pTab->nCol; iCol++, pCol++){