/ Check-in [e7991bc5]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:New requirements marks on compound SELECT statements.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e7991bc510f63f3594603a91f6f3b32e94d90e72
User & Date: drh 2015-03-05 01:29:51
Context
2015-03-05
14:29
Revert "PRAGMA index_info" to output only three columns, for complete compatibility with prior versions. The new "PRAGMA index_xinfo" can be used to get the extra information in 4th, 5th, and 6th columns. check-in: fc543c2c user: drh tags: trunk
01:29
New requirements marks on compound SELECT statements. check-in: e7991bc5 user: drh tags: trunk
2015-03-04
23:14
New requirements marks on INSERT and INDEXED BY and on some sqlite3_config() options. check-in: c298ea0b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/limit.test.

   246    246     execsql {
   247    247       SELECT * FROM t6 LIMIT 0 OFFSET 1
   248    248     }
   249    249   } {}
   250    250   
   251    251   # Make sure LIMIT works well with compound SELECT statements.
   252    252   # Ticket #393
          253  +#
          254  +# EVIDENCE-OF: R-13512-64012 In a compound SELECT, only the last or
          255  +# right-most simple SELECT may contain a LIMIT clause.
          256  +#
          257  +# EVIDENCE-OF: R-03782-50113 In a compound SELECT, the LIMIT clause
          258  +# applies to the entire compound, not just the final SELECT.
   253    259   #
   254    260   ifcapable compound {
   255    261   do_test limit-7.1.1 {
   256    262     catchsql {
   257    263       SELECT x FROM t2 LIMIT 5 UNION ALL SELECT a FROM t6;
   258    264     }
   259    265   } {1 {LIMIT clause should come after UNION ALL not before}}

Changes to test/select4.test.

   101    101         SELECT log FROM t1 WHERE n IN 
   102    102           (SELECT DISTINCT log FROM t1 UNION ALL
   103    103            SELECT n FROM t1 WHERE log=3)
   104    104         ORDER BY log;
   105    105       }
   106    106     } {0 1 2 2 3 3 3 3}
   107    107   }
          108  +
          109  +# EVIDENCE-OF: R-02644-22131 In a compound SELECT statement, only the
          110  +# last or right-most simple SELECT may have an ORDER BY clause.
          111  +#
   108    112   do_test select4-1.3 {
   109    113     set v [catch {execsql {
   110    114       SELECT DISTINCT log FROM t1 ORDER BY log
   111    115       UNION ALL
   112    116       SELECT n FROM t1 WHERE log=3
   113    117       ORDER BY log;
   114    118     }} msg]