/ Check-in [8384c77e]
Login

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

Overview
Comment:Do not duplicate the Expr.pLeft subtree of a TK_SELECT_COLUMN node.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rowvalue
Files: files | file ages | folders
SHA1:8384c77ebb3f65fbc54c199885926f2066f0b140
User & Date: drh 2016-08-20 17:00:16
Context
2016-08-20
18:06
Fixes for problems following OOM errors. check-in: 9041ee4a user: drh tags: rowvalue
17:00
Do not duplicate the Expr.pLeft subtree of a TK_SELECT_COLUMN node. check-in: 8384c77e user: drh tags: rowvalue
15:01
Fix a segfault that could occur if a query that used a vector comparison contained certain types of syntax errors. check-in: 203f07c5 user: dan tags: rowvalue
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/expr.c.

1201
1202
1203
1204
1205
1206
1207



1208

1209
1210
1211
1212
1213
1214
1215
                       exprDup(db, p->pRight, EXPRDUP_REDUCE, &zAlloc) : 0;
      }
      if( pzBuffer ){
        *pzBuffer = zAlloc;
      }
    }else{
      if( !ExprHasProperty(p, EP_TokenOnly) ){



        pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);

        pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
      }
    }
  }
  return pNew;
}








>
>
>
|
>







1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
                       exprDup(db, p->pRight, EXPRDUP_REDUCE, &zAlloc) : 0;
      }
      if( pzBuffer ){
        *pzBuffer = zAlloc;
      }
    }else{
      if( !ExprHasProperty(p, EP_TokenOnly) ){
        if( pNew->op==TK_SELECT_COLUMN ){
          pNew->pLeft = p->pLeft;
        }else{
          pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
        }
        pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
      }
    }
  }
  return pNew;
}