/ Check-in [c64260579d]
Login

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

Overview
Comment:Add test case for ticket #3376. (CVS 5705)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c64260579d353df3eae8c355b082b8206bc6185b
User & Date: drh 2008-09-16 11:58:20
Context
2008-09-16
12:06
Modify the sqlite3VdbeMemCompare() routine so that it does not modify any Mem.z values. Ticket #3376. (CVS 5706) check-in: 2d45055100 user: danielk1977 tags: trunk
11:58
Add test case for ticket #3376. (CVS 5705) check-in: c64260579d user: drh tags: trunk
09:09
Set the type of the "comment" field to SQLITE_TEXT when outputing the results of an EXPLAIN query. (CVS 5704) check-in: 5dff20f4bc user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/collate5.test.

    10     10   #
    11     11   #*************************************************************************
    12     12   # This file implements regression tests for SQLite library.  The
    13     13   # focus of this file is testing DISTINCT, UNION, INTERSECT and EXCEPT
    14     14   # SELECT statements that use user-defined collation sequences. Also
    15     15   # GROUP BY clauses that use user-defined collation sequences.
    16     16   #
    17         -# $Id: collate5.test,v 1.6 2007/11/12 15:29:19 danielk1977 Exp $
           17  +# $Id: collate5.test,v 1.7 2008/09/16 11:58:20 drh Exp $
    18     18   
    19     19   set testdir [file dirname $argv0]
    20     20   source $testdir/tester.tcl
    21     21   
    22     22   
    23     23   #
    24     24   # Tests are organised as follows:
................................................................................
    65     65   } {{} Apple apple banana}
    66     66   do_test collate5-1.3 {
    67     67     execsql {
    68     68       SELECT DISTINCT a, b FROM collate5t1;
    69     69     }
    70     70   } {A Apple a apple B banana N {}}
    71     71   
           72  +# Ticket #3376
           73  +#
           74  +do_test collate5-1.11 {
           75  +  execsql {
           76  +    CREATE TABLE tkt3376(a COLLATE nocase PRIMARY KEY);
           77  +    INSERT INTO tkt3376 VALUES('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz');
           78  +    INSERT INTO tkt3376 VALUES('ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789');
           79  +    SELECT DISTINCT a FROM tkt3376;
           80  +  }
           81  +} {abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789ABXYZ012234567890123456789}
           82  +do_test collate5-1.12 {
           83  +  sqlite3 db2 :memory:
           84  +  db2 eval {
           85  +    PRAGMA encoding=UTF16le;
           86  +    CREATE TABLE tkt3376(a COLLATE nocase PRIMARY KEY);
           87  +    INSERT INTO tkt3376 VALUES('abc');
           88  +    INSERT INTO tkt3376 VALUES('ABX');
           89  +    SELECT DISTINCT a FROM tkt3376;
           90  +  }
           91  +} {abc ABX}
           92  +catch {db2 close}
           93  +
    72     94   # The remainder of this file tests compound SELECT statements.
    73     95   # Omit it if the library is compiled such that they are omitted.
    74     96   #
    75     97   ifcapable !compound {
    76     98     finish_test
    77     99     return
    78    100   }