/ Check-in [ffa092e1]
Login

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

Overview
Comment:Remove an unneeded column-cache flush in aggregate SELECT and an unreachable branch in the INSERT logic.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ffa092e13b3781677b18418cca40e3dd1e388aed
User & Date: drh 2013-12-19 14:34:34
Context
2013-12-19
16:26
Make sure errors encountered while initializing extensions such as FTS4 get reported out from sqlite3_open(). This fixes a bug introduced by check-in [9d347f547e7ba9]. Also remove lots of forgotten "breakpoint" commands left in test scripts over the years. check-in: ca3fdfd4 user: drh tags: trunk
14:34
Remove an unneeded column-cache flush in aggregate SELECT and an unreachable branch in the INSERT logic. check-in: ffa092e1 user: drh tags: trunk
02:56
Omit an unnecessary OP_Null opcode from UPDATE. check-in: 72d11133 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/insert.c.

  1511   1511           if( isUpdate ){
  1512   1512             sqlite3VdbeAddOp3(v, OP_Eq, regR, addrUniqueOk, regOldData);
  1513   1513           }
  1514   1514         }else{
  1515   1515           int x;
  1516   1516           /* Extract the PRIMARY KEY from the end of the index entry and
  1517   1517           ** store it in registers regR..regR+nPk-1 */
  1518         -        if( (isUpdate || onError==OE_Replace) && pIdx!=pPk ){
         1518  +        if( pIdx!=pPk ){
  1519   1519             for(i=0; i<pPk->nKeyCol; i++){
  1520   1520               x = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[i]);
  1521   1521               sqlite3VdbeAddOp3(v, OP_Column, iThisCur, x, regR+i);
  1522   1522               VdbeComment((v, "%s.%s", pTab->zName,
  1523   1523                            pTab->aCol[pPk->aiColumn[i]].zName));
  1524   1524             }
  1525   1525           }

Changes to src/select.c.

  3871   3871     int i;
  3872   3872     int regHit = 0;
  3873   3873     int addrHitTest = 0;
  3874   3874     struct AggInfo_func *pF;
  3875   3875     struct AggInfo_col *pC;
  3876   3876   
  3877   3877     pAggInfo->directMode = 1;
  3878         -  sqlite3ExprCacheClear(pParse);
  3879   3878     for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
  3880   3879       int nArg;
  3881   3880       int addrNext = 0;
  3882   3881       int regAgg;
  3883   3882       ExprList *pList = pF->pExpr->x.pList;
  3884   3883       assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
  3885   3884       if( pList ){