Experimental changes to improve optimization of DISTINCT queries.
FossilOrigin-Name: f7ba0219ef2f235543c258be736955d91ca5ecce
This commit is contained in:
+3
-3
@@ -57,17 +57,17 @@ do_test collate5-1.1 {
|
||||
execsql {
|
||||
SELECT DISTINCT a FROM collate5t1;
|
||||
}
|
||||
} {A B N}
|
||||
} {a b n}
|
||||
do_test collate5-1.2 {
|
||||
execsql {
|
||||
SELECT DISTINCT b FROM collate5t1;
|
||||
}
|
||||
} {{} Apple apple banana}
|
||||
} {apple Apple banana {}}
|
||||
do_test collate5-1.3 {
|
||||
execsql {
|
||||
SELECT DISTINCT a, b FROM collate5t1;
|
||||
}
|
||||
} {A Apple a apple B banana N {}}
|
||||
} {a apple A Apple b banana n {}}
|
||||
|
||||
# Ticket #3376
|
||||
#
|
||||
|
||||
+6
-6
@@ -1238,8 +1238,8 @@ do_select_tests e_select-5 {
|
||||
3.1 "SELECT x FROM h2" {One Two Three Four one two three four}
|
||||
3.2 "SELECT x FROM h1, h2 ON (x=b)" {One one Four four}
|
||||
|
||||
4.1 "SELECT DISTINCT x FROM h2" {four one three two}
|
||||
4.2 "SELECT DISTINCT x FROM h1, h2 ON (x=b)" {four one}
|
||||
4.1 "SELECT DISTINCT x FROM h2" {One Two Three Four}
|
||||
4.2 "SELECT DISTINCT x FROM h1, h2 ON (x=b)" {One Four}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-02054-15343 For the purposes of detecting duplicate
|
||||
@@ -1253,11 +1253,11 @@ do_select_tests e_select-5.5 {
|
||||
# sequence to compare text values with apply.
|
||||
#
|
||||
do_select_tests e_select-5.6 {
|
||||
1 "SELECT DISTINCT b FROM h1" {I IV four i iv one}
|
||||
2 "SELECT DISTINCT b COLLATE nocase FROM h1" {four i iv one}
|
||||
3 "SELECT DISTINCT x FROM h2" {four one three two}
|
||||
1 "SELECT DISTINCT b FROM h1" {one I i four IV iv}
|
||||
2 "SELECT DISTINCT b COLLATE nocase FROM h1" {one I four IV}
|
||||
3 "SELECT DISTINCT x FROM h2" {One Two Three Four}
|
||||
4 "SELECT DISTINCT x COLLATE binary FROM h2" {
|
||||
Four One Three Two four one three two
|
||||
One Two Three Four one two three four
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1376,7 +1376,7 @@ do_test fuzzer1-2.3 {
|
||||
AND f2.distance<=200
|
||||
AND streetname.n>=f2.word AND streetname.n<=(f2.word || x'F7BFBFBF')
|
||||
}
|
||||
} {steelewood tallia tallu talwyn taymouth thelema trailer {tyler finley}}
|
||||
} {{tyler finley} trailer taymouth steelewood tallia tallu talwyn thelema}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ do_test insert4-2.4.1 {
|
||||
INSERT INTO t3 SELECT DISTINCT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
}
|
||||
} {1 9 9 1}
|
||||
} {9 1 1 9}
|
||||
xferopt_test insert4-2.4.2 0
|
||||
do_test insert4-2.4.3 {
|
||||
catchsql {
|
||||
|
||||
+1
-1
@@ -505,7 +505,7 @@ ifcapable subquery {
|
||||
)
|
||||
ORDER BY LOWER(artist) ASC;
|
||||
}
|
||||
} {one}
|
||||
} {two}
|
||||
}
|
||||
|
||||
# Ticket #1370. Do not overwrite small files (less than 1024 bytes)
|
||||
|
||||
+1
-1
@@ -355,7 +355,7 @@ for {set ii 3} {$ii <= 4} {incr ii} {
|
||||
SELECT DISTINCT (a/10) FROM t1 UNION ALL SELECT DISTINCT(d%2) FROM t2
|
||||
)
|
||||
}
|
||||
} {0 1 0 1}
|
||||
} {0 1 1 0}
|
||||
|
||||
do_test selectB-$ii.20 {
|
||||
execsql {
|
||||
|
||||
Reference in New Issue
Block a user