OLD | NEW |
1 # 2002 May 24 | 1 # 2002 May 24 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 # a problem. | 680 # a problem. |
681 ifcapable pragma&&compileoption_diags { | 681 ifcapable pragma&&compileoption_diags { |
682 if {[lsearch [db eval {PRAGMA compile_options}] MEMDEBUG]<0} { | 682 if {[lsearch [db eval {PRAGMA compile_options}] MEMDEBUG]<0} { |
683 jointest join-12.10 65534 {1 {at most 64 tables in a join}} | 683 jointest join-12.10 65534 {1 {at most 64 tables in a join}} |
684 jointest join-12.11 65535 {1 {too many references to "t14": max 65535}} | 684 jointest join-12.11 65535 {1 {too many references to "t14": max 65535}} |
685 jointest join-12.12 65536 {1 {too many references to "t14": max 65535}} | 685 jointest join-12.12 65536 {1 {too many references to "t14": max 65535}} |
686 jointest join-12.13 65537 {1 {too many references to "t14": max 65535}} | 686 jointest join-12.13 65537 {1 {too many references to "t14": max 65535}} |
687 } | 687 } |
688 } | 688 } |
689 | 689 |
| 690 |
| 691 #------------------------------------------------------------------------- |
| 692 # Test a problem with reordering tables following a LEFT JOIN. |
| 693 # |
| 694 do_execsql_test join-13.0 { |
| 695 CREATE TABLE aa(a); |
| 696 CREATE TABLE bb(b); |
| 697 CREATE TABLE cc(c); |
| 698 |
| 699 INSERT INTO aa VALUES(45); |
| 700 INSERT INTO cc VALUES(45); |
| 701 INSERT INTO cc VALUES(45); |
| 702 } |
| 703 |
| 704 do_execsql_test join-13.1 { |
| 705 SELECT * FROM aa LEFT JOIN bb, cc WHERE cc.c=aa.a; |
| 706 } {45 {} 45 45 {} 45} |
| 707 |
| 708 # In the following, the order of [cc] and [bb] must not be exchanged, even |
| 709 # though this would be helpful if the query used an inner join. |
| 710 do_execsql_test join-13.2 { |
| 711 CREATE INDEX ccc ON cc(c); |
| 712 SELECT * FROM aa LEFT JOIN bb, cc WHERE cc.c=aa.a; |
| 713 } {45 {} 45 45 {} 45} |
| 714 |
| 715 |
690 finish_test | 716 finish_test |
OLD | NEW |