mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Report an error if a USING or ON clause is specified following a from-list element that is not to the right of a join operator. Fix for #3846. (CVS 6832)
FossilOrigin-Name: 29b48972b65a17dab343b063a620cf8d456a923c
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
# virtual tables. The test cases in this file are copied from the file
|
||||
# join.test, and some of the comments still reflect that.
|
||||
#
|
||||
# $Id: vtab6.test,v 1.4 2008/07/12 14:52:21 drh Exp $
|
||||
# $Id: vtab6.test,v 1.5 2009/07/01 16:12:08 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -265,10 +265,8 @@ do_test vtab6-3.4 {
|
||||
}
|
||||
} {1 {cannot join using column a - column not present in both tables}}
|
||||
do_test vtab6-3.5 {
|
||||
catchsql {
|
||||
SELECT * FROM t1 USING(a);
|
||||
}
|
||||
} {0 {1 2 3 2 3 4 3 4 5}}
|
||||
catchsql { SELECT * FROM t1 USING(a) }
|
||||
} {1 {a JOIN clause is required before USING}}
|
||||
do_test vtab6-3.6 {
|
||||
catchsql {
|
||||
SELECT * FROM t1 JOIN t2 ON t3.a=t2.b;
|
||||
|
Reference in New Issue
Block a user