mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Better resolution of ORDER BY terms in compound queries. Candidate
solution for ticket #2822. Needs more testing and documentation before going final. (CVS 4602) FossilOrigin-Name: 62a78d212c53a9cb1759d03134653a75f3a086b6
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the SELECT statement.
|
||||
#
|
||||
# $Id: select1.test,v 1.54 2007/07/23 22:51:15 drh Exp $
|
||||
# $Id: select1.test,v 1.55 2007/12/08 21:10:20 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -517,7 +517,7 @@ do_test select1-6.10 {
|
||||
do_test select1-6.11 {
|
||||
set v [catch {execsql2 {
|
||||
SELECT f1 FROM test1 UNION SELECT f2+100 FROM test1
|
||||
ORDER BY f2+100;
|
||||
ORDER BY f2+101;
|
||||
}} msg]
|
||||
lappend v $msg
|
||||
} {1 {ORDER BY term number 1 does not match any result column}}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# focus of this file is testing UNION, INTERSECT and EXCEPT operators
|
||||
# in SELECT statements.
|
||||
#
|
||||
# $Id: select4.test,v 1.20 2006/06/20 11:01:09 danielk1977 Exp $
|
||||
# $Id: select4.test,v 1.21 2007/12/08 21:10:20 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -283,7 +283,7 @@ do_test select4-5.2b {
|
||||
SELECT DISTINCT log AS xyzzy FROM t1
|
||||
UNION ALL
|
||||
SELECT n FROM t1 WHERE log=3
|
||||
ORDER BY 'xyzzy';
|
||||
ORDER BY "xyzzy";
|
||||
}} msg]
|
||||
lappend v $msg
|
||||
} {0 {0 1 2 3 4 5 5 6 7 8}}
|
||||
@@ -292,7 +292,7 @@ do_test select4-5.2c {
|
||||
SELECT DISTINCT log FROM t1
|
||||
UNION ALL
|
||||
SELECT n FROM t1 WHERE log=3
|
||||
ORDER BY 'xyzzy';
|
||||
ORDER BY "xyzzy";
|
||||
}} msg]
|
||||
lappend v $msg
|
||||
} {1 {ORDER BY term number 1 does not match any result column}}
|
||||
@@ -301,7 +301,7 @@ do_test select4-5.2d {
|
||||
SELECT DISTINCT log FROM t1
|
||||
INTERSECT
|
||||
SELECT n FROM t1 WHERE log=3
|
||||
ORDER BY 'xyzzy';
|
||||
ORDER BY "xyzzy";
|
||||
}} msg]
|
||||
lappend v $msg
|
||||
} {1 {ORDER BY term number 1 does not match any result column}}
|
||||
|
||||
Reference in New Issue
Block a user