blob: a4f1f61dad27a4452e6d6d13e0fcfded9fc1f7f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# 2009 July 1
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to verify that ticket #3935 has been fixed.
#
# $Id: tkt3935.test,v 1.2 2009/07/01 16:12:08 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_test tkt3935.1 {
execsql {
CREATE TABLE t1(a, b);
CREATE TABLE t2(c, d);
}
} {}
do_test tkt3935.2 {
execsql { SELECT j1.b FROM ( SELECT * FROM t1 INNER JOIN t2 ON a=c ) AS j1 }
} {}
do_test tkt3935.3 {
execsql { SELECT j1.b FROM (t1 INNER JOIN t2 ON a=c) AS j1 }
} {}
do_test tkt3935.4 {
catchsql { SELECT a FROM (t1) AS t ON b USING(a) }
} {1 {near "USING": syntax error}}
do_test tkt3935.5 {
catchsql { SELECT a FROM (t1) AS t ON b }
} {1 {a JOIN clause is required before ON}}
do_test tkt3935.6 {
catchsql { SELECT a FROM (SELECT * FROM t1) AS t ON b USING(a) }
} {1 {near "USING": syntax error}}
do_test tkt3935.7 {
catchsql { SELECT a FROM (SELECT * FROM t1) AS t ON b }
} {1 {a JOIN clause is required before ON}}
do_test tkt3935.8 {
catchsql { SELECT a FROM t1 AS t ON b }
} {1 {a JOIN clause is required before ON}}
do_test tkt3935.9 {
catchsql { SELECT a FROM t1 AS t ON b USING(a) }
} {1 {near "USING": syntax error}}
do_test tkt3935.10 {
catchsql { SELECT a FROM t1 AS t USING(a) }
} {1 {a JOIN clause is required before USING}}
finish_test
|