AryaWu/sqlite
0
1# 2024 March 202#3# The author disclaims copyright to this source code. In place of4# a legal notice, here is a blessing:5#6# May you do good and not evil.7# May you find forgiveness for yourself and forgive others.8# May you share freely, never taking more than you give.9#10#***********************************************************************11#12 13set testdir [file dirname $argv0]14source $testdir/tester.tcl15 16set testprefix eqp217 18do_execsql_test 1.0 {19 CREATE TABLE t1(a, b, c, d);20 CREATE INDEX i1 ON t1(a, b, c);21}22 23do_eqp_test 1.1 {24 SELECT * FROM t1 ORDER BY a, b, c25} {26 QUERY PLAN27 `--SCAN t1 USING INDEX i128}29 30 31do_eqp_test 1.2 {32 SELECT * FROM t1 ORDER BY a, b, +c33} {34 QUERY PLAN35 |--SCAN t1 USING INDEX i136 `--USE TEMP B-TREE FOR LAST TERM OF ORDER BY37}38 39do_eqp_test 1.3 {40 SELECT * FROM t1 ORDER BY a, +b, +c41} {42 QUERY PLAN43 |--SCAN t1 USING INDEX i144 `--USE TEMP B-TREE FOR LAST 2 TERMS OF ORDER BY45}46 47finish_test48 49 50 