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 # Tests to make sure #3997 is fixed.
14 # $Id: tkt3997.test,v 1.1 2009/07/28 13:30:31 danielk1977 Exp $
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
19 proc reverse {lhs rhs} {
20 return [string compare $rhs $lhs]
22 proc usual {lhs rhs} {
23 return [string compare $lhs $rhs]
26 db collate reverse reverse
27 db collate usual usual
31 create table mytext(name BLOB);
32 INSERT INTO mytext VALUES('abc');
33 INSERT INTO mytext VALUES('acd');
34 INSERT INTO mytext VALUES('afe');
41 ORDER BY name COLLATE reverse
47 FROM (SELECT name FROM mytext)
48 ORDER BY name COLLATE reverse
54 CREATE TABLE mytext2(name COLLATE reverse);
55 INSERT INTO mytext2 SELECT name FROM mytext;
61 FROM (SELECT name FROM mytext2)
68 FROM (SELECT name FROM mytext2)
69 ORDER BY name COLLATE usual