/ Check-in [61cb8a39]

 ```164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 ``` ``` 2 "b, a FROM t1" {} {B A b a} 3 "a, b, c FROM t1" {hash} {A B C a b c} 4 "a, b, c FROM t1 ORDER BY a, b, c" {btree} {A B C a b c} 5 "b FROM t1 WHERE a = 'a'" {} {b} 6 "b FROM t1 ORDER BY +b COLLATE binary" {btree hash} {B b} 7 "a FROM t1" {} {A a} 8 "b COLLATE nocase FROM t1" {} {b} 9 "b COLLATE nocase FROM t1 ORDER BY b COLLATE nocase" {} {B} } { do_execsql_test 2.\$tn.1 "SELECT DISTINCT \$sql" \$res do_temptables_test 2.\$tn.2 "SELECT DISTINCT \$sql" \$temptables } do_execsql_test 2.A { SELECT (SELECT DISTINCT o.a FROM t1 AS i) FROM t1 AS o ORDER BY rowid; ``` ``` | ``` ```164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 ``` ``` 2 "b, a FROM t1" {} {B A b a} 3 "a, b, c FROM t1" {hash} {A B C a b c} 4 "a, b, c FROM t1 ORDER BY a, b, c" {btree} {A B C a b c} 5 "b FROM t1 WHERE a = 'a'" {} {b} 6 "b FROM t1 ORDER BY +b COLLATE binary" {btree hash} {B b} 7 "a FROM t1" {} {A a} 8 "b COLLATE nocase FROM t1" {} {b} 9 "b COLLATE nocase FROM t1 ORDER BY b COLLATE nocase" {} {b} } { do_execsql_test 2.\$tn.1 "SELECT DISTINCT \$sql" \$res do_temptables_test 2.\$tn.2 "SELECT DISTINCT \$sql" \$temptables } do_execsql_test 2.A { SELECT (SELECT DISTINCT o.a FROM t1 AS i) FROM t1 AS o ORDER BY rowid; ```