/ Check-in [162421da]
Login

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

Overview
Comment:Add file tkt-3a77c9714e.test, containing tests to verify that the problem documented by ticket [3a77c9714e] has been fixed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 162421dadf93e9201c3290d800c597cbeeacdb40
User & Date: dan 2011-12-06 13:46:54
Context
2011-12-07
01:55
Cherrypick the [7e5b56b1c6] fix for the sqlite3SelectDup() routine into trunk. check-in: 7fc53509 user: drh tags: trunk
2011-12-06
19:44
Begin adding the data-structure explaining subsystem. All is contained within check-in: 79ae51c5 user: drh tags: tree-explain
13:46
Add file tkt-3a77c9714e.test, containing tests to verify that the problem documented by ticket [3a77c9714e] has been fixed. check-in: 162421da user: dan tags: trunk
13:24
Do not reuse temp registers originally allocated to a subroutine within the main body of the program logic, since if the subroutine is called while the reused temp registers are in use, their values will get clobbered. Candidate fix for ticket [3a77c9714e63330] check-in: 092d5331 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added test/tkt-3a77c9714e.test.

            1  +# 2011 December 06
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            6  +#    May you do good and not evil.
            7  +#    May you find forgiveness for yourself and forgive others.
            8  +#    May you share freely, never taking more than you give.
            9  +#
           10  +#***********************************************************************
           11  +# This file implements regression tests for SQLite library.
           12  +#
           13  +# This file implements tests to verify that ticket [3a77c9714e] has been
           14  +# fixed.  
           15  +
           16  +set testdir [file dirname $argv0]
           17  +source $testdir/tester.tcl
           18  +
           19  +set testprefix "tkt-3a77c9714e"
           20  +
           21  +do_execsql_test 1.1 {
           22  +  CREATE TABLE t1(t1_id INTEGER PRIMARY KEY, t1_title TEXT);
           23  +  CREATE TABLE t2(t2_id INTEGER PRIMARY KEY, t2_title TEXT);
           24  +  CREATE TABLE t3(t3_id INTEGER PRIMARY KEY, t3_title TEXT);
           25  +
           26  +  INSERT INTO t1 (t1_id, t1_title) VALUES (888, 'ABCDEF');
           27  +  INSERT INTO t2 (t2_id, t2_title) VALUES (999, 'ABCDEF');
           28  +  INSERT INTO t3 (t3_id, t3_title) VALUES (999, 'ABCDEF');
           29  +}
           30  +
           31  +do_execsql_test 1.2 {
           32  +  SELECT t1_title, t2_title
           33  +  FROM t1 LEFT JOIN t2
           34  +  WHERE
           35  +    t2_id = (SELECT t3_id FROM
           36  +     ( SELECT t3_id FROM t3 WHERE t3_title=t1_title LIMIT 500 )
           37  +  )
           38  +} {ABCDEF ABCDEF}
           39  +
           40  +do_execsql_test 2.1 {
           41  +  CREATE TABLE [Beginnings] (
           42  +    [Id] INTEGER PRIMARY KEY AUTOINCREMENT,[Title] TEXT, [EndingId] INTEGER
           43  +  );
           44  +  CREATE TABLE [Endings] (Id INT,Title TEXT,EndingId INT);
           45  +  INSERT INTO Beginnings (Id, Title, EndingId) VALUES (1, 'FACTOR', 18);
           46  +  INSERT INTO Beginnings (Id, Title, EndingId) VALUES (2, 'SWIMM', 18);
           47  +  INSERT INTO Endings (Id, Title, EndingId) VALUES (1, 'ING', 18);
           48  +}
           49  +
           50  +do_execsql_test 2.2 {
           51  +  SELECT
           52  +    SrcWord, Beginnings.Title
           53  +    FROM 
           54  +      (SELECT 'FACTORING' AS SrcWord UNION SELECT 'SWIMMING' AS SrcWord )
           55  +    LEFT JOIN 
           56  +      Beginnings
           57  +    WHERE Beginnings.Id= (
           58  +      SELECT BeginningId FROM (
           59  +        SELECT SrcWord, B.Id as BeginningId, B.Title || E.Title As Connected
           60  +        FROM Beginnings B LEFT JOIN Endings E ON B.EndingId=E.EndingId
           61  +        WHERE Connected=SrcWord LIMIT 1
           62  +      )
           63  +    )
           64  +} {FACTORING FACTOR SWIMMING SWIMM} 
           65  +
           66  +
           67  +finish_test
           68  +