SQLite

Check-in [a5eefd5239]
Login

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

Overview
Comment:Use OP_Copy rather than OP_SCopy at one point in aggregate processing where it is needed to avoid shallow-copy misuse.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bug-b351d95f9c
Files: files | file ages | folders
SHA1: a5eefd5239bf5b4f9d0bdfb312f5b33c0a196178
User & Date: drh 2010-09-28 03:55:03.000
Context
2010-09-28
04:14
Test case and fix for the specific failure of ticket [b351d95f9cd5ef17e9d9dbae]. (check-in: 57789cfe67 user: drh tags: bug-b351d95f9c)
03:55
Use OP_Copy rather than OP_SCopy at one point in aggregate processing where it is needed to avoid shallow-copy misuse. (check-in: a5eefd5239 user: drh tags: bug-b351d95f9c)
00:25
Continuing work toward detecting and fixing shallow-copy misuse. (check-in: d0342f4bb9 user: drh tags: bug-b351d95f9c)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/select.c.
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
    int addrNext = 0;
    int regAgg;
    ExprList *pList = pF->pExpr->x.pList;
    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
    if( pList ){
      nArg = pList->nExpr;
      regAgg = sqlite3GetTempRange(pParse, nArg);
      sqlite3ExprCodeExprList(pParse, pList, regAgg, 0);
    }else{
      nArg = 0;
      regAgg = 0;
    }
    if( pF->iDistinct>=0 ){
      addrNext = sqlite3VdbeMakeLabel(v);
      assert( nArg==1 );







|







3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
    int addrNext = 0;
    int regAgg;
    ExprList *pList = pF->pExpr->x.pList;
    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
    if( pList ){
      nArg = pList->nExpr;
      regAgg = sqlite3GetTempRange(pParse, nArg);
      sqlite3ExprCodeExprList(pParse, pList, regAgg, 1);
    }else{
      nArg = 0;
      regAgg = 0;
    }
    if( pF->iDistinct>=0 ){
      addrNext = sqlite3VdbeMakeLabel(v);
      assert( nArg==1 );