/ Check-in [8671b9e1]
Login

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

Overview
Comment:Merge latest trunk with this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts5
Files: files | file ages | folders
SHA1: 8671b9e137275d247e67e3d7d5d9c4cb1f380ff7
User & Date: dan 2015-06-26 20:14:23
Context
2015-06-26
20:25
Merge fts5 branch into trunk. check-in: d27d9965 user: dan tags: trunk
20:14
Merge latest trunk with this branch. Closed-Leaf check-in: 8671b9e1 user: dan tags: fts5
20:13
Remove unnecessary lines from fts3.h and main.mk. check-in: c1b268ce user: dan tags: fts5
19:43
Small size reduction and performance increase on the OP_IdxInsert opcode. check-in: b6bedc2e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

  4793   4793   **
  4794   4794   ** This instruction only works for indices.  The equivalent instruction
  4795   4795   ** for tables is OP_Insert.
  4796   4796   */
  4797   4797   case OP_SorterInsert:       /* in2 */
  4798   4798   case OP_IdxInsert: {        /* in2 */
  4799   4799     VdbeCursor *pC;
  4800         -  BtCursor *pCrsr;
  4801   4800     int nKey;
  4802   4801     const char *zKey;
  4803   4802   
  4804   4803     assert( pOp->p1>=0 && pOp->p1<p->nCursor );
  4805   4804     pC = p->apCsr[pOp->p1];
  4806   4805     assert( pC!=0 );
  4807   4806     assert( isSorter(pC)==(pOp->opcode==OP_SorterInsert) );
  4808   4807     pIn2 = &aMem[pOp->p2];
  4809   4808     assert( pIn2->flags & MEM_Blob );
  4810         -  pCrsr = pC->pCursor;
  4811   4809     if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;
  4812         -  assert( pCrsr!=0 );
         4810  +  assert( pC->pCursor!=0 );
  4813   4811     assert( pC->isTable==0 );
  4814   4812     rc = ExpandBlob(pIn2);
  4815   4813     if( rc==SQLITE_OK ){
  4816         -    if( isSorter(pC) ){
         4814  +    if( pOp->opcode==OP_SorterInsert ){
  4817   4815         rc = sqlite3VdbeSorterWrite(pC, pIn2);
  4818   4816       }else{
  4819   4817         nKey = pIn2->n;
  4820   4818         zKey = pIn2->z;
  4821         -      rc = sqlite3BtreeInsert(pCrsr, zKey, nKey, "", 0, 0, pOp->p3, 
         4819  +      rc = sqlite3BtreeInsert(pC->pCursor, zKey, nKey, "", 0, 0, pOp->p3, 
  4822   4820             ((pOp->p5 & OPFLAG_USESEEKRESULT) ? pC->seekResult : 0)
  4823   4821             );
  4824   4822         assert( pC->deferredMoveto==0 );
  4825   4823         pC->cacheStatus = CACHE_STALE;
  4826   4824       }
  4827   4825     }
  4828   4826     break;