/ Check-in [03d03504]
Login

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

Overview
Comment:Set the OPFLG_IN1 flag on a couple of extra opcodes. (CVS 6070)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:03d0350441ef5fa5a9f22fcb0b760200614cf9f9
User & Date: danielk1977 2008-12-29 10:39:54
Context
2008-12-29
14:51
Remove an old variable declaration that was commented out using a C++ comment. (CVS 6071) check-in: 0b972f14 user: danielk1977 tags: trunk
10:39
Set the OPFLG_IN1 flag on a couple of extra opcodes. (CVS 6070) check-in: 03d03504 user: danielk1977 tags: trunk
2008-12-28
20:47
Multi-index OR optimizer response to ORDER BY rowid. But fix in sqlite3_stmt_status(): report a full table scan when "ORDER BY rowid" is used without constraints. (CVS 6069) check-in: 3464d369 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.806 2008/12/23 13:35:23 drh Exp $
           46  +** $Id: vdbe.c,v 1.807 2008/12/29 10:39:54 danielk1977 Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include <ctype.h>
    50     50   #include "vdbeInt.h"
    51     51   
    52     52   /*
    53     53   ** The following global variable is incremented every time a cursor
................................................................................
   805    805     break;
   806    806   }
   807    807   
   808    808   /* Opcode:  Yield P1 * * * *
   809    809   **
   810    810   ** Swap the program counter with the value in register P1.
   811    811   */
   812         -case OP_Yield: {
          812  +case OP_Yield: {            /* in1 */
   813    813     int pcDest;
   814         -  assert( pOp->p1>0 );
   815         -  assert( pOp->p1<=p->nMem );
   816         -  pIn1 = &p->aMem[pOp->p1];
   817    814     assert( (pIn1->flags & MEM_Dyn)==0 );
   818    815     pIn1->flags = MEM_Int;
   819    816     pcDest = (int)pIn1->u.i;
   820    817     pIn1->u.i = pc;
   821    818     REGISTER_TRACE(pOp->p1, pIn1);
   822    819     pc = pcDest;
   823    820     break;
................................................................................
  1029   1026   /* Opcode: Copy P1 P2 * * *
  1030   1027   **
  1031   1028   ** Make a copy of register P1 into register P2.
  1032   1029   **
  1033   1030   ** This instruction makes a deep copy of the value.  A duplicate
  1034   1031   ** is made of any string or blob constant.  See also OP_SCopy.
  1035   1032   */
  1036         -case OP_Copy: {
  1037         -  assert( pOp->p1>0 );
  1038         -  assert( pOp->p1<=p->nMem );
  1039         -  pIn1 = &p->aMem[pOp->p1];
         1033  +case OP_Copy: {             /* in1 */
  1040   1034     assert( pOp->p2>0 );
  1041   1035     assert( pOp->p2<=p->nMem );
  1042   1036     pOut = &p->aMem[pOp->p2];
  1043   1037     assert( pOut!=pIn1 );
  1044   1038     sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);
  1045   1039     Deephemeralize(pOut);
  1046   1040     REGISTER_TRACE(pOp->p2, pOut);
................................................................................
  1055   1049   ** is a string or blob, then the copy is only a pointer to the
  1056   1050   ** original and hence if the original changes so will the copy.
  1057   1051   ** Worse, if the original is deallocated, the copy becomes invalid.
  1058   1052   ** Thus the program must guarantee that the original will not change
  1059   1053   ** during the lifetime of the copy.  Use OP_Copy to make a complete
  1060   1054   ** copy.
  1061   1055   */
  1062         -case OP_SCopy: {
  1063         -  assert( pOp->p1>0 );
  1064         -  assert( pOp->p1<=p->nMem );
  1065         -  pIn1 = &p->aMem[pOp->p1];
         1056  +case OP_SCopy: {            /* in1 */
  1066   1057     REGISTER_TRACE(pOp->p1, pIn1);
  1067   1058     assert( pOp->p2>0 );
  1068   1059     assert( pOp->p2<=p->nMem );
  1069   1060     pOut = &p->aMem[pOp->p2];
  1070   1061     assert( pOut!=pIn1 );
  1071   1062     sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);
  1072   1063     REGISTER_TRACE(pOp->p2, pOut);