SQLite

Ticket Change Details
Login
Overview

Artifact ID: 55771e45548b9eca89d2c745c7ec9122e5b4f384
Ticket: c997b11c4d53a2ee9983111d0c676dd7d4f01ec7
ORDER BY clause ignored in 3-way join query
User & Date: dan 2013-01-09 09:39:22
Changes

  1. comment changed to:
    <verbatim>
    $ ./sqlite3 
    SQLite version 3.7.16 2013-01-08 12:48:10
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    sqlite> CREATE TABLE t1(a INTEGER PRIMARY KEY);
    sqlite> CREATE TABLE t2(b INTEGER PRIMARY KEY, c INTEGER);
    sqlite> CREATE TABLE t3(d INTEGER);
    sqlite> 
    sqlite> INSERT INTO t1 VALUES(1);
    sqlite> INSERT INTO t1 VALUES(2);
    sqlite> INSERT INTO t1 VALUES(3);
    sqlite> 
    sqlite> INSERT INTO t2 VALUES(3, 1);
    sqlite> INSERT INTO t2 VALUES(4, 2);
    sqlite> INSERT INTO t2 VALUES(5, 3);
    sqlite> 
    sqlite> INSERT INTO t3 VALUES(4);
    sqlite> INSERT INTO t3 VALUES(3);
    sqlite> INSERT INTO t3 VALUES(5);
    sqlite>
    sqlite> SELECT t1.a FROM t1, t2, t3 WHERE t1.a=t2.c AND t2.b=t3.d ORDER BY t1.a;
    2
    1
    3
    </verbatim>
    
    Problem introduced by [956e4d7f89].
    
    First reported on the mailing list: http://www.mail-archive.com/sqlite-users@sqlite.org/msg74717.html
    
  2. Untracked field detected: "Application_Fault"
  3. severity changed to: "Critical"
  4. status changed to: "Open"
  5. subsystem changed to: "Code_Generator"
  6. title changed to: "ORDER BY clause ignored in 3-way join query"
  7. type changed to: "Code_Defect"