/ Check-in [42f8aa62]
Login

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

Overview
Comment:Remove C++ style comments. No code changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | unpacked-IdxInsert
Files: files | file ages | folders
SHA1: 42f8aa6231bf4ed74bebdc85aa79d23dc20b3c14
User & Date: drh 2016-11-10 16:07:43
Context
2016-11-10
17:01
When doing a REPLACE on a WITHOUT ROWID table with no secondary indexes, bypass the OP_NoConflict/OP_Delete sequence and directly overwrite any preexisting row, for a performance increase. check-in: f7041cbb user: drh tags: unpacked-IdxInsert
16:07
Remove C++ style comments. No code changes. check-in: 42f8aa62 user: drh tags: unpacked-IdxInsert
14:24
Add the unpacked key fields to OP_IdxInsert for INSERT and UPDATE statements. check-in: 67602e40 user: drh tags: unpacked-IdxInsert
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/insert.c.

  1511   1511                               SQLITE_JUMPIFNULL);
  1512   1512         pParse->ckBase = 0;
  1513   1513       }
  1514   1514   
  1515   1515       /* Create a record for this index entry as it should appear after
  1516   1516       ** the insert or update.  Store that record in the aRegIdx[ix] register
  1517   1517       */
  1518         -    regIdx = aRegIdx[ix]+1; // sqlite3GetTempRange(pParse, pIdx->nColumn);
         1518  +    regIdx = aRegIdx[ix]+1;
  1519   1519       for(i=0; i<pIdx->nColumn; i++){
  1520   1520         int iField = pIdx->aiColumn[i];
  1521   1521         int x;
  1522   1522         if( iField==XN_EXPR ){
  1523   1523           pParse->ckBase = regNewData+1;
  1524   1524           sqlite3ExprCodeCopy(pParse, pIdx->aColExpr->a[i].pExpr, regIdx+i);
  1525   1525           pParse->ckBase = 0;
................................................................................
  1548   1548         sqlite3VdbeResolveLabel(v, addrUniqueOk);
  1549   1549         continue;
  1550   1550       }
  1551   1551   
  1552   1552       /* Find out what action to take in case there is a uniqueness conflict */
  1553   1553       onError = pIdx->onError;
  1554   1554       if( onError==OE_None ){ 
  1555         -//      sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn);
  1556   1555         sqlite3VdbeResolveLabel(v, addrUniqueOk);
  1557   1556         continue;  /* pIdx is not a UNIQUE index */
  1558   1557       }
  1559   1558       if( overrideError!=OE_Default ){
  1560   1559         onError = overrideError;
  1561   1560       }else if( onError==OE_Default ){
  1562   1561         onError = OE_Abort;
................................................................................
  1647   1646               regR, nPkField, 0, OE_Replace,
  1648   1647               (pIdx==pPk ? ONEPASS_SINGLE : ONEPASS_OFF), -1);
  1649   1648           seenReplace = 1;
  1650   1649           break;
  1651   1650         }
  1652   1651       }
  1653   1652       sqlite3VdbeResolveLabel(v, addrUniqueOk);
  1654         -    // sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn);
  1655   1653       if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);
  1656   1654     }
  1657   1655     if( ipkTop ){
  1658   1656       sqlite3VdbeGoto(v, ipkTop+1);
  1659   1657       sqlite3VdbeJumpHere(v, ipkBottom);
  1660   1658     }
  1661   1659