1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

:-) (CVS 25)

FossilOrigin-Name: 35a8f523e8389a1a6e41f6561500644b165d556e
This commit is contained in:
drh
2000-05-31 18:20:14 +00:00
parent 3aadb2e64c
commit da9d6c4572
5 changed files with 42 additions and 23 deletions

View File

@ -23,7 +23,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
# $Id: select1.test,v 1.1 2000/05/31 17:59:27 drh Exp $
# $Id: select1.test,v 1.2 2000/05/31 18:20:14 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -271,5 +271,25 @@ do_test select-6.6 {
ORDER BY f2}} msg]
lappend v $msg
} {0 {field1 33 test2.t1 abc field1 77 test2.t1 abc}}
do_test select-6.7 {
set v [catch {execsql2 {SELECT A.f1, t1 FROM test1 as A, test2
ORDER BY f2}} msg]
lappend v $msg
} {0 {A.f1 11 test2.t1 abc A.f1 33 test2.t1 abc}}
do_test select-6.8 {
set v [catch {execsql2 {SELECT A.f1, f1 FROM test1 as A, test1 as B
ORDER BY f2}} msg]
lappend v $msg
} {1 {ambiguous field name: f1}}
do_test select-6.8 {
set v [catch {execsql2 {SELECT A.f1, B.f1 FROM test1 as A, test1 as B
ORDER BY f2}} msg]
lappend v $msg
} {1 {ambiguous field name: f2}}
do_test select-6.9 {
set v [catch {execsql2 {SELECT A.f1, B.f1 FROM test1 as A, test1 as B
ORDER BY A.f1, B.f1}} msg]
lappend v $msg
} {0 {A.f1 11 B.f1 11 A.f1 11 B.f1 33 A.f1 33 B.f1 11 A.f1 33 B.f1 33}}
finish_test