/ Check-in [c3cf54a1]
Login

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

Overview
Comment:Add a test script to verify that ticket #3419 stays fixed. (CVS 5771)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c3cf54a1b6bbaaeab4cab701c6cbbed02695facc
User & Date: drh 2008-10-06 15:31:13
Context
2008-10-06
16:18
Allow INDEXED BY and NOT INDEXED to be used in UPDATE and DELETE statements. (CVS 5772) check-in: 83a7e446 user: danielk1977 tags: trunk
15:31
Add a test script to verify that ticket #3419 stays fixed. (CVS 5771) check-in: c3cf54a1 user: drh tags: trunk
15:18
Fix a typo in check-in (5769) (CVS 5770) check-in: 24891902 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added test/tkt3419.test.

            1  +# 2008 October 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  +#
           12  +# This file implements regression tests for SQLite library.  The
           13  +# focus of this file is testing the fix for ticket #3419.
           14  +# Ticket #3419 is really a duplication of #3408 and had already
           15  +# been fixed by the time it was reported.  But it never hurts to
           16  +# add new test cases.
           17  +#
           18  +# $Id: tkt3419.test,v 1.1 2008/10/06 15:31:13 drh Exp $
           19  +
           20  +set testdir [file dirname $argv0]
           21  +source $testdir/tester.tcl
           22  +
           23  +do_test tkt3419-1.1 {
           24  +  execsql {
           25  +    create table a(id integer primary key);
           26  +    create table b(id integer primary key, a_id integer);
           27  +    create table c(id integer primary key, b_id integer);
           28  +  
           29  +    insert into a values (1);
           30  +    insert into a values (2);
           31  +  
           32  +    insert into b values (3, 1);
           33  +    insert into b values (4, 1);
           34  +    insert into b values (5, 1);
           35  +    insert into b values (6, 1);
           36  +    insert into b values (9, 2);
           37  +  
           38  +    insert into c values (4, 3);
           39  +    insert into c values (5, 5);
           40  +    insert into c values (6, 4);
           41  +    insert into c values (7, 6);
           42  +    insert into c values (8, 9);
           43  +  
           44  +    select * FROM a, b, c WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
           45  +  }
           46  +} {2 9 2 8 9}
           47  +do_test tkt3419-1.2 {
           48  +  execsql {
           49  +    select * FROM a, c, b WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
           50  +  }
           51  +} {2 8 9 9 2}
           52  +do_test tkt3419-1.3 {
           53  +  execsql {
           54  +    select * FROM b, a, c WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
           55  +  }
           56  +} {9 2 2 8 9}
           57  +do_test tkt3419-1.4 {
           58  +  execsql {
           59  +    select * FROM b, c, a WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
           60  +  }
           61  +} {9 2 8 9 2}
           62  +do_test tkt3419-1.5 {
           63  +  execsql {
           64  +    select * FROM c, a, b WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
           65  +  }
           66  +} {8 9 2 9 2}
           67  +do_test tkt3419-1.6 {
           68  +  execsql {
           69  +    select * FROM c, b, a WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
           70  +  }
           71  +} {8 9 9 2 2}
           72  +
           73  +finish_test