1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

An an extra test associated with ticket #387. (CVS 1050)

FossilOrigin-Name: 6a07ac3782bc18f907ffcf66d908ddaa82ab9293
This commit is contained in:
drh
2003-07-09 16:34:56 +00:00
parent 073e5a7751
commit da808d56dc
3 changed files with 17 additions and 9 deletions

View File

@ -13,7 +13,7 @@
# This file implements tests for miscellanous features that were
# left out of other test files.
#
# $Id: misc2.test,v 1.3 2003/06/29 20:25:09 drh Exp $
# $Id: misc2.test,v 1.4 2003/07/09 16:34:56 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -42,7 +42,7 @@ do_test misc2-2.1 {
execsql {
CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3);
CREATE TABLE t2(x,y,z);
CREATE TABLE t2(a,b,c);
INSERT INTO t2 VALUES(7,8,9);
SELECT rowid, * FROM (SELECT * FROM t1, t2);
}
@ -53,3 +53,11 @@ do_test misc2-2.2 {
SELECT rowid, * FROM v1;
}
} {{} 1 2 3 7 8 9}
# Check name binding precedence. Ticket #387
#
do_test misc2-3.1 {
catchsql {
SELECT t1.b+t2.b AS a, t1.a, t2.a FROM t1, t2 WHERE a==10
}
} {1 {ambiguous column name: a}}