mirror of
https://github.com/sqlite/sqlite.git
synced 2026-10-23 21:49:02 +03:00
Add join tests to the 2.8 branch. (CVS 1850)
FossilOrigin-Name: e5546f49c79155ed2695a1d58ca8044e79d60802
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Update\sthe\sversion\snumber\sfor\srelease\s2.8.15.\s(CVS\s1849)
|
||||
D 2004-07-22T15:53:37
|
||||
C Add\sjoin\stests\sto\sthe\s2.8\sbranch.\s(CVS\s1850)
|
||||
D 2004-07-22T16:08:39
|
||||
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
|
||||
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||
@@ -99,6 +99,8 @@ F test/intpkey.test 9320af48415c594afd4e15f8ef0daa272e05502e
|
||||
F test/ioerr.test 5dbaf09f96b56ee01cf3edd762b96eb4ad2c9ca4
|
||||
F test/join.test 9ef6aabaac9de51d5fc41e68d1f4355da05a84cd
|
||||
F test/join2.test c97e4c5aa65dea462145529e58212a709b4722b8
|
||||
F test/join3_28.test dbfbca6e102d30205e7c1854b0d4fdfcd04de938
|
||||
F test/join4_28.test aa3dba47dcc9c835ac505111ff3d925f0657ef15
|
||||
F test/lastinsert.test 31382f88b9b0270333ac9e4a17f2c2f4732da718
|
||||
F test/laststmtchanges.test cabd11bdfbaf73a4486c50b58297d9c2038ccc18
|
||||
F test/limit.test c6365450f3180170c0fa1b0bf1ae48522c33b731
|
||||
@@ -189,7 +191,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
|
||||
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
|
||||
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
|
||||
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
|
||||
P 5c77b332bd7704b754edf6876ae668136b05876f
|
||||
R 6e2976688b6e834db151b72e8343e546
|
||||
P 9b3c3ca4aff10c7e395d195cd76a1f3c038cb066
|
||||
R 2ddf95a9ee2f62de830f29404030a22a
|
||||
U drh
|
||||
Z 391c4743adc14b1e648ee959f923ae1a
|
||||
Z 1e44afd684f277f761abdf6ace2ba2c9
|
||||
|
||||
@@ -1 +1 @@
|
||||
9b3c3ca4aff10c7e395d195cd76a1f3c038cb066
|
||||
e5546f49c79155ed2695a1d58ca8044e79d60802
|
||||
34
test/join3_28.test
Normal file
34
test/join3_28.test
Normal file
@@ -0,0 +1,34 @@
|
||||
# 2002 May 24
|
||||
#
|
||||
# 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 for joins, including outer joins, where
|
||||
# there are a large number of tables involved in the join.
|
||||
#
|
||||
# $Id: join3_28.test,v 1.1.2.1 2004/07/22 16:08:39 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
catch {unset result}
|
||||
set result {}
|
||||
for {set N 1} {$N<=40} {incr N} {
|
||||
lappend result $N
|
||||
do_test join3-1.$N {
|
||||
execsql "CREATE TABLE t${N}(x);"
|
||||
execsql "INSERT INTO t$N VALUES($N)"
|
||||
set sql "SELECT * FROM t1"
|
||||
for {set i 2} {$i<=$N} {incr i} {append sql ", t$i"}
|
||||
execsql $sql
|
||||
} $result
|
||||
}
|
||||
|
||||
finish_test
|
||||
77
test/join4_28.test
Normal file
77
test/join4_28.test
Normal file
@@ -0,0 +1,77 @@
|
||||
# 2002 May 24
|
||||
#
|
||||
# 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 for left outer joins containing WHERE
|
||||
# clauses that restrict the scope of the left term of the join.
|
||||
#
|
||||
# $Id: join4_28.test,v 1.1.2.1 2004/07/22 16:08:39 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
do_test join4-1.1 {
|
||||
execsql {
|
||||
create temp table t1(a integer, b varchar(10));
|
||||
insert into t1 values(1,'one');
|
||||
insert into t1 values(2,'two');
|
||||
insert into t1 values(3,'three');
|
||||
insert into t1 values(4,'four');
|
||||
|
||||
create temp table t2(x integer, y varchar(10), z varchar(10));
|
||||
insert into t2 values(2,'niban','ok');
|
||||
insert into t2 values(4,'yonban','err');
|
||||
}
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x where t2.z='ok'
|
||||
}
|
||||
} {2 two 2 niban ok}
|
||||
do_test join4-1.2 {
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x and t2.z='ok'
|
||||
}
|
||||
} {1 one {} {} {} 2 two 2 niban ok 3 three {} {} {} 4 four {} {} {}}
|
||||
do_test join4-1.3 {
|
||||
execsql {
|
||||
create index i2 on t2(z);
|
||||
}
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x where t2.z='ok'
|
||||
}
|
||||
} {2 two 2 niban ok}
|
||||
do_test join4-1.4 {
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x and t2.z='ok'
|
||||
}
|
||||
} {1 one {} {} {} 2 two 2 niban ok 3 three {} {} {} 4 four {} {} {}}
|
||||
do_test join4-1.5 {
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x where t2.z>='ok'
|
||||
}
|
||||
} {2 two 2 niban ok}
|
||||
do_test join4-1.4 {
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x and t2.z>='ok'
|
||||
}
|
||||
} {1 one {} {} {} 2 two 2 niban ok 3 three {} {} {} 4 four {} {} {}}
|
||||
do_test join4-1.6 {
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x where t2.z IN ('ok')
|
||||
}
|
||||
} {2 two 2 niban ok}
|
||||
do_test join4-1.7 {
|
||||
execsql {
|
||||
select * from t1 left outer join t2 on t1.a=t2.x and t2.z IN ('ok')
|
||||
}
|
||||
} {1 one {} {} {} 2 two 2 niban ok 3 three {} {} {} 4 four {} {} {}}
|
||||
|
||||
|
||||
finish_test
|
||||
Reference in New Issue
Block a user