xref: /illumos-gate/usr/src/lib/libsqlite/test/join3_28.test (revision e3ae4b35c024af1196582063ecee3ab79367227d)
1#
2# 2002 May 24
3#
4# The author disclaims copyright to this source code.  In place of
5# a legal notice, here is a blessing:
6#
7#    May you do good and not evil.
8#    May you find forgiveness for yourself and forgive others.
9#    May you share freely, never taking more than you give.
10#
11#***********************************************************************
12# This file implements regression tests for SQLite library.
13#
14# This file implements tests for joins, including outer joins, where
15# there are a large number of tables involved in the join.
16#
17# $Id: join3_28.test,v 1.1.2.1 2004/07/22 16:08:39 drh Exp $
18
19set testdir [file dirname $argv0]
20source $testdir/tester.tcl
21
22catch {unset result}
23set result {}
24for {set N 1} {$N<=40} {incr N} {
25  lappend result $N
26  do_test join3-1.$N {
27    execsql "CREATE TABLE t${N}(x);"
28    execsql "INSERT INTO t$N VALUES($N)"
29    set sql "SELECT * FROM t1"
30    for {set i 2} {$i<=$N} {incr i} {append sql ", t$i"}
31    execsql $sql
32  } $result
33}
34
35finish_test
36