/ Check-in [a2135ad1]
Login

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

Overview
Comment:Update the OP_Move opcode to shift the pScopyFrom pointer of aliases when compiled with SQLITE_DEBUG. Ticket [d63523637517386191].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a2135ad13049c170b33315a949b1544e6a136183
User & Date: drh 2011-08-03 16:40:15
References
2015-04-28
12:44
Shift the Mem.pScopyFrom pointer in the correct direction in OP_Move. Fix for a defective check-in [a2135ad13049] and ticket [d6352363751]. Debugging code only - does not affect normal operation. check-in: add4e043 user: drh tags: trunk
Context
2011-08-03
22:06
Merge the winopen-retry-logic branch into trunk. The biggest change here is to test scripts, which should now use such as copy_file and delete_file from tester.tcl rather than the raw file commands of TCL. check-in: b90c28be user: drh tags: trunk
21:46
Merge the latest trunk changes into the sessions branch. check-in: c5709036 user: drh tags: sessions
16:40
Update the OP_Move opcode to shift the pScopyFrom pointer of aliases when compiled with SQLITE_DEBUG. Ticket [d63523637517386191]. check-in: a2135ad1 user: drh tags: trunk
2011-08-02
20:14
Exclude the 8_3_names.test script from the inmemory_journal permutation. check-in: 78fc94c8 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

1023
1024
1025
1026
1027
1028
1029





1030
1031
1032
1033
1034
1035
1036
    assert( pOut<=&aMem[p->nMem] );
    assert( pIn1<=&aMem[p->nMem] );
    assert( memIsValid(pIn1) );
    memAboutToChange(p, pOut);
    zMalloc = pOut->zMalloc;
    pOut->zMalloc = 0;
    sqlite3VdbeMemMove(pOut, pIn1);





    pIn1->zMalloc = zMalloc;
    REGISTER_TRACE(p2++, pOut);
    pIn1++;
    pOut++;
  }
  break;
}







>
>
>
>
>







1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
    assert( pOut<=&aMem[p->nMem] );
    assert( pIn1<=&aMem[p->nMem] );
    assert( memIsValid(pIn1) );
    memAboutToChange(p, pOut);
    zMalloc = pOut->zMalloc;
    pOut->zMalloc = 0;
    sqlite3VdbeMemMove(pOut, pIn1);
#ifdef SQLITE_DEBUG
    if( pOut->pScopyFrom>=&aMem[p1] && pOut->pScopyFrom<&aMem[p1+pOp->p3] ){
      pOut->pScopyFrom += p1 - pOp->p2;
    }
#endif
    pIn1->zMalloc = zMalloc;
    REGISTER_TRACE(p2++, pOut);
    pIn1++;
    pOut++;
  }
  break;
}

Added test/tkt-d635236375.test.













































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 2011 August 3
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing that bug [d63523637517386191d634e]
# has been fixed.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl

set ::testprefix tkt-d635236375

do_test 1.0 {
  execsql {
    CREATE TABLE t1(id1 INTEGER PRIMARY KEY);
    INSERT INTO t1 VALUES(9999);
    CREATE TABLE t2(id2 INTEGER PRIMARY KEY);
    INSERT INTO t2 VALUES(12345);
    INSERT INTO t2 VALUES(54321);
    SELECT DISTINCT id1 AS x, id1 AS y FROM t1, t2;
  }
} {9999 9999}
do_test 1.1 {
  execsql {
    SELECT count(*) FROM t1, t2 GROUP BY id1, id1;
  }
} {2}


finish_test