1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Continued refactoring of the name resolution logic and query optimizer. (CVS 2236)

FossilOrigin-Name: d8b2a7e09187564fe66a2b4bf0992c6a017146cf
This commit is contained in:
drh
2005-01-19 23:24:50 +00:00
parent 76b047d957
commit 1398ad3639
16 changed files with 182 additions and 107 deletions

View File

@@ -13,7 +13,7 @@
# This file implements tests for joins, including outer joins, where
# there are a large number of tables involved in the join.
#
# $Id: join3.test,v 1.3 2004/07/20 12:45:22 drh Exp $
# $Id: join3.test,v 1.4 2005/01/19 23:24:51 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -22,7 +22,7 @@ source $testdir/tester.tcl
#
catch {unset ::result}
set result {}
for {set N 1} {$N<=40} {incr N} {
for {set N 1} {$N<=$bitmask_size} {incr N} {
lappend result $N
do_test join3-1.$N {
execsql "CREATE TABLE t${N}(x);"
@@ -36,7 +36,7 @@ for {set N 1} {$N<=40} {incr N} {
# Joins with a comparison
#
set result {}
for {set N 1} {$N<=40} {incr N} {
for {set N 1} {$N<=$bitmask_size} {incr N} {
lappend result $N
do_test join3-2.$N {
set sql "SELECT * FROM t1"
@@ -50,4 +50,13 @@ for {set N 1} {$N<=40} {incr N} {
} $result
}
# Error of too many tables in the join
#
do_test join3-3.1 {
set sql "SELECT * FROM t1 AS t0, t1"
for {set i 2} {$i<=$bitmask_size} {incr i} {append sql ", t$i"}
catchsql $sql
} [list 1 "at most $bitmask_size tables in a join"]
finish_test