Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add a test case for ticket [25e335f802dd]. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e500c15a9f55aed1601f7c14169dd56f |
User & Date: | dan 2017-01-10 17:37:49.188 |
Context
2017-01-11
| ||
14:15 | In the STAT4 computations, ensure that the aAvgEq values do not go negative. (check-in: f58f75b5a0 user: drh tags: trunk) | |
2017-01-10
| ||
20:04 | Changes to allow some multi-row UPDATE statements to avoid the two-pass approach. (check-in: 46db23ccd1 user: dan tags: onepass-update) | |
17:37 | Add a test case for ticket [25e335f802dd]. (check-in: e500c15a9f user: dan tags: trunk) | |
17:33 | Throw an error if the ON clause of a LEFT JOIN references tables to the right of the ON clause. Fix for ticket [25e335f802dd]. (check-in: c92ecff2ec user: drh tags: trunk) | |
Changes
Changes to test/join2.test.
︙ | ︙ | |||
8 9 10 11 12 13 14 | # 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. # | < > | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # 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. # set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix join2 do_test join2-1.1 { execsql { CREATE TABLE t1(a,b); INSERT INTO t1 VALUES(1,11); INSERT INTO t1 VALUES(2,22); INSERT INTO t1 VALUES(3,33); |
︙ | ︙ | |||
67 68 69 70 71 72 73 74 75 | do_test join2-1.7 { execsql { SELECT * FROM t1 NATURAL LEFT OUTER JOIN (t2 NATURAL JOIN t3) } } {1 11 111 1111 2 22 {} {} 3 33 {} {}} } finish_test | > > > > > > > > > > > > > > > > > > > > | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | do_test join2-1.7 { execsql { SELECT * FROM t1 NATURAL LEFT OUTER JOIN (t2 NATURAL JOIN t3) } } {1 11 111 1111 2 22 {} {} 3 33 {} {}} } #------------------------------------------------------------------------- # Check that ticket [25e335f802ddc] has been resolved. It should be an # error for the ON clause of a LEFT JOIN to refer to a table to its right. # do_execsql_test 2.0 { CREATE TABLE aa(a); CREATE TABLE bb(b); CREATE TABLE cc(c); INSERT INTO aa VALUES('one'); INSERT INTO bb VALUES('one'); INSERT INTO cc VALUES('one'); } do_catchsql_test 2.1 { SELECT * FROM aa LEFT JOIN cc ON (a=b) JOIN bb ON (b=c); } {1 {ON clause references tables to its right}} do_catchsql_test 2.2 { SELECT * FROM aa JOIN cc ON (a=b) JOIN bb ON (b=c); } {0 {one one one}} finish_test |