3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
12 # This file implements tests to verify that ticket [cbd054fa6b] has been
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
24 do_test tkt-cbd05-1.1 {
26 CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT UNIQUE NOT NULL);
27 CREATE INDEX t1_x ON t1(b);
28 INSERT INTO t1 VALUES (NULL, '');
29 INSERT INTO t1 VALUES (NULL, 'A');
30 INSERT INTO t1 VALUES (NULL, 'B');
31 INSERT INTO t1 VALUES (NULL, 'C');
32 INSERT INTO t1 VALUES (NULL, 'D');
33 INSERT INTO t1 VALUES (NULL, 'E');
34 INSERT INTO t1 VALUES (NULL, 'F');
35 INSERT INTO t1 VALUES (NULL, 'G');
36 INSERT INTO t1 VALUES (NULL, 'H');
37 INSERT INTO t1 VALUES (NULL, 'I');
38 SELECT count(*) FROM t1;
41 do_test tkt-cbd05-1.2 {
46 do_test tkt-cbd05-1.3 {
48 SELECT tbl,idx,group_concat(sample,' ')
53 } {t1 t1_x { A B C D E F G H I}}
55 do_test tkt-cbd05-2.1 {
58 CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB UNIQUE NOT NULL);
59 CREATE INDEX t1_x ON t1(b);
60 INSERT INTO t1 VALUES(NULL, X'');
61 INSERT INTO t1 VALUES(NULL, X'41');
62 INSERT INTO t1 VALUES(NULL, X'42');
63 INSERT INTO t1 VALUES(NULL, X'43');
64 INSERT INTO t1 VALUES(NULL, X'44');
65 INSERT INTO t1 VALUES(NULL, X'45');
66 INSERT INTO t1 VALUES(NULL, X'46');
67 INSERT INTO t1 VALUES(NULL, X'47');
68 INSERT INTO t1 VALUES(NULL, X'48');
69 INSERT INTO t1 VALUES(NULL, X'49');
70 SELECT count(*) FROM t1;
73 do_test tkt-cbd05-2.2 {
78 do_test tkt-cbd05-2.3 {
80 SELECT tbl,idx,group_concat(sample,' ')
85 } {t1 t1_x { A B C D E F G H I}}