1# 2013-04-13 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 tests features of the name resolver (the component that 13# figures out what identifiers in the SQL statement refer to) that 14# were fixed by ticket [2500cdb9be] 15# 16 17set testdir [file dirname $argv0] 18source $testdir/tester.tcl 19 20do_test resolver01-1.1 { 21 catchsql { 22 CREATE TABLE t1(x, y); INSERT INTO t1 VALUES(11,22); 23 CREATE TABLE t2(y, z); INSERT INTO t2 VALUES(33,44); 24 SELECT 1 AS y FROM t1, t2 ORDER BY y; 25 } 26} {0 1} 27do_test resolver01-1.2 { 28 catchsql { 29 SELECT 2 AS y FROM t1, t2 ORDER BY y COLLATE nocase; 30 } 31} {0 2} 32do_test resolver01-1.3 { 33 catchsql { 34 SELECT 3 AS y FROM t1, t2 ORDER BY +y; 35 } 36} {0 3} 37 38 39finish_test 40