1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix test cases so that they work with the new EXPLAIN QUERY PLAN output

format.  Only some of the cases have been fixed.  This is an incremental
check-in.

FossilOrigin-Name: 5f0e803e33aa557865d5fc830d9202d628de9a94c9757058ca48f1a560702cd3
This commit is contained in:
drh
2018-05-02 18:00:17 +00:00
parent 84a01debf9
commit b3f0276b9e
43 changed files with 527 additions and 540 deletions

View File

@ -32,41 +32,41 @@ do_execsql_test 1.1 {
CREATE INDEX i1 ON t1(x, y);
}
set idxscan {0 0 0 {SCAN TABLE t1 USING COVERING INDEX i1}}
set tblscan {0 0 0 {SCAN TABLE t1}}
set grpsort {0 0 0 {USE TEMP B-TREE FOR GROUP BY}}
set sort {0 0 0 {USE TEMP B-TREE FOR ORDER BY}}
set idxscan {SCAN TABLE t1 USING COVERING INDEX i1}
set tblscan {SCAN TABLE t1}
set grpsort {USE TEMP B-TREE FOR GROUP BY}
set sort {USE TEMP B-TREE FOR ORDER BY}
foreach {tn q res eqp} [subst -nocommands {
1 "SELECT * FROM t1 GROUP BY x, y ORDER BY x,y"
{1 3 2 2 3 1} {$idxscan}
2 "SELECT * FROM t1 GROUP BY x, y ORDER BY x"
{1 3 2 2 3 1} {$idxscan $sort}
{1 3 2 2 3 1} {$idxscan*$sort}
3 "SELECT * FROM t1 GROUP BY y, x ORDER BY y, x"
{3 1 2 2 1 3} {$idxscan $sort}
{3 1 2 2 1 3} {$idxscan*$sort}
4 "SELECT * FROM t1 GROUP BY x ORDER BY x"
{1 3 2 2 3 1} {$idxscan}
5 "SELECT * FROM t1 GROUP BY y ORDER BY y"
{3 1 2 2 1 3} {$tblscan $grpsort}
{3 1 2 2 1 3} {$tblscan*$grpsort}
6 "SELECT * FROM t1 GROUP BY y ORDER BY x"
{1 3 2 2 3 1} {$tblscan $grpsort $sort}
{1 3 2 2 3 1} {$tblscan*$grpsort*$sort}
7 "SELECT * FROM t1 GROUP BY x, y ORDER BY x, y DESC"
{1 3 2 2 3 1} {$idxscan $sort}
{1 3 2 2 3 1} {$idxscan*$sort}
8 "SELECT * FROM t1 GROUP BY x, y ORDER BY x DESC, y DESC"
{3 1 2 2 1 3} {$idxscan $sort}
{3 1 2 2 1 3} {$idxscan*$sort}
9 "SELECT * FROM t1 GROUP BY x, y ORDER BY x ASC, y ASC"
{1 3 2 2 3 1} {$idxscan}
10 "SELECT * FROM t1 GROUP BY x, y ORDER BY x COLLATE nocase, y"
{1 3 2 2 3 1} {$idxscan $sort}
{1 3 2 2 3 1} {$idxscan*$sort}
}] {
do_execsql_test 1.$tn.1 $q $res