Fix a problem causing the recovery extension to use excessive memory and CPU time...
[sqlite.git] / test / eqp2.test
blob3c634fc28a96f17b6374a34000d4f4ae2a2240b5
1 # 2024 March 20
3 # The author disclaims copyright to this source code.  In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
13 set testdir [file dirname $argv0]
14 source $testdir/tester.tcl
16 set testprefix eqp2
18 do_execsql_test 1.0 {
19   CREATE TABLE t1(a, b, c, d);
20   CREATE INDEX i1 ON t1(a, b, c);
23 do_eqp_test 1.1 {
24   SELECT * FROM t1 ORDER BY a, b, c
25 } {
26   QUERY PLAN
27   `--SCAN t1 USING INDEX i1
31 do_eqp_test 1.2 {
32   SELECT * FROM t1 ORDER BY a, b, +c
33 } {
34   QUERY PLAN
35   |--SCAN t1 USING INDEX i1
36   `--USE TEMP B-TREE FOR LAST TERM OF ORDER BY
39 do_eqp_test 1.3 {
40   SELECT * FROM t1 ORDER BY a, +b, +c
41 } {
42   QUERY PLAN
43   |--SCAN t1 USING INDEX i1
44   `--USE TEMP B-TREE FOR LAST 2 TERMS OF ORDER BY
47 finish_test