aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rwxr-xr-xconfigure18
-rw-r--r--ext/expert/expert1.test65
-rw-r--r--ext/fts5/test/fts5plan.test14
-rw-r--r--ext/fts5/test/fts5trigram.test3
-rw-r--r--ext/misc/appendvfs.c186
-rw-r--r--ext/misc/wholenumber.c2
-rw-r--r--ext/rbu/rbudiff.test8
-rw-r--r--ext/rtree/rtree6.test24
-rw-r--r--ext/rtree/rtreeC.test88
-rw-r--r--manifest281
-rw-r--r--manifest.uuid2
-rw-r--r--src/btree.c31
-rw-r--r--src/btreeInt.h2
-rw-r--r--src/build.c18
-rw-r--r--src/date.c1
-rw-r--r--src/expr.c72
-rw-r--r--src/insert.c10
-rw-r--r--src/os_unix.c3
-rw-r--r--src/printf.c35
-rw-r--r--src/select.c36
-rw-r--r--src/shell.c.in6
-rw-r--r--src/sqliteInt.h1
-rw-r--r--src/tokenize.c2
-rw-r--r--src/treeview.c10
-rw-r--r--src/trigger.c6
-rw-r--r--src/vdbe.c83
-rw-r--r--src/vdbeInt.h1
-rw-r--r--src/vdbeaux.c12
-rw-r--r--src/wherecode.c12
-rw-r--r--test/altermalloc3.test1
-rw-r--r--test/altertab.test1
-rw-r--r--test/analyze3.test30
-rw-r--r--test/analyze4.test2
-rw-r--r--test/analyze6.test24
-rw-r--r--test/analyze7.test32
-rw-r--r--test/analyze8.test22
-rw-r--r--test/analyze9.test30
-rw-r--r--test/analyzeC.test2
-rw-r--r--test/analyzeD.test8
-rw-r--r--test/analyzeE.test88
-rw-r--r--test/analyzeF.test4
-rw-r--r--test/analyzeG.test32
-rw-r--r--test/attach4.test1
-rw-r--r--test/autoindex1.test30
-rw-r--r--test/autoindex3.test8
-rw-r--r--test/autoindex5.test2
-rw-r--r--test/avfs.test70
-rw-r--r--test/bestindex1.test10
-rw-r--r--test/bestindex2.test30
-rw-r--r--test/bestindex3.test16
-rw-r--r--test/bestindex4.test8
-rw-r--r--test/bestindex7.test1
-rw-r--r--test/between.test6
-rw-r--r--test/bigmmap.test4
-rw-r--r--test/busy2.test1
-rw-r--r--test/columncount.test1
-rw-r--r--test/cost.test46
-rw-r--r--test/count.test8
-rw-r--r--test/coveridxscan.test4
-rw-r--r--test/date2.test7
-rw-r--r--test/e_createtable.test6
-rw-r--r--test/e_fkey.test18
-rw-r--r--test/eqp.test324
-rw-r--r--test/exists2.test20
-rw-r--r--test/existsfault.test1
-rw-r--r--test/fts3aux1.test34
-rw-r--r--test/fts3corrupt6.test2
-rw-r--r--test/fts3join.test8
-rw-r--r--test/fts3query.test16
-rw-r--r--test/fts3snippet2.test1
-rw-r--r--test/fts4upfrom.test1
-rw-r--r--test/fuzzcheck.c18
-rw-r--r--test/hook.test1
-rw-r--r--test/in4.test2
-rw-r--r--test/index6.test12
-rw-r--r--test/index7.test14
-rw-r--r--test/index8.test2
-rw-r--r--test/indexedby.test62
-rw-r--r--test/indexexpr1.test4
-rw-r--r--test/indexexpr2.test10
-rw-r--r--test/intpkey.test2
-rw-r--r--test/join2.test34
-rw-r--r--test/join5.test10
-rw-r--r--test/like.test12
-rw-r--r--test/like3.test24
-rw-r--r--test/mallocK.test2
-rw-r--r--test/misc7.test6
-rw-r--r--test/notnull2.test1
-rw-r--r--test/notnullfault.test1
-rw-r--r--test/nulls1.test10
-rw-r--r--test/orderby1.test2
-rw-r--r--test/returning1.test1
-rw-r--r--test/rollback2.test4
-rw-r--r--test/rowvalue.test16
-rw-r--r--test/rowvalue4.test34
-rw-r--r--test/scanstatus.test86
-rw-r--r--test/select9.test6
-rw-r--r--test/selectA.test4
-rw-r--r--test/selectD.test2
-rw-r--r--test/skipscan1.test4
-rw-r--r--test/skipscan2.test2
-rw-r--r--test/skipscan5.test24
-rw-r--r--test/skipscan6.test4
-rw-r--r--test/tkt-385a5b56b9.test8
-rw-r--r--test/tkt-78e04e52ea.test6
-rw-r--r--test/tkt-b75a9ca6b0.test4
-rw-r--r--test/tkt3442.test6
-rw-r--r--test/tpch01.test14
-rw-r--r--test/transitive1.test4
-rw-r--r--test/triggerupfrom.test1
-rw-r--r--test/unordered.test28
-rw-r--r--test/upfrom2.test2
-rw-r--r--test/upfrom3.test1
-rw-r--r--test/upfromfault.test1
-rw-r--r--test/upsert5.test14
-rw-r--r--test/walsetlk.test1
-rw-r--r--test/where.test20
-rw-r--r--test/where2.test10
-rw-r--r--test/where3.test50
-rw-r--r--test/where7.test6
-rw-r--r--test/where9.test20
-rw-r--r--test/whereE.test8
-rw-r--r--test/whereF.test6
-rw-r--r--test/whereG.test28
-rw-r--r--test/whereI.test8
-rw-r--r--test/whereJ.test6
-rw-r--r--test/whereK.test10
-rw-r--r--test/whereL.test14
-rw-r--r--test/windowpushd.test9
-rw-r--r--test/with1.test6
-rw-r--r--test/with2.test134
-rw-r--r--test/with3.test59
-rw-r--r--test/with6.test118
-rw-r--r--test/without_rowid6.test8
-rw-r--r--tool/sqldiff.c14
136 files changed, 1679 insertions, 1355 deletions
diff --git a/VERSION b/VERSION
index 42fdf5185..0b477b458 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.35.1
+3.36.0
diff --git a/configure b/configure
index d92c8d5d7..5df138630 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sqlite 3.35.1.
+# Generated by GNU Autoconf 2.69 for sqlite 3.36.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sqlite'
PACKAGE_TARNAME='sqlite'
-PACKAGE_VERSION='3.35.1'
-PACKAGE_STRING='sqlite 3.35.1'
+PACKAGE_VERSION='3.36.0'
+PACKAGE_STRING='sqlite 3.36.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1467,7 +1467,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sqlite 3.35.1 to adapt to many kinds of systems.
+\`configure' configures sqlite 3.36.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1532,7 +1532,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sqlite 3.35.1:";;
+ short | recursive ) echo "Configuration of sqlite 3.36.0:";;
esac
cat <<\_ACEOF
@@ -1660,7 +1660,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sqlite configure 3.35.1
+sqlite configure 3.36.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2079,7 +2079,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sqlite $as_me 3.35.1, which was
+It was created by sqlite $as_me 3.36.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -12378,7 +12378,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sqlite $as_me 3.35.1, which was
+This file was extended by sqlite $as_me 3.36.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12444,7 +12444,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-sqlite config.status 3.35.1
+sqlite config.status 3.36.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/ext/expert/expert1.test b/ext/expert/expert1.test
index 0e6fc8260..3987d0c91 100644
--- a/ext/expert/expert1.test
+++ b/ext/expert/expert1.test
@@ -103,7 +103,7 @@ do_setup_rec_test $tn.1 { CREATE TABLE t1(a, b, c) } {
SELECT * FROM t1
} {
(no new indexes)
- SCAN TABLE t1
+ SCAN t1
}
do_setup_rec_test $tn.2 {
@@ -112,7 +112,7 @@ do_setup_rec_test $tn.2 {
SELECT * FROM t1 WHERE b>?;
} {
CREATE INDEX t1_idx_00000062 ON t1(b);
- SEARCH TABLE t1 USING INDEX t1_idx_00000062 (b>?)
+ SEARCH t1 USING INDEX t1_idx_00000062 (b>?)
}
do_setup_rec_test $tn.3 {
@@ -121,7 +121,7 @@ do_setup_rec_test $tn.3 {
SELECT * FROM t1 WHERE b COLLATE nocase BETWEEN ? AND ?
} {
CREATE INDEX t1_idx_3e094c27 ON t1(b COLLATE NOCASE);
- SEARCH TABLE t1 USING INDEX t1_idx_3e094c27 (b>? AND b<?)
+ SEARCH t1 USING INDEX t1_idx_3e094c27 (b>? AND b<?)
}
do_setup_rec_test $tn.4 {
@@ -130,7 +130,7 @@ do_setup_rec_test $tn.4 {
SELECT a FROM t1 ORDER BY b;
} {
CREATE INDEX t1_idx_00000062 ON t1(b);
- SCAN TABLE t1 USING INDEX t1_idx_00000062
+ SCAN t1 USING INDEX t1_idx_00000062
}
do_setup_rec_test $tn.5 {
@@ -139,7 +139,7 @@ do_setup_rec_test $tn.5 {
SELECT a FROM t1 WHERE a=? ORDER BY b;
} {
CREATE INDEX t1_idx_000123a7 ON t1(a, b);
- SEARCH TABLE t1 USING COVERING INDEX t1_idx_000123a7 (a=?)
+ SEARCH t1 USING COVERING INDEX t1_idx_000123a7 (a=?)
}
if 0 {
@@ -149,7 +149,7 @@ do_setup_rec_test $tn.6 {
SELECT min(a) FROM t1
} {
CREATE INDEX t1_idx_00000061 ON t1(a);
- SEARCH TABLE t1 USING COVERING INDEX t1_idx_00000061
+ SEARCH t1 USING COVERING INDEX t1_idx_00000061
}
}
@@ -159,7 +159,7 @@ do_setup_rec_test $tn.7 {
SELECT * FROM t1 ORDER BY a, b, c;
} {
CREATE INDEX t1_idx_033e95fe ON t1(a, b, c);
- SCAN TABLE t1 USING COVERING INDEX t1_idx_033e95fe
+ SCAN t1 USING COVERING INDEX t1_idx_033e95fe
}
#do_setup_rec_test $tn.1.8 {
@@ -168,7 +168,7 @@ do_setup_rec_test $tn.7 {
# SELECT * FROM t1 ORDER BY a ASC, b COLLATE nocase DESC, c ASC;
#} {
# CREATE INDEX t1_idx_5be6e222 ON t1(a, b COLLATE NOCASE DESC, c);
-# 0|0|0|SCAN TABLE t1 USING COVERING INDEX t1_idx_5be6e222
+# 0|0|0|SCAN t1 USING COVERING INDEX t1_idx_5be6e222
#}
do_setup_rec_test $tn.8.1 {
@@ -177,7 +177,7 @@ do_setup_rec_test $tn.8.1 {
SELECT * FROM t1 WHERE a=?
} {
CREATE INDEX t1_idx_00000061 ON t1(a);
- SEARCH TABLE t1 USING INDEX t1_idx_00000061 (a=?)
+ SEARCH t1 USING INDEX t1_idx_00000061 (a=?)
}
do_setup_rec_test $tn.8.2 {
CREATE TABLE t1(a, b COLLATE nocase, c);
@@ -185,7 +185,7 @@ do_setup_rec_test $tn.8.2 {
SELECT * FROM t1 ORDER BY a ASC, b DESC, c ASC;
} {
CREATE INDEX t1_idx_5cb97285 ON t1(a, b DESC, c);
- SCAN TABLE t1 USING COVERING INDEX t1_idx_5cb97285
+ SCAN t1 USING COVERING INDEX t1_idx_5cb97285
}
@@ -197,7 +197,7 @@ do_setup_rec_test $tn.9.1 {
SELECT * FROM "t t" WHERE a=?
} {
CREATE INDEX 't t_idx_00000061' ON 't t'(a);
- SEARCH TABLE t t USING INDEX t t_idx_00000061 (a=?)
+ SEARCH t t USING INDEX t t_idx_00000061 (a=?)
}
do_setup_rec_test $tn.9.2 {
@@ -206,7 +206,7 @@ do_setup_rec_test $tn.9.2 {
SELECT * FROM "t t" WHERE b BETWEEN ? AND ?
} {
CREATE INDEX 't t_idx_00000062' ON 't t'(b);
- SEARCH TABLE t t USING INDEX t t_idx_00000062 (b>? AND b<?)
+ SEARCH t t USING INDEX t t_idx_00000062 (b>? AND b<?)
}
# Columns with names that require quotes.
@@ -217,7 +217,7 @@ do_setup_rec_test $tn.10.1 {
SELECT * FROM t3 WHERE "b b" = ?
} {
CREATE INDEX t3_idx_00050c52 ON t3('b b');
- SEARCH TABLE t3 USING INDEX t3_idx_00050c52 (b b=?)
+ SEARCH t3 USING INDEX t3_idx_00050c52 (b b=?)
}
do_setup_rec_test $tn.10.2 {
@@ -226,7 +226,7 @@ do_setup_rec_test $tn.10.2 {
SELECT * FROM t3 ORDER BY "b b"
} {
CREATE INDEX t3_idx_00050c52 ON t3('b b');
- SCAN TABLE t3 USING INDEX t3_idx_00050c52
+ SCAN t3 USING INDEX t3_idx_00050c52
}
# Transitive constraints
@@ -239,8 +239,8 @@ do_setup_rec_test $tn.11.1 {
} {
CREATE INDEX t5_idx_000123a7 ON t5(a, b);
CREATE INDEX t6_idx_00000063 ON t6(c);
- SEARCH TABLE t6 USING INDEX t6_idx_00000063 (c=?)
- SEARCH TABLE t5 USING COVERING INDEX t5_idx_000123a7 (a=? AND b=?)
+ SEARCH t6 USING INDEX t6_idx_00000063 (c=?)
+ SEARCH t5 USING COVERING INDEX t5_idx_000123a7 (a=? AND b=?)
}
# OR terms.
@@ -254,9 +254,9 @@ do_setup_rec_test $tn.12.1 {
CREATE INDEX t7_idx_00000061 ON t7(a);
MULTI-INDEX OR
INDEX 1
- SEARCH TABLE t7 USING INDEX t7_idx_00000061 (a=?)
+ SEARCH t7 USING INDEX t7_idx_00000061 (a=?)
INDEX 2
- SEARCH TABLE t7 USING INDEX t7_idx_00000062 (b=?)
+ SEARCH t7 USING INDEX t7_idx_00000062 (b=?)
}
# rowid terms.
@@ -267,7 +267,7 @@ do_setup_rec_test $tn.13.1 {
SELECT * FROM t8 WHERE rowid=?
} {
(no new indexes)
- SEARCH TABLE t8 USING INTEGER PRIMARY KEY (rowid=?)
+ SEARCH t8 USING INTEGER PRIMARY KEY (rowid=?)
}
do_setup_rec_test $tn.13.2 {
CREATE TABLE t8(a, b);
@@ -275,7 +275,7 @@ do_setup_rec_test $tn.13.2 {
SELECT * FROM t8 ORDER BY rowid
} {
(no new indexes)
- SCAN TABLE t8
+ SCAN t8
}
do_setup_rec_test $tn.13.3 {
CREATE TABLE t8(a, b);
@@ -283,7 +283,7 @@ do_setup_rec_test $tn.13.3 {
SELECT * FROM t8 WHERE a=? ORDER BY rowid
} {
CREATE INDEX t8_idx_00000061 ON t8(a);
- SEARCH TABLE t8 USING INDEX t8_idx_00000061 (a=?)
+ SEARCH t8 USING INDEX t8_idx_00000061 (a=?)
}
# Triggers
@@ -298,7 +298,7 @@ do_setup_rec_test $tn.14 {
INSERT INTO t9 VALUES(?, ?, ?);
} {
CREATE INDEX t10_idx_00000062 ON t10(b);
- SEARCH TABLE t10 USING INDEX t10_idx_00000062 (b=?)
+ SEARCH t10 USING INDEX t10_idx_00000062 (b=?)
}
do_setup_rec_test $tn.15 {
@@ -314,8 +314,8 @@ do_setup_rec_test $tn.15 {
SELECT * FROM t2, t1 WHERE b=? AND d=? AND t2.rowid=t1.rowid
} {
CREATE INDEX t2_idx_00000064 ON t2(d);
- SEARCH TABLE t2 USING INDEX t2_idx_00000064 (d=?)
- SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+ SEARCH t2 USING INDEX t2_idx_00000064 (d=?)
+ SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
}
do_setup_rec_test $tn.16 {
@@ -324,7 +324,7 @@ do_setup_rec_test $tn.16 {
SELECT * FROM t1 WHERE b IS NOT NULL;
} {
(no new indexes)
- SCAN TABLE t1
+ SCAN t1
}
do_setup_rec_test $tn.17.1 {
@@ -333,7 +333,7 @@ do_setup_rec_test $tn.17.1 {
SELECT * FROM example WHERE a=?
} {
(no new indexes)
- SEARCH TABLE example USING INDEX sqlite_autoindex_example_1 (A=?)
+ SEARCH example USING INDEX sqlite_autoindex_example_1 (A=?)
}
do_setup_rec_test $tn.17.2 {
CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -341,7 +341,7 @@ do_setup_rec_test $tn.17.2 {
SELECT * FROM example WHERE b=?
} {
CREATE INDEX example_idx_00000042 ON example(B);
- SEARCH TABLE example USING INDEX example_idx_00000042 (B=?)
+ SEARCH example USING INDEX example_idx_00000042 (B=?)
}
do_setup_rec_test $tn.17.3 {
CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -349,7 +349,7 @@ do_setup_rec_test $tn.17.3 {
SELECT * FROM example WHERE a=? AND b=?
} {
(no new indexes)
- SEARCH TABLE example USING INDEX sqlite_autoindex_example_1 (A=? AND B=?)
+ SEARCH example USING INDEX sqlite_autoindex_example_1 (A=? AND B=?)
}
do_setup_rec_test $tn.17.4 {
CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -357,7 +357,7 @@ do_setup_rec_test $tn.17.4 {
SELECT * FROM example WHERE a=? AND b>?
} {
(no new indexes)
- SEARCH TABLE example USING INDEX sqlite_autoindex_example_1 (A=? AND B>?)
+ SEARCH example USING INDEX sqlite_autoindex_example_1 (A=? AND B>?)
}
do_setup_rec_test $tn.17.5 {
CREATE TABLE example (A INTEGER, B INTEGER, C INTEGER, PRIMARY KEY (A,B));
@@ -365,7 +365,7 @@ do_setup_rec_test $tn.17.5 {
SELECT * FROM example WHERE a>? AND b=?
} {
CREATE INDEX example_idx_0000cb3f ON example(B, A);
- SEARCH TABLE example USING INDEX example_idx_0000cb3f (B=? AND A>?)
+ SEARCH example USING INDEX example_idx_0000cb3f (B=? AND A>?)
}
do_setup_rec_test $tn.18.0 {
@@ -377,7 +377,7 @@ do_setup_rec_test $tn.18.0 {
SELECT x FROM SomeObject;
} {
(no new indexes)
- SCAN TABLE SomeObject
+ SCAN SomeObject
}
do_setup_rec_test $tn.18.1 {
CREATE TABLE SomeObject (
@@ -388,7 +388,7 @@ do_setup_rec_test $tn.18.1 {
SELECT * FROM SomeObject WHERE x=?;
} {
CREATE INDEX SomeObject_idx_00000078 ON SomeObject(x);
- SEARCH TABLE SomeObject USING COVERING INDEX SomeObject_idx_00000078 (x=?)
+ SEARCH SomeObject USING COVERING INDEX SomeObject_idx_00000078 (x=?)
}
}
@@ -455,4 +455,3 @@ do_execsql_test 5.3 {
}
finish_test
-
diff --git a/ext/fts5/test/fts5plan.test b/ext/fts5/test/fts5plan.test
index 7118427a2..6862acf17 100644
--- a/ext/fts5/test/fts5plan.test
+++ b/ext/fts5/test/fts5plan.test
@@ -30,23 +30,23 @@ do_eqp_test 1.1 {
SELECT * FROM t1, f1 WHERE f1 MATCH t1.x
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:M1
+ |--SCAN t1
+ `--SCAN f1 VIRTUAL TABLE INDEX 0:M1
}
do_eqp_test 1.2 {
SELECT * FROM t1, f1 WHERE f1 > t1.x
} {
QUERY PLAN
- |--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:
- `--SCAN TABLE t1
+ |--SCAN f1 VIRTUAL TABLE INDEX 0:
+ `--SCAN t1
}
do_eqp_test 1.3 {
SELECT * FROM f1 WHERE f1 MATCH ? ORDER BY ff
} {
QUERY PLAN
- |--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:M1
+ |--SCAN f1 VIRTUAL TABLE INDEX 0:M1
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -54,12 +54,12 @@ do_eqp_test 1.4 {
SELECT * FROM f1 ORDER BY rank
} {
QUERY PLAN
- |--SCAN TABLE f1 VIRTUAL TABLE INDEX 0:
+ |--SCAN f1 VIRTUAL TABLE INDEX 0:
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test 1.5 {
SELECT * FROM f1 WHERE rank MATCH ?
-} {SCAN TABLE f1 VIRTUAL TABLE INDEX 0:r}
+} {SCAN f1 VIRTUAL TABLE INDEX 0:r}
finish_test
diff --git a/ext/fts5/test/fts5trigram.test b/ext/fts5/test/fts5trigram.test
index 26eb7ba8d..fb66efed6 100644
--- a/ext/fts5/test/fts5trigram.test
+++ b/ext/fts5/test/fts5trigram.test
@@ -192,10 +192,9 @@ do_eqp_test 6.2 {
} {VIRTUAL TABLE INDEX 0:G0}
do_eqp_test 6.3 {
SELECT * FROM ci1 WHERE x LIKE ?
-} {{SCAN TABLE ci1 VIRTUAL TABLE INDEX 0:}}
+} {{SCAN ci1 VIRTUAL TABLE INDEX 0:}}
do_eqp_test 6.4 {
SELECT * FROM ci1 WHERE x GLOB ?
} {VIRTUAL TABLE INDEX 0:G0}
finish_test
-
diff --git a/ext/misc/appendvfs.c b/ext/misc/appendvfs.c
index 3fff9a10f..4ea5b1c2c 100644
--- a/ext/misc/appendvfs.c
+++ b/ext/misc/appendvfs.c
@@ -38,8 +38,8 @@
** (5) Otherwise, SQLITE_CANTOPEN is returned.
**
** To avoid unnecessary complications with the PENDING_BYTE, the size of
-** the file containing the database is limited to 1GB. (1000013824 bytes)
-** This VFS will not read or write past the 1GB mark. This restriction
+** the file containing the database is limited to 1GiB. (1073741824 bytes)
+** This VFS will not read or write past the 1GiB mark. This restriction
** might be lifted in future versions. For now, if you need a larger
** database, then keep it in a separate file.
**
@@ -68,14 +68,16 @@ SQLITE_EXTENSION_INIT1
** Maximum size of the combined prefix + database + append-mark. This
** must be less than 0x40000000 to avoid locking issues on Windows.
*/
-#define APND_MAX_SIZE (65536*15259)
+#define APND_MAX_SIZE (0x40000000)
/*
-** Size of storage page upon which to align appendvfs portion.
+** Try to align the database to an even multiple of APND_ROUNDUP bytes.
*/
-#ifndef APND_ROUNDUP_BITS
-#define APND_ROUNDUP_BITS 12
+#ifndef APND_ROUNDUP
+#define APND_ROUNDUP 4096
#endif
+#define APND_ALIGN_MASK ((sqlite3_int64)(APND_ROUNDUP-1))
+#define APND_START_ROUNDUP(fsz) (((fsz)+APND_ALIGN_MASK) & ~APND_ALIGN_MASK)
/*
** Forward declaration of objects used by this utility
@@ -89,39 +91,45 @@ typedef struct ApndFile ApndFile;
#define ORIGVFS(p) ((sqlite3_vfs*)((p)->pAppData))
#define ORIGFILE(p) ((sqlite3_file*)(((ApndFile*)(p))+1))
-/* Invariants for an open appendvfs file:
- * Once an appendvfs file is opened, it will be in one of three states:
- * State 0: Never written. Underlying file (if any) is unaltered.
- * State 1: Append mark is persisted, content write is in progress.
- * State 2: Append mark is persisted, content writes are complete.
- *
- * State 0 is persistent in the sense that nothing will have been done
- * to the underlying file, including any attempt to convert it to an
- * appendvfs file.
- *
- * State 1 is normally transitory. However, if a write operation ends
- * abnormally (disk full, power loss, process kill, etc.), then State 1
- * may be persistent on disk with an incomplete content write-out. This
- * is logically equivalent to an interrupted write to an ordinary file,
- * where some unknown portion of to-be-written data is persisted while
- * the remainder is not. Database integrity in such cases is maintained
- * (or not) by the same measures available for ordinary file access.
- *
- * State 2 is persistent under normal circumstances (when there is no
- * abnormal termination of a write operation such that data provided
- * to the underlying VFS write method has not yet reached storage.)
- *
- * In order to maintain the state invariant, the append mark is written
- * in advance of content writes where any part of such content would
- * overwrite an existing (or yet to be written) append mark.
- */
+/* An open appendvfs file
+**
+** An instance of this structure describes the appended database file.
+** A separate sqlite3_file object is always appended. The appended
+** sqlite3_file object (which can be accessed using ORIGFILE()) describes
+** the entire file, including the prefix, the database, and the
+** append-mark.
+**
+** The structure of an AppendVFS database is like this:
+**
+** +-------------+---------+----------+-------------+
+** | prefix-file | padding | database | append-mark |
+** +-------------+---------+----------+-------------+
+** ^ ^
+** | |
+** iPgOne iMark
+**
+**
+** "prefix file" - file onto which the database has been appended.
+** "padding" - zero or more bytes inserted so that "database"
+** starts on an APND_ROUNDUP boundary
+** "database" - The SQLite database file
+** "append-mark" - The 25-byte "Start-Of-SQLite3-NNNNNNNN" that indicates
+** the offset from the start of prefix-file to the start
+** of "database".
+**
+** The size of the database is iMark - iPgOne.
+**
+** The NNNNNNNN in the "Start-Of-SQLite3-NNNNNNNN" suffix is the value
+** of iPgOne stored as a big-ending 64-bit integer.
+**
+** iMark will be the size of the underlying file minus 25 (APND_MARKSIZE).
+** Or, iMark is -1 to indicate that it has not yet been written.
+*/
struct ApndFile {
- /* Access to IO methods of the underlying file */
- sqlite3_file base;
- /* File offset to beginning of appended content (unchanging) */
- sqlite3_int64 iPgOne;
- /* File offset of written append-mark, or -1 if unwritten */
- sqlite3_int64 iMark;
+ sqlite3_file base; /* Subclass. MUST BE FIRST! */
+ sqlite3_int64 iPgOne; /* Offset to the start of the database */
+ sqlite3_int64 iMark; /* Offset of the append mark. -1 if unwritten */
+ /* Always followed by another sqlite3_file that describes the whole file */
};
/*
@@ -251,7 +259,7 @@ static int apndWriteMark(
int rc;
assert(pFile == ORIGFILE(paf));
memcpy(a, APND_MARK_PREFIX, APND_MARK_PREFIX_SZ);
- while (--i >= 0) {
+ while( --i >= 0 ){
a[APND_MARK_PREFIX_SZ+i] = (unsigned char)(iPgOne & 0xff);
iPgOne >>= 8;
}
@@ -279,8 +287,7 @@ static int apndWrite(
/* If append-mark is absent or will be overwritten, write it. */
if( paf->iMark < 0 || paf->iPgOne + iWriteEnd > paf->iMark ){
int rc = apndWriteMark(paf, pFile, iWriteEnd);
- if( SQLITE_OK!=rc )
- return rc;
+ if( SQLITE_OK!=rc ) return rc;
}
return pFile->pMethods->xWrite(pFile, zBuf, iAmt, paf->iPgOne+iOfst);
}
@@ -292,8 +299,7 @@ static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
ApndFile *paf = (ApndFile *)pFile;
pFile = ORIGFILE(pFile);
/* The append mark goes out first so truncate failure does not lose it. */
- if( SQLITE_OK!=apndWriteMark(paf, pFile, size) )
- return SQLITE_IOERR;
+ if( SQLITE_OK!=apndWriteMark(paf, pFile, size) ) return SQLITE_IOERR;
/* Truncate underlying file just past append mark */
return pFile->pMethods->xTruncate(pFile, paf->iMark+APND_MARK_SIZE);
}
@@ -409,8 +415,9 @@ static int apndFetch(
void **pp
){
ApndFile *p = (ApndFile *)pFile;
- if( p->iMark < 0 || iOfst+iAmt > p->iMark)
+ if( p->iMark < 0 || iOfst+iAmt > p->iMark ){
return SQLITE_IOERR; /* Cannot read what is not yet there. */
+ }
pFile = ORIGFILE(pFile);
return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
}
@@ -461,14 +468,18 @@ static int apndIsAppendvfsDatabase(sqlite3_int64 sz, sqlite3_file *pFile){
char zHdr[16];
sqlite3_int64 iMark = apndReadMark(sz, pFile);
if( iMark>=0 ){
- /* If file has right end-marker, the expected odd size, and the
- * SQLite DB type marker where the end-marker puts it, then it
- * is an appendvfs database (to be treated as such.)
- */
+ /* If file has the correct end-marker, the expected odd size, and the
+ ** SQLite DB type marker where the end-marker puts it, then it
+ ** is an appendvfs database.
+ */
rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), iMark);
- if( SQLITE_OK==rc && memcmp(zHdr, apvfsSqliteHdr, sizeof(zHdr))==0
- && (sz & 0x1ff)== APND_MARK_SIZE && sz>=512+APND_MARK_SIZE )
+ if( SQLITE_OK==rc
+ && memcmp(zHdr, apvfsSqliteHdr, sizeof(zHdr))==0
+ && (sz & 0x1ff) == APND_MARK_SIZE
+ && sz>=512+APND_MARK_SIZE
+ ){
return 1; /* It's an appendvfs database */
+ }
}
return 0;
}
@@ -490,66 +501,65 @@ static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
}
}
-/* Round-up used to get appendvfs portion to begin at a page boundary. */
-#define APND_ALIGN_MASK(nbits) ((1<<nbits)-1)
-#define APND_START_ROUNDUP(fsz, nbits) \
- ( ((fsz)+APND_ALIGN_MASK(nbits)) & ~(sqlite3_int64)APND_ALIGN_MASK(nbits) )
-
/*
** Open an apnd file handle.
*/
static int apndOpen(
- sqlite3_vfs *pVfs,
+ sqlite3_vfs *pApndVfs,
const char *zName,
sqlite3_file *pFile,
int flags,
int *pOutFlags
){
- ApndFile *p;
- sqlite3_file *pSubFile;
- sqlite3_vfs *pSubVfs;
+ ApndFile *pApndFile = (ApndFile*)pFile;
+ sqlite3_file *pBaseFile = ORIGFILE(pFile);
+ sqlite3_vfs *pBaseVfs = ORIGVFS(pApndVfs);
int rc;
- sqlite3_int64 sz;
- pSubVfs = ORIGVFS(pVfs);
+ sqlite3_int64 sz = 0;
if( (flags & SQLITE_OPEN_MAIN_DB)==0 ){
- /* The appendvfs is not to be used for transient or temporary databases. */
- return pSubVfs->xOpen(pSubVfs, zName, pFile, flags, pOutFlags);
+ /* The appendvfs is not to be used for transient or temporary databases.
+ ** Just use the base VFS open to initialize the given file object and
+ ** open the underlying file. (Appendvfs is then unused for this file.)
+ */
+ return pBaseVfs->xOpen(pBaseVfs, zName, pFile, flags, pOutFlags);
}
- p = (ApndFile*)pFile;
- memset(p, 0, sizeof(*p));
- pSubFile = ORIGFILE(pFile);
+ memset(pApndFile, 0, sizeof(ApndFile));
pFile->pMethods = &apnd_io_methods;
- rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
- if( rc ) goto apnd_open_done;
- rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);
+ pApndFile->iMark = -1; /* Append mark not yet written */
+
+ rc = pBaseVfs->xOpen(pBaseVfs, zName, pBaseFile, flags, pOutFlags);
+ if( rc==SQLITE_OK ){
+ rc = pBaseFile->pMethods->xFileSize(pBaseFile, &sz);
+ }
if( rc ){
- pSubFile->pMethods->xClose(pSubFile);
- goto apnd_open_done;
+ pBaseFile->pMethods->xClose(pBaseFile);
+ pFile->pMethods = 0;
+ return rc;
}
- if( apndIsOrdinaryDatabaseFile(sz, pSubFile) ){
- memmove(pFile, pSubFile, pSubVfs->szOsFile);
+ if( apndIsOrdinaryDatabaseFile(sz, pBaseFile) ){
+ /* The file being opened appears to be just an ordinary DB. Copy
+ ** the base dispatch-table so this instance mimics the base VFS.
+ */
+ memmove(pApndFile, pBaseFile, pBaseVfs->szOsFile);
return SQLITE_OK;
}
- /* Record that append mark has not been written until seen otherwise. */
- p->iMark = -1;
- p->iPgOne = apndReadMark(sz, pFile);
- if( p->iPgOne>=0 ){
- /* Append mark was found, infer its offset */
- p->iMark = sz - p->iPgOne - APND_MARK_SIZE;
+ pApndFile->iPgOne = apndReadMark(sz, pFile);
+ if( pApndFile->iPgOne>=0 ){
+ pApndFile->iMark = sz - APND_MARK_SIZE; /* Append mark found */
return SQLITE_OK;
}
if( (flags & SQLITE_OPEN_CREATE)==0 ){
- pSubFile->pMethods->xClose(pSubFile);
+ pBaseFile->pMethods->xClose(pBaseFile);
rc = SQLITE_CANTOPEN;
+ pFile->pMethods = 0;
+ }else{
+ /* Round newly added appendvfs location to #define'd page boundary.
+ ** Note that nothing has yet been written to the underlying file.
+ ** The append mark will be written along with first content write.
+ ** Until then, paf->iMark value indicates it is not yet written.
+ */
+ pApndFile->iPgOne = APND_START_ROUNDUP(sz);
}
- /* Round newly added appendvfs location to #define'd page boundary.
- * Note that nothing has yet been written to the underlying file.
- * The append mark will be written along with first content write.
- * Until then, the p->iMark value indicates it is not yet written.
- */
- p->iPgOne = APND_START_ROUNDUP(sz, APND_ROUNDUP_BITS);
-apnd_open_done:
- if( rc ) pFile->pMethods = 0;
return rc;
}
diff --git a/ext/misc/wholenumber.c b/ext/misc/wholenumber.c
index 5643f9cf7..03d6e6902 100644
--- a/ext/misc/wholenumber.c
+++ b/ext/misc/wholenumber.c
@@ -220,7 +220,7 @@ static int wholenumberBestIndex(
pIdxInfo->orderByConsumed = 1;
}
if( (idxNum & 12)==0 ){
- pIdxInfo->estimatedCost = (double)100000000;
+ pIdxInfo->estimatedCost = 1e99;
}else if( (idxNum & 3)==0 ){
pIdxInfo->estimatedCost = (double)5;
}else{
diff --git a/ext/rbu/rbudiff.test b/ext/rbu/rbudiff.test
index 965ce297e..5c2bf9bee 100644
--- a/ext/rbu/rbudiff.test
+++ b/ext/rbu/rbudiff.test
@@ -268,6 +268,14 @@ tablE t1 USING FTs5(c);
DELETE FROM t1 WHERE rowid = 1;
INSERT INTO t1 VALUES('a b c');
}
+ 4 {
+ creAte virTUal tablE t1 USING FTs5(c);
+ INSERT INTO t1 VALUES('a b c');
+ INSERT INTO t1 VALUES('a b c');
+ } {
+ DELETE FROM t1 WHERE rowid = 1;
+ INSERT INTO t1 VALUES('a b c');
+ }
} {
forcedelete test.db test.db2
diff --git a/ext/rtree/rtree6.test b/ext/rtree/rtree6.test
index bc9ff8429..b6dfe992a 100644
--- a/ext/rtree/rtree6.test
+++ b/ext/rtree/rtree6.test
@@ -79,47 +79,47 @@ do_eqp_test rtree6.2.1 {
SELECT * FROM t1,t2 WHERE k=+ii AND x1<10
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 2:C0
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test rtree6.2.2 {
SELECT * FROM t1,t2 WHERE k=ii AND x1<10
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 2:C0
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test rtree6.2.3 {
SELECT * FROM t1,t2 WHERE k=ii
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 2:
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test rtree6.2.4.1 {
SELECT * FROM t1,t2 WHERE v=+ii and x1<10 and x2>10
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0E1
- `--SEARCH TABLE t2 USING AUTOMATIC COVERING INDEX (v=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 2:C0E1
+ `--SEARCH t2 USING AUTOMATIC COVERING INDEX (v=?)
}
do_eqp_test rtree6.2.4.2 {
SELECT * FROM t1,t2 WHERE v=10 and x1<10 and x2>10
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:C0E1
- `--SEARCH TABLE t2 USING AUTOMATIC PARTIAL COVERING INDEX (v=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 2:C0E1
+ `--SEARCH t2 USING AUTOMATIC PARTIAL COVERING INDEX (v=?)
}
do_eqp_test rtree6.2.5 {
SELECT * FROM t1,t2 WHERE k=ii AND x1<v
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 2:
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 2:
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
do_execsql_test rtree6-3.1 {
diff --git a/ext/rtree/rtreeC.test b/ext/rtree/rtreeC.test
index 47ca3ad7b..75afcd7e2 100644
--- a/ext/rtree/rtreeC.test
+++ b/ext/rtree/rtreeC.test
@@ -30,8 +30,8 @@ do_eqp_test 1.1 {
WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
} {
QUERY PLAN
- |--SCAN TABLE t
- `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+ |--SCAN t
+ `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
}
do_eqp_test 1.2 {
@@ -39,8 +39,8 @@ do_eqp_test 1.2 {
WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
} {
QUERY PLAN
- |--SCAN TABLE t
- `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+ |--SCAN t
+ `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
}
do_eqp_test 1.3 {
@@ -48,16 +48,16 @@ do_eqp_test 1.3 {
WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND ?<=max_y
} {
QUERY PLAN
- |--SCAN TABLE t
- `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+ |--SCAN t
+ `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
}
do_eqp_test 1.5 {
SELECT * FROM t, r_tree
} {
QUERY PLAN
- |--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:
- `--SCAN TABLE t
+ |--SCAN r_tree VIRTUAL TABLE INDEX 2:
+ `--SCAN t
}
do_execsql_test 2.0 {
@@ -87,8 +87,8 @@ do_eqp_test 2.1 {
WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
} {
QUERY PLAN
- |--SCAN TABLE t
- `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+ |--SCAN t
+ `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
}
do_eqp_test 2.2 {
@@ -96,8 +96,8 @@ do_eqp_test 2.2 {
WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND t.x<=max_y
} {
QUERY PLAN
- |--SCAN TABLE t
- `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+ |--SCAN t
+ `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
}
do_eqp_test 2.3 {
@@ -105,16 +105,16 @@ do_eqp_test 2.3 {
WHERE t.x>=min_x AND t.x<=max_x AND t.y>=min_y AND ?<=max_y
} {
QUERY PLAN
- |--SCAN TABLE t
- `--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
+ |--SCAN t
+ `--SCAN r_tree VIRTUAL TABLE INDEX 2:D3B2D1B0
}
do_eqp_test 2.5 {
SELECT * FROM t, r_tree
} {
QUERY PLAN
- |--SCAN TABLE r_tree VIRTUAL TABLE INDEX 2:
- `--SCAN TABLE t
+ |--SCAN r_tree VIRTUAL TABLE INDEX 2:
+ `--SCAN t
}
#-------------------------------------------------------------------------
@@ -128,24 +128,24 @@ do_execsql_test 3.1 {
do_eqp_test 3.2.1 { SELECT * FROM t1 CROSS JOIN t2 } {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE t2
+ |--SCAN t1
+ `--SCAN t2
}
do_eqp_test 3.2.2 { SELECT * FROM t2 CROSS JOIN t1 } {
QUERY PLAN
- |--SCAN TABLE t2
- `--SCAN TABLE t1
+ |--SCAN t2
+ `--SCAN t1
}
do_eqp_test 3.3.1 { SELECT * FROM t1 CROSS JOIN t3 } {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE t3 VIRTUAL TABLE INDEX 2:
+ |--SCAN t1
+ `--SCAN t3 VIRTUAL TABLE INDEX 2:
}
do_eqp_test 3.3.2 { SELECT * FROM t3 CROSS JOIN t1 } {
QUERY PLAN
- |--SCAN TABLE t3 VIRTUAL TABLE INDEX 2:
- `--SCAN TABLE t1
+ |--SCAN t3 VIRTUAL TABLE INDEX 2:
+ `--SCAN t1
}
#--------------------------------------------------------------------
@@ -203,8 +203,8 @@ do_eqp_test 5.2 {
SELECT * FROM t1, rt WHERE x==id;
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE rt VIRTUAL TABLE INDEX 1:
+ |--SCAN t1
+ `--SCAN rt VIRTUAL TABLE INDEX 1:
}
# Now create enough ANALYZE data to tell SQLite that virtual table "rt"
@@ -220,8 +220,8 @@ do_eqp_test 5.4 {
SELECT * FROM t1, rt WHERE x==id;
} {
QUERY PLAN
- |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:
- `--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (x=?)
+ |--SCAN rt VIRTUAL TABLE INDEX 2:
+ `--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (x=?)
}
# Delete the ANALYZE data. "t1" should be the outer loop again.
@@ -233,8 +233,8 @@ do_eqp_test 5.6 {
SELECT * FROM t1, rt WHERE x==id;
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE rt VIRTUAL TABLE INDEX 1:
+ |--SCAN t1
+ `--SCAN rt VIRTUAL TABLE INDEX 1:
}
# This time create and attach a database that contains ANALYZE data for
@@ -258,8 +258,8 @@ do_eqp_test 5.8 {
SELECT * FROM t1, rt WHERE x==id;
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE rt VIRTUAL TABLE INDEX 1:
+ |--SCAN t1
+ `--SCAN rt VIRTUAL TABLE INDEX 1:
}
#--------------------------------------------------------------------
@@ -327,9 +327,9 @@ do_eqp_execsql_test 7.1 {
WHERE (x1 BETWEEN xmin AND xmax);
} {
QUERY PLAN
- |--SCAN TABLE xdir
- |--SCAN TABLE ydir
- `--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B2D3B0D1
+ |--SCAN xdir
+ |--SCAN ydir
+ `--SCAN rt VIRTUAL TABLE INDEX 2:B2D3B0D1
} {
2 4
}
@@ -340,9 +340,9 @@ do_eqp_execsql_test 7.2 {
WHERE (x1 BETWEEN xmin AND xmax);
} {
QUERY PLAN
- |--SCAN TABLE xdir
- |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B0D1
- `--SCAN TABLE ydir
+ |--SCAN xdir
+ |--SCAN rt VIRTUAL TABLE INDEX 2:B0D1
+ `--SCAN ydir
} {
5 1 2 7 12 14 {}
5 2 2 7 8 12 10
@@ -355,9 +355,9 @@ do_eqp_execsql_test 7.3 {
WHERE (x1 BETWEEN xmin AND xmax);
} {
QUERY PLAN
- |--SCAN TABLE xdir
- |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B0D1
- `--SCAN TABLE ydir
+ |--SCAN xdir
+ |--SCAN rt VIRTUAL TABLE INDEX 2:B0D1
+ `--SCAN ydir
} {
2 4
}
@@ -368,9 +368,9 @@ do_eqp_execsql_test 7.4 {
WHERE (x1 BETWEEN xmin AND xmax);
} {
QUERY PLAN
- |--SCAN TABLE xdir
- |--SCAN TABLE rt VIRTUAL TABLE INDEX 2:B0D1
- `--SCAN TABLE ydir
+ |--SCAN xdir
+ |--SCAN rt VIRTUAL TABLE INDEX 2:B0D1
+ `--SCAN ydir
} {
2 4
}
diff --git a/manifest b/manifest
index 382335785..394c19780 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\stests\sfor\ssqlite_rename_quotefix().\sFix\sa\smemory\sleak\sin\sthe\ssame.
-D 2021-03-16T18:24:49.563
+C When\sdoing\sschema\supdates,\stry\sto\sconvert\s(incorrect)\sdouble-quoted\sstrings\ninto\s(SQL-standard)\ssingle-quoted\sstrings.
+D 2021-03-23T16:34:13.598
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -7,7 +7,7 @@ F Makefile.in fe6cc1db11e02b308f3ab0ec2504344697b9eaaa410fa73f48d16a143462e5d3
F Makefile.linux-gcc f609543700659711fbd230eced1f01353117621dccae7b9fb70daa64236c5241
F Makefile.msc 6b5428cef2af1288e02faeb602dabe68fbf2de7bc8a8e29c7299778ee08cd35c
F README.md 1514a365ffca3c138e00c5cc839906108a01011a6b082bad19b09781e3aa498a
-F VERSION 370d0120d7353c276a7c1ff568347d937267543bd54883f9efe0d859df7f7079
+F VERSION 8c392f6d70d82e513a0eac622bdf23c43df3e084cb630288beba8cef3012c812
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
@@ -34,7 +34,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559
-F configure bdf7d9a9192514a07ab2e56eaf927729ea548cfabee3eac080079492014fbfce x
+F configure c658869fc056a2460a2212fb2960e410cd24e3fb9c55640fbc78d15b48810936 x
F configure.ac 4e4b58b32f88c8da9914a2f2c3158f80e69907eccc019fcc7e3ba14ffd91c640
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
@@ -50,7 +50,7 @@ F ext/async/sqlite3async.c 6f247666b495c477628dd19364d279c78ea48cd90c72d9f9b98ad
F ext/async/sqlite3async.h 46b47c79357b97ad85d20d2795942c0020dc20c532114a49808287f04aa5309a
F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4
-F ext/expert/expert1.test 63d778d964e55ef2d1a723043d91c59e7dc6ef1649d91c78c0bef00f9c6f1427
+F ext/expert/expert1.test 6703fd74711daf8230240680b0a348d0720e28819b602701adfbd32457fdcddd
F ext/expert/sqlite3expert.c de51b187c629a4c4264d5de0b77862641e11426f7a963a92abf2d4077085fc8c
F ext/expert/sqlite3expert.h ca81efc2679a92373a13a3e76a6138d0310e32be53d6c3bfaedabd158ea8969b
F ext/expert/test_expert.c d56c194b769bdc90cf829a14c9ecbc1edca9c850b837a4d0b13be14095c32a72
@@ -200,7 +200,7 @@ F ext/fts5/test/fts5near.test 211477940142d733ac04fad97cb24095513ab2507073a99c27
F ext/fts5/test/fts5onepass.test f9b7d9b2c334900c6542a869760290e2ab5382af8fbd618834bf1fcc3e7b84da
F ext/fts5/test/fts5optimize.test 36a752d24c818792032e4ff502936fc9cc5ef938721696396fdc79214b2717f1
F ext/fts5/test/fts5phrase.test 13e5d8e9083077b3d9c74315b3c92ec723cc6eb37c8155e0bfe1bba00559f07b
-F ext/fts5/test/fts5plan.test 79d35b5e83bbdcba48d946a7f008df161f6b0ede1a966892d0aa6c8dd0b6e773
+F ext/fts5/test/fts5plan.test b65cfcca9ddd6fdaa118c61e17aeec8e8433bc5b6bb307abd116514f79c49c5a
F ext/fts5/test/fts5porter.test 8d08010c28527db66bc3feebd2b8767504aaeb9b101a986342fa7833d49d0d15
F ext/fts5/test/fts5porter2.test 0d251a673f02fa13ca7f011654873b3add20745f7402f108600a23e52d8c7457
F ext/fts5/test/fts5prefix.test a0fa67b06650f2deaa7bf27745899d94e0fb547ad9ecbd08bfad98c04912c056
@@ -219,7 +219,7 @@ F ext/fts5/test/fts5synonym2.test b54cce5c34ec08ed616f646635538ae82e34a0e28f947e
F ext/fts5/test/fts5tok1.test 1f7817499f5971450d8c4a652114b3d833393c8134e32422d0af27884ffe9cef
F ext/fts5/test/fts5tok2.test dcacb32d4a2a3f0dd3215d4a3987f78ae4be21a2
F ext/fts5/test/fts5tokenizer.test ac3c9112b263a639fb0508ae73a3ee886bf4866d2153771a8e8a20c721305a43
-F ext/fts5/test/fts5trigram.test e2ce256fd0ccd6707e740aa3596206aedb0d5834b100c0cb49e344dcd1d8463c
+F ext/fts5/test/fts5trigram.test 5b4feb53a4d5aca70c841f6919c8719b5a9c805474727dda99285fccdd2e9cce
F ext/fts5/test/fts5umlaut.test a42fe2fe6387c40c49ab27ccbd070e1ae38e07f38d05926482cc0bccac9ad602
F ext/fts5/test/fts5unicode.test 17056f4efe6b0a5d4f41fdf7a7dc9af2873004562eaa899d40633b93dc95f5a9
F ext/fts5/test/fts5unicode2.test 9b3df486de05fb4bde4aa7ee8de2e6dae1df6eb90e3f2e242c9383b95d314e3e
@@ -286,7 +286,7 @@ F ext/lsm1/tool/mklsm1c.tcl f31561bbee5349f0a554d1ad7236ac1991fc09176626f529f607
F ext/misc/README.md d6dd0fe1d8af77040216798a6a2b0c46c73054d2f0ea544fbbcdccf6f238c240
F ext/misc/amatch.c e3ad5532799cee9a97647f483f67f43b38796b84b5a8c60594fe782a4338f358
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
-F ext/misc/appendvfs.c 7fff57cd4a5d63758d20a1dd1a96c64c7c123cf48fd98bbd36cfe8b063236e3d
+F ext/misc/appendvfs.c bdc9de0a0e61c21327e975da178b4fd6f57de9c46123044aa6ee3a20798c5db2
F ext/misc/blobio.c a867c4c4617f6ec223a307ebfe0eabb45e0992f74dd47722b96f3e631c0edb2a
F ext/misc/btreeinfo.c d28ce349b40054eaa9473e835837bad7a71deec33ba13e39f963d50933bfa0f9
F ext/misc/carray.c b75a0f207391038bf1540d3372f482a95c3613511c7c474db51ede1196321c7c
@@ -336,7 +336,7 @@ F ext/misc/vfslog.c 3b25c2f56ba60788db247287be6ab024b53c4afffd412b4876db563389be
F ext/misc/vfsstat.c 389ea13983d3af926504c314f06a83cc858d5adc24b40af74aaed1fece00c118
F ext/misc/vtablog.c 5538acd0c8ddaae372331bee11608d76973436b77d6a91e8635cfc9432fba5ae
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
-F ext/misc/wholenumber.c 520f34c3099e5b7d546f13708607dc2fa173c46b68952eecf0d19cd675fec85e
+F ext/misc/wholenumber.c a838d1bea913c514ff316c69695efbb49ea3b8cb37d22afc57f73b6b010b4546
F ext/misc/zipfile.c e35e035bc2765b1ccdcb15f9815c2112843fcbc8f36aa071f0e5935df7072228
F ext/misc/zorder.c b0ff58fa643afa1d846786d51ea8d5c4b6b35aa0254ab5a82617db92f3adda64
F ext/rbu/rbu.c b880ca5cb857d6d6f52e72eb7397813058ef48c78c5402cd04ff2b6b5437f622
@@ -359,7 +359,7 @@ F ext/rbu/rbu_common.tcl 60d904133ff843fe72cc0514e9dd2486707181e6e0fbab20979da28
F ext/rbu/rbucollate.test cac528a9a46318cba42e61258bb42660bbbf4fdb9a8c863de5a54ad0c658d197
F ext/rbu/rbucrash.test 000981a1fe8a6e4d9a684232f6a129e66a3ef595f5ed74655e2f9c68ffa613b4
F ext/rbu/rbucrash2.test efa143cc94228eb0266d3f1abfbee60a5838a84cef7cc3fcb8c145b74d96fd41
-F ext/rbu/rbudiff.test 156957851136b63c143478518dc1bda6c832103cdbe8ac1d7cdd47edb3cbe0a3
+F ext/rbu/rbudiff.test abe895a8d479e4d33acb40e244e3d8e2cd25f55a18dfa8b9f83e13d00073f600
F ext/rbu/rbudor.test e3e8623926012f43eebe51fedf06a102df2640750d971596b052495f2536db20
F ext/rbu/rbuexpr.test 10d0420537c3bc7666e576d72adeffe7e86cfbb00dcc30aa9ce096c042415190
F ext/rbu/rbufault.test 2d7f567b79d558f6e093c58808cab4354f8a174e3802f69e7790a9689b3c09f8
@@ -400,13 +400,13 @@ F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e130
F ext/rtree/rtree3.test 4ee5d7df86040efe3d8d84f141f2962a7745452200a7cba1db06f86d97050499
F ext/rtree/rtree4.test 304de65d484540111b896827e4261815e5dca4ce28eeecd58be648cd73452c4b
F ext/rtree/rtree5.test 49c9041d713d54560b315c2c7ef7207ee287eba1b20f8266968a06f2e55d3142
-F ext/rtree/rtree6.test 1252a0439da01d2f1f5cbbdeeb80455a2d68b9bae2a9787937b167a5e3957828
+F ext/rtree/rtree6.test 9ce3691c1aac43070a9f194f0ebf54372db346c5a82241fd11b525ed53ce9f3f
F ext/rtree/rtree7.test c8fb2e555b128dd0f0bdb520c61380014f497f8a23c40f2e820acc9f9e4fdce5
F ext/rtree/rtree8.test 2d99006a1386663978c9e1df167554671e4f711c419175b39f332719deb1ce0e
F ext/rtree/rtree9.test c646f12c8c1c68ef015c6c043d86a0c42488e2e68ed1bb1b0771a7ca246cbabf
F ext/rtree/rtreeA.test ed2f1be9c06dde0b1ab93a95dd9e87eeaa02db2d30bcb4b9179b69ee3dc3319b
F ext/rtree/rtreeB.test 4cec297f8e5c588654bbf3c6ed0903f10612be8a2878055dd25faf8c71758bc9
-F ext/rtree/rtreeC.test 6aa87eba4d9a3003b941a1ba77db259c5cabc3fd92fc5a6360f5369520eb9a4d
+F ext/rtree/rtreeC.test c4bfa9a61c6788c03e4a9ce40ab2cfc6100982559effd9842d1b658e1d47aa5f
F ext/rtree/rtreeD.test fe46aa7f012e137bd58294409b16c0d43976c3bb92c8f710481e577c4a1100dc
F ext/rtree/rtreeE.test e65d3fc625da1800b412fc8785817327d43ccfec5f5973912d8c9e471928caa9
F ext/rtree/rtreeF.test 81ffa7ef51c4e4618d497a57328c265bf576990c7070633b623b23cd450ed331
@@ -483,18 +483,18 @@ F src/auth.c 08954fdc4cc2da5264ba5b75cfd90b67a6fc7d1710a02ccf917c38eadec77853
F src/backup.c 3014889fa06e20e6adfa0d07b60097eec1f6e5b06671625f476a714d2356513d
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
-F src/btree.c bafa3a2e8b6622a3aa8791f90c8ecc70e8ae551ba9023f865213890f5b8a8994
+F src/btree.c cfd2a37794532d765e235a2550ad2732924a6d06b07a3bc9f6a71750e3b3cca1
F src/btree.h 096cc53baa58be22b02c896d1cf933c38cfc6d65f9253c1367ece8cc88a24de5
-F src/btreeInt.h 7614cae30f95b6aed0c7cac7718276a55cfe2c77058cbfd8bef5b75329757331
-F src/build.c fec73c39d756f31d35ccbaa80fe1e040a8d675a318d4d30f41c444167bf3b860
+F src/btreeInt.h 7bc15a24a02662409ebcd6aeaa1065522d14b7fda71573a2b0568b458f514ae0
+F src/build.c 06089aaf769ec1e91d1ba607442aa32c22aeb97200d47fe405ceb373adbdf2d7
F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
F src/ctime.c 2a322b9a3d75771fb4d99e0702851f4f68dda982507a0f798eefb0712969a410
-F src/date.c dace306a10d9b02ee553d454c8e1cf8d3c9b932e137738a6b15b90253a9bfc10
+F src/date.c e0632f335952b32401482d099321bbf12716b29d6e72836b53ae49683ebae4bf
F src/dbpage.c 8a01e865bf8bc6d7b1844b4314443a6436c07c3efe1d488ed89e81719047833a
F src/dbstat.c 3aa79fc3aed7ce906e4ea6c10e85d657299e304f6049861fe300053ac57de36c
F src/delete.c 73f57a9a183532c344a3135cf8f2a5589376e39183e0b5f562d6b61b2af0f4d8
-F src/expr.c d681f0b48b1e16173ad8e1e8f7323cda120a0c517cb7a3d5b329c4e2c57f18bd
+F src/expr.c 030391f7a19e74e10ce9f2791f26158b34ee303c13993add67dff87501673d49
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
F src/fkey.c e9063648396c58778f77583a678342fe4a9bc82436bf23c5f9f444f2df0fdaa4
F src/func.c 479f6929be027eb0210cbdde9d3529c012facf082d64a6b854a9415940761e5e
@@ -503,7 +503,7 @@ F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19
F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38
F src/hwtime.h cb1d7e3e1ed94b7aa6fde95ae2c2daccc3df826be26fc9ed7fd90d1750ae6144
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
-F src/insert.c 8942baede303a54ba3b6d06200d5b74c9bc25ababec8a55823e06309748cd4a3
+F src/insert.c f8d462ab6174a2c30476b5a1fc77f4d66ce7d9dd45c994966b9f4445db1131f0
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
F src/loadext.c 8c9c8cd2bd8eecdb06d9b6e89de7e9e65bae45cc8fc33609cc74023a5c296067
F src/main.c 2a7ece3a67c646e5fe9984ffe0277d6a76f80ce9715bf2faa591d8cb66b9d913
@@ -526,7 +526,7 @@ F src/os.c 2d6e646370b1aa78942c68d7edf124e518963adf4a90bce87f365a5a5495529a
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
-F src/os_unix.c adbbcea4c63d3b400d405f60a5da4c01433753ec4a12e2dc695beb2bbd671fe9
+F src/os_unix.c 7a9eab7b11f552ab91ead980086b312c7e3b871efdee8c0c072b682bbec6592e
F src/os_win.c 77d39873836f1831a9b0b91894fec45ab0e9ca8e067dc8c549e1d1eca1566fe9
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
F src/pager.c 970691daea03f9f15e34de671bd8675c1e136232b529e21bfd36d4dba6d41753
@@ -538,16 +538,16 @@ F src/pcache1.c 388304fd2d91c39591080b5e0f3c62cfba87db20370e7e0554062bfb29740e9f
F src/pragma.c eb42cb9bec189cf18cef5d8fcae56e13bb73ef2b019b198fb48740ced81bce95
F src/pragma.h 8dc78ab7e9ec6ce3ded8332810a2066f1ef6267e2e03cd7356ee00276125c6cf
F src/prepare.c e21b54489b5c73b06ada15e6fc79b5c6f64b06701924a6ca98944ae59e06256f
-F src/printf.c 2b03a80d7c11bb422115dca175a18bf430e9c9dbaa0eee63b758f0c022f8f34f
+F src/printf.c 85d3413fa526404f053a2a13150492f94900639fca4c1b2f74a312b5d777a5c3
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c d95db73d3e6a5c689e5f6604b4d2521350e45f2a0f0f84f5a2dc2bfee56580a0
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
-F src/select.c fc904a7aa7ebfd5c7a57a0141d829c9f5388ac7773e0d1d9668768c1bbc87fc3
-F src/shell.c.in 8df3912a7ca4873a1443d4adef1b25baee8c086ab479fd9c4f13ab03f98049ab
+F src/select.c fe0a11d7cf2eddd58cf6fc5f65a5faac1eb430102a3f00092673a499bfd4a50e
+F src/shell.c.in dcce260883836c9b58847505fbccce8d5546af925046f7dacd9443e922ece036
F src/sqlite.h.in 3426a080ea1f222a73e3bd91e7eacbd30570a0117c03d42c6dde606f33e5e318
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h 61b38c073d5e1e96a3d45271b257aef27d0d13da2bea5347692ae579475cd95e
-F src/sqliteInt.h 3652edb9e6032808d51d6f26d9c6f9eb621ac199e0fd2d2a5aa551799d91a296
+F src/sqliteInt.h 0f6446f61254d21a398900b888f0fe30179b24f87dde42acf94e767a99888c0b
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
F src/status.c 4b8bc2a6905163a38b739854a35b826c737333fab5b1f8e03fa7eb9a4799c4c1
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
@@ -606,19 +606,19 @@ F src/test_windirent.h 90dfbe95442c9762357fe128dc7ae3dc199d006de93eb33ba3972e0a9
F src/test_window.c cdae419fdcea5bad6dcd9368c685abdad6deb59e9fc8b84b153de513d394ba3f
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
-F src/tokenize.c c64c49d7c2ec4490c2fef1f24350167ba16b03b0c6cee58ad1a1d70a4325d4e9
-F src/treeview.c c6260e1fa5f41c361b2409edc9b0050bcaef5bc4d6abc467fbc45f0d7ccf3d84
-F src/trigger.c 861c3ec2c5b0fc830bdf82470454a9324fad70cbaa96d2e208fb54577c9e8d28
+F src/tokenize.c 0b9c82fa628b5adce93e2bcaf935a24d43eb83344fb51551f7835526d0693fc4
+F src/treeview.c 70f57a2b77e20b354724ea69b8ed1ea1df946c48296d695320c741c7d174be90
+F src/trigger.c f555123aabf7f3d175cbe6d33c02783302cbdc0a7236203fa2a0539baf2d890e
F src/update.c 0f5a61f0787199983530a33f6fffe4f52742f35fcdf6ccfad1078b1a8bc17723
F src/upsert.c df8f1727d62b5987c4fd302cd4d7c0c84ae57cd65683c5a34a740dfe24039235
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
F src/util.c 41c7a72da1df47864faa378a1c720b38adb288c6838cb6be5594511b6287a048
F src/vacuum.c 492422c1463c076473bae1858799c7a0a5fe87a133d1223239447c422cd26286
-F src/vdbe.c b79b222f07690874d436eef4ad5e76845b2796e7094b1d0545cc94333f0d8e50
+F src/vdbe.c 5001a0d3003d3664615dd7ac3cedab1d51e2391b5bdd0878f40a41fdcd942e13
F src/vdbe.h 25dabb25c7e157b84e59260cfb5b466c3ac103ede9f36f4db371332c47601abe
-F src/vdbeInt.h 3df118924e1711f1bbc8e30c46260d0ab6c3b029b32dd411f789111f76434f3c
+F src/vdbeInt.h 000d9ab1ea4cb55a80de15e28f3f595645b4fddef34bca4347fb3db8031d9041
F src/vdbeapi.c 4a43e303ec3354c785f453e881521969378e85628278ab74ba4a9df790c0d93b
-F src/vdbeaux.c fb51483c2bcaf45c5de63c26cce8649ef37f1332e8e035867033d21ef5e7fc2c
+F src/vdbeaux.c 1b3eaa3a70d9d1877266e8ade0d0c3b2b4c6cf77d393d94dbcbd522b9bfefc15
F src/vdbeblob.c 253ed82894924c362a7fa3079551d3554cd1cdace39aa833da77d3bc67e7c1b1
F src/vdbemem.c 947f2a65910edb4014dc981d33e414a68c51f169f9df8c4c493a0ba840b6eb1f
F src/vdbesort.c f5b5e473a7cee44e47a94817b042fd7172cf3aa2c0a7928a8339d612bcfdec5a
@@ -631,7 +631,7 @@ F src/wal.h c3aa7825bfa2fe0d85bef2db94655f99870a285778baa36307c0a16da32b226a
F src/walker.c d42d6c80ea363ef689a462e65eefcfe87deab924c50de5baa37ecb6af7d7ddaa
F src/where.c 10d06b16670a1d2a992d52a9f08e49426d38a08fb0a7ae5f7f62fd023d560e1e
F src/whereInt.h 446e5e8018f83358ef917cf32d8e6a86dc8430113d0b17e720f1839d3faa44c4
-F src/wherecode.c e57a8690311a75d06e723e8d379f9831de04aba300e07174d236e32a7f9c7a13
+F src/wherecode.c c7354c9749f015f37bc32e15a4257a5155fa5d2b79f605f528bd09f3b9f1b4e6
F src/whereexpr.c 53452fe2fb07be2f4cb17f55cc721416fae0092c00717f106faf289c990b6494
F src/window.c 7e89ac4b6cd6bb9b7772234a625d19c39b530f4ac06e43688a8b7e6a1ab512a2
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
@@ -654,25 +654,25 @@ F test/alterdropcol2.test 527fce683b200d620f560f666c44ae33e22728e990a10a48a54328
F test/alterlegacy.test f38c6d06cda39e1f7b955bbce57f2e3ef5b7cb566d3d1234502093e228c15811
F test/altermalloc.test 167a47de41b5c638f5f5c6efb59784002b196fff70f98d9b4ed3cd74a3fb80c9
F test/altermalloc2.test fa7b1c1139ea39b8dec407cf1feb032ca8e0076bd429574969b619175ad0174b
-F test/altermalloc3.test 7a21b042413c3e9571af4f583e327a6961ec2b7a34eae57a530f89b236a46a72
+F test/altermalloc3.test 059841a3de6b6780efd9f0b30bf1d9b4443c555f68d39975cbcac2583167b239
F test/alterqf.test 67568ad152db8c1187b15633b801242cf960f1beafc51261a3d1725d910baeb2
-F test/altertab.test 7691872aadfe00a94b459af9086504bcf399dd936336e486da1b182930744b77
+F test/altertab.test d15362de3d487368e1f64d600fdfc1976033aecf8394c0a88454a5c63b357209
F test/altertab2.test b0d62f323ca5dab42b0bc028c52e310ebdd13e655e8fac070fe622bad7852c2b
F test/altertab3.test 2b82fa2236a3a91553d53ae5555d8e723c7eec174c41f1fa62ff497355398479
F test/amatch1.test b5ae7065f042b7f4c1c922933f4700add50cdb9f
F test/analyze.test 547bb700f903107b38611b014ca645d6b5bb819f5210d7bf39c40802aafeb7d7
-F test/analyze3.test fca2a9de0017becfdcc201647f03b1cfd5ba0e7b5b5c852936e4ec62780cde49
-F test/analyze4.test cdf88f3f72b0f0643a1ff6c730fc5af1e42464d47478d9fbac84c333f72c014e
+F test/analyze3.test 4440c4932247adb2b4e0c838f657c19dc7af4f56859255436dc4e855f39b9324
+F test/analyze4.test 293ec8ea21525f3435beaf9d6b1efb29e719415f03a0cd2a70589d59098e8464
F test/analyze5.test fa5131952303ac4146aba101b116b9c8cb89e2637531c334a6df7f7d19dddc0d
-F test/analyze6.test 6c3f7df2996cb6872f355a6ac1eb6d5de00a5a9288214bad7ef25c97d9cc72dc
-F test/analyze7.test 6ef0b12369f61ddeadc7d8a705c40e6b52cb29f63de3a4c56581b510b46b5783
-F test/analyze8.test 36ce54947710bd44e4f9484e1ad07e725ef01a9d7078b417c1bc884356febe4d
-F test/analyze9.test 9fbf0e0101eef4f5dc149769aa14e10b76ee06e7c28598264b32173cd1999a54
-F test/analyzeC.test 489fe2ea3be3f17548e8dd895f1b41c9669b52de1b0861f5bffe6eec46eac710
-F test/analyzeD.test e50cd0b3e6063216cc0c88a1776e8645dc0bd65a6bb275769cbee33b7fd8d90c
-F test/analyzeE.test 8684e8ac5722fb97c251887ad97e5d496a98af1d
-F test/analyzeF.test 9e1a0537949eb5483642b1140a5c39e5b4025939024b935398471fa552f4dabb
-F test/analyzeG.test a48c0f324dd14de9a40d52abe5ca2637f682b9a791d2523dd619f6efa14e345b
+F test/analyze6.test 028f5bdfc9e5b5294768fa9a7185b8cd1d019aa7aab5b2f8ee42d7271d9a3b28
+F test/analyze7.test 079d17c495e396bdbd6cc6a083112788a6fbfb3b95c42e760e4270a53c9ead8f
+F test/analyze8.test 29ef237d8a59b39cc31c3310134fefe96a690b195e3deed5ecb652839089f15c
+F test/analyze9.test 162cd40d713310fbe7a63a5ecff5d3a013777d86809618838177d9b2af4dd09c
+F test/analyzeC.test 1111830ad355d29a294a5dda654dd5f6a8622c6a223a4f7b7b3d091df7a7a42b
+F test/analyzeD.test 485f621cfd2ef0a8f8ac79672586651bfa495bd899db50461bb4b558400ab3c1
+F test/analyzeE.test 69d130f9ba78c9853dcd5a18317e81f462a72d704cec0c4c30afb220213acd29
+F test/analyzeF.test 40b5cc3ad7b10e81020d7ca86f1417647ecfae7477cfd88acc5aa7ae1068f949
+F test/analyzeG.test 623be33038c49648872746c8dd8b23b5792c08fef173c55e82f1b12fca259852
F test/analyzer1.test 459fa02c445ddbf0101a3bad47b34290a35f2e49
F test/async.test 1d0e056ba1bb9729283a0f22718d3a25e82c277b
F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b
@@ -686,21 +686,21 @@ F test/atrc.c c388fac43dbba05c804432a7135ae688b32e8f25818e9994ffba4b64cf60c27c
F test/attach.test 54f8e49e88d0de48f6428267a678465863d2b8f72320612f35bd5c02e240bc2f
F test/attach2.test 256bd240da1835fb8408dd59fb7ef71f8358c7a756c46662434d11d07ba3a0ce
F test/attach3.test c59d92791070c59272e00183b7353eeb94915976
-F test/attach4.test aa05b1d8218b24eba5a7cccf4f224f514ba57ba705c9267f09d2bb63fed0eea1
+F test/attach4.test 00e754484859998d124d144de6d114d920f2ed6ca2f961e6a7f4183c714f885e
F test/attachmalloc.test 12c4f028e570acf9e0a4b0b7fe6f536e21f3d5ebddcece423603d0569beaf438
F test/auth.test 2154625c05bc79f0e0ea72cb2358395a8041243caa0fd7ce7617d50da4331794
F test/auth2.test 9eb7fce9f34bf1f50d3f366fb3e606be5a2000a1
F test/auth3.test db21405b95257c24d29273b6b31d0efc59e1d337e3d5804ba2d1fd4897b1ae49
F test/autoanalyze1.test b9cc3f32a990fa56669b668d237c6d53e983554ae80c0604992e18869a0b2dec
F test/autoinc.test 997d6f185f138229dc4251583a1d04816423dddc2fc034871a01aeb1d728cb39
-F test/autoindex1.test 96185415f5faacd5b8d7a7f505efddd5abb1f111d58338e9c0b1dc40b87cd3cc
+F test/autoindex1.test fe27af92eaf884bd9c38f94be3e8afa04ec494e5eefb189902026181a6175f5e
F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df
-F test/autoindex3.test 2dd997d6590438b53e4f715f9278aa91c9299cf3f81246a0915269c35beb790e
+F test/autoindex3.test 2d13958a5617e987624a428d7aed91bf51f322b49b476e3573fadec697ce6da5
F test/autoindex4.test 49d3cd791a9baa16fb461d7ea3de80d019a819cf
-F test/autoindex5.test a5d72fe8c217cc0ea356dc6fa06a282a8a3fc53aa807709d79dba07a8f248102
+F test/autoindex5.test 809c59d6bee9a5146bef0809a6a2a050f89b78f63c11db2b84a567403e7dd85a
F test/autovacuum.test 0831cd34e14695d297187f7f6519265e3121c5b0a1720e548e86829e796129e9
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
-F test/avfs.test 67a27e590b1baae5249bc857d10814a13231dbe2d624c64f2aa78c4ba85afff9
+F test/avfs.test 0c3a38e03cccb0fc3127838462dc05dc3f4c1480d770c084b388304c25de3652
F test/avtrans.test b7dc25459ecbd86c6fa9c606ee3068f59d81e225118617dcf2bbb6ded2ade89e
F test/backcompat.test 3e64cedda754c778ef6bbe417b6e7a295e662a4d
F test/backup.test dd4a5ff756e3df3931dacb1791db0584d4bad989
@@ -712,17 +712,17 @@ F test/backup_malloc.test 0c9abdf74c51e7bedb66d504cd684f28d4bd4027
F test/badutf.test d5360fc31f643d37a973ab0d8b4fb85799c3169f
F test/badutf2.test f310fd3b24a491b6b77bccdf14923b85d6ebcce751068c180d93a6b8ff854399
F test/bc_common.tcl b5e42d80305be95697e6370e015af571e5333a1c
-F test/bestindex1.test 705b57d7f51d53ee5fd043dd9666236e1fc18f4d59abf51da0ea5ea1b4804947
-F test/bestindex2.test 9a0ccd320b6525eec3a706aae6cdab7e1b7b5abca75027e39f39f755e76e5928
-F test/bestindex3.test 7622e792ff2da16d262d3cea6ad914591ac4806d57ed128e6c940b7920b47b84
-F test/bestindex4.test 038e3d0789332f3f1d61474f9bbc9c6d08c6bd1783a978f31f38ad82688de601
+F test/bestindex1.test 2e92e046148b3f8a2be62af9c0f307413547a33677af0df159c0fcc76e5134a2
+F test/bestindex2.test 60266e2854055788459cbfd86cef575601eabe74a2c61faba72601739fea4398
+F test/bestindex3.test e061a6ed0f519beee037ba7e7a4c37f80c8a7e4a303e2559ed1f760e4b0235eb
+F test/bestindex4.test 82250e7dcc6d5b15244edc9d6554b1760583af1b8548c2a255a1c4f28e744c0e
F test/bestindex5.test 67c1166131bb59f9e47c00118f7d432ca5491e6cae6ca3f87ca9db20103a78f9
F test/bestindex6.test d856a9bb63d927493575823eed44053bc36251e241aa364e54d0f2a2d302e1d4
-F test/bestindex7.test f36ada201973d3022cf7afffffe08de9e58341996020e7a2df9a1d2f2be20132
-F test/between.test 68137a6e941c221417c15b6fe2d55f27bb1b6ab48bdf9e2aa51efdd85bc53802
+F test/bestindex7.test a11348824aed0de2bb9030f092636929000cd72882bdf919adacc3792f67ccbd
+F test/between.test b9a65fb065391980119e8a781a7409d3fcf059d89968279c750e190a9a1d5263
F test/bigfile.test aa74f4e5db51c8e54a1d9de9fa65d01d1eb20b59
F test/bigfile2.test 1b489a3a39ae90c7f027b79110d6b4e1dbc71bfc
-F test/bigmmap.test e906cf9729d7c362270ffe9fa6471f4c39c28ba83f0f77fb795e1b4d38a22ba0
+F test/bigmmap.test b820c234daa56d24bc3bf006e3ac7aa9d9623c8ac656a38f59063b444a2d65d1
F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
F test/bigsort.test 8299fa9298f4f1e02fc7d2712e8b77d6cd60e5a2
F test/bind.test 1e136709b306f7ed3192d349c2930d89df6ab621654ad6f1a72381d3fe76f483
@@ -741,7 +741,7 @@ F test/btree01.test e08b3613540145b353f20c81cb18ead54ff12e0f
F test/btree02.test 7555a5440453d900410160a52554fe6478af4faf53098f7235f1f443d5a1d6cc
F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
F test/busy.test 510dc6daaad18bcbbc085bcc6217d6dc418def5e73f72ce1475eea0cb7834727
-F test/busy2.test 0a1633fef7987fc8ea25ed5838f7eef2f08fc6d2a3dcc77d23e6402e53946a7a
+F test/busy2.test dbfb61b3265e7a962d3bcd32cd542bbe3d7801edbda6438d35af5aa707cae981
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
F test/cacheflush.test af25bb1509df04c1da10e38d8f322d66eceedf61
F test/cachespill.test 895997f84a25b323b166aecb69baab2d6380ea98f9e0bcc688c4493c535cfab9
@@ -773,7 +773,7 @@ F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
F test/collateB.test 1e68906951b846570f29f20102ed91d29e634854ee47454d725f2151ecac0b95
F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1
F test/colname.test 87ad5458bb8709312dac0d6755fd30e8e4ca83298d0a9ef6e5c24277a3c3390e
-F test/columncount.test eff33d402a7b0fde0a52a1920d238af200ca573327021e0ce3b7e5688de41449
+F test/columncount.test d86fb6307261186370698962790ad2088ed419e4a4e823512b502f17d443b1b7
F test/conflict.test ac0667090f66130ac77d5fb764655558ca6600dd6d88f670ca9123b61c448337
F test/conflict2.test 5557909ce683b1073982f5d1b61dfb1d41e369533bfdaf003180c5bc87282dd1
F test/conflict3.test 81865d9599609aca394fb3b9cd5f561d4729ea5b176bece3644f6ecb540f88ac
@@ -801,10 +801,10 @@ F test/corruptK.test 5b4212fe346699831c5ad559a62c54e11c0611bdde1ea8423a091f9c01a
F test/corruptL.test 22589f503602cc5984e80f27f46c4de2134f24f1515ba2440513c377cb692258
F test/corruptM.test 7d574320e08c1b36caa3e47262061f186367d593a7e305d35f15289cc2c3e067
F test/corruptN.test 781c5f26a2d8918f03d45ac4968a738031eeb113a4b153c7588756d9b09c7b04
-F test/cost.test 1d156ce9858780a966c062694687afe0343a0ed12d081d071fb57027e726bafc
-F test/count.test e0699a15712bc2a4679d60e408921c2cce7f6365a30340e790c98e0f334a9c77
+F test/cost.test b11cdbf9f11ffe8ef99c9881bf390e61fe92baf2182bad1dbe6de59a7295c576
+F test/count.test 5364003488249957750a5f15ee42ca1cd7b100b1131c2dc71fff266a1250bf55
F test/countofview.test e17d6e6688cf74f22783c9ec6e788c0790ee4fbbaee713affd00b1ac0bb39b86
-F test/coveridxscan.test 5ec98719a2e2914e8908dc75f7247d9b54a26df04625f846ac7900d5483f7296
+F test/coveridxscan.test f35c7208dedc4f98e471c569df64c0f95a49f6e072d8dc7c8f99bdee2697de1b
F test/crash.test fb9dc4a02dcba30d4aa5c2c226f98b220b2b959f
F test/crash2.test 5b14d4eb58b880e231361d3b609b216acda86651
F test/crash3.test 8f5de9d32ab9ab95475a9efe7f47a940aa889418
@@ -823,7 +823,7 @@ F test/cursorhint.test 0175e4404181ace3ceca8b114eb0a98eae600d565aa4e2705abbe6614
F test/cursorhint2.test 6f3aa9cb19e7418967a10ec6905209bcbb5968054da855fc36c8beee9ae9c42f
F test/dataversion1.test 6e5e86ac681f0782e766ebcb56c019ae001522d114e0e111e5ebf68ccf2a7bb8
F test/date.test 9b73bbeb1b82d9c1f44dec5cf563bf7da58d2373
-F test/date2.test 520a1708e4e14c682cf514560f3e9f2e5affa9d66560fbc2a6941ae291260daf
+F test/date2.test 7e12ec14aaf4d5e6294b4ba140445b0eca06ea50062a9c3a69c4ee13d0b6f8b1
F test/dbdata.test 042f49acff3438f940eeba5868d3af080ae64ddf26ae78f80c92bec3ca7d8603
F test/dbfuzz.c 73047c920d6210e5912c87cdffd9a1c281d4252e
F test/dbfuzz001.test 55e1a3504f8dea84155e09912fe3b1c3ad77e0b1a938ec42ca03b8e51b321e30
@@ -851,12 +851,12 @@ F test/e_blobclose.test 4b3c8c60c2171164d472059c73e9f3c1844bb66d
F test/e_blobopen.test e95e1d40f995056f6f322cd5e1a1b83a27e1a145
F test/e_blobwrite.test f87ff598b67af5b3ec002a8d83e804dc8d23808e88cf0080c176612fc9ffce14
F test/e_changes.test fd66105385153dbf21fdb35eb8ef6c3e1eade579
-F test/e_createtable.test 7107f5deda2324ea12dbf105044dc9265195401e9dbb3eead6a2c1a3da4bb5b7
+F test/e_createtable.test 7997c0106c181243e0ac7db7ba8b9ae7233d0bfb0188605650322a7a02ea326e
F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
F test/e_droptrigger.test 235c610f8bf8ec44513e222b9085c7e49fad65ad0c1975ac2577109dd06fd8fa
F test/e_dropview.test 74e405df7fa0f762e0c9445b166fe03955856532e2bb234c372f7c51228d75e7
F test/e_expr.test 6ba7a51ece7b3e7fc145f14f924eed25ebb5a24e7b8596c78f3838d372cf0385
-F test/e_fkey.test a2907f749cccd0b2c30d8576b673002eebdcc1fc9964bae61e5117b1d54733e2
+F test/e_fkey.test 351c7b989e5aefcc339ef5fc78dc4738442bd247a392cd67d81c2881000c369e
F test/e_fts3.test 17ba7c373aba4d4f5696ba147ee23fd1a1ef70782af050e03e262ca187c5ee07
F test/e_insert.test f02f7f17852b2163732c6611d193f84fc67bc641fb4882c77a464076e5eba80e
F test/e_reindex.test 2b0e29344497d9a8a999453a003cb476b6b1d2eef2d6c120f83c2d3a429f3164
@@ -876,15 +876,15 @@ F test/enc.test 9a7be5479da985381d740b15f432800f65e2c87029ee57a318f42cb2eb43763a
F test/enc2.test 848bf05f15b011719f478dddb7b5e9aea35e39e457493cba4c4eef75d849a5ec
F test/enc3.test 6807f7a7740a00361ca8d0ccd66bc60c8dc5f2b6
F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
-F test/eqp.test 84879b63e3110552bf8ce648a3507dc3ceb72109ecec83c2aef0db37a27f6382
+F test/eqp.test bfe979eb1f4b8ab7a3bd7db6d16c2e6c6be0e5a3aada2227716f3fd3a9d76b69
F test/errmsg.test eae9f091eb39ce7e20305de45d8e5d115b68fa856fba4ea6757b6ca3705ff7f9
F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
F test/exclusive.test 7ff63be7503990921838d5c9f77f6e33e68e48ed1a9d48cd28745bf650bf0747
F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
-F test/exists2.test 3e5726d6a67ebd4bd3466db58be424c09156c1f276c7594abb260cbf6ad494d3
-F test/existsfault.test 74f7edc713f5a335e7ff47adf503067bf05c6f8630f88b2a19c24f0fa5486ab8
+F test/exists2.test fe260729c01a386b8df0999621ecd2cc16a28bb870979b3f84922be11978f0f2
+F test/existsfault.test 72a0036c1424d9204d49f4d976c3277a1b8bb2eed3c67aa124ba2df2f1331c7c
F test/expr.test 26cd01e8485bc48c8aa6a1add598e9ce1e706b4eb4f3f554e0b0223022e8c2cf
F test/expr2.test c27327ae9c017a7ff6280123f67aff496f912da74d78c888926d68b46ec75fd8
F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
@@ -961,7 +961,7 @@ F test/fts3an.test a49ccadc07a2f7d646ec1b81bc09da2d85a85b18
F test/fts3ao.test 266989148fec6d9f1bb6c5382f7aa3dcea0e9cd444576e28dd2b9287ac7dd220
F test/fts3atoken.test dc2078ce464914efe3a8dfc545dd034a0fc14f2ab425c240471d5a5f1c721400
F test/fts3auto.test 649aa4c198d7acc5cd6355e19ee073d051c40d9e88a43fc3d88af46bdf3e99d5
-F test/fts3aux1.test 7a170e172afdbceb67f5baa05941fd4fbf56af42f61daa3d140f4b4bf4cb68f6
+F test/fts3aux1.test 1880eaa75c586cd10f53080479a2b819b3915ae7ce55c4e0ba8f1fe05ac0a6a7
F test/fts3aux2.test 2459e7fa3e22734aed237d1e2ae192f5541c4d8b218956ad2d90754977bf907f
F test/fts3b.test c15c4a9d04e210d0be67e54ce6a87b927168fbf9c1e3faec8c1a732c366fd491
F test/fts3c.test fc723a9cf10b397fdfc2b32e73c53c8b1ec02958
@@ -972,7 +972,7 @@ F test/fts3corrupt2.test e318f0676e5e78d5a4b702637e2bb25265954c08a1b1e4aaf93c788
F test/fts3corrupt3.test 0d5b69a0998b4adf868cc301fc78f3d0707745f1d984ce044c205cdb764b491f
F test/fts3corrupt4.test b71512ec391d39da96d60d01959e4e9f20d4237a964a94abcf5f5a2ad28378c1
F test/fts3corrupt5.test 0549f85ec4bd22e992f645f13c59b99d652f2f5e643dac75568bfd23a6db7ed5
-F test/fts3corrupt6.test d5896a8d389bd824457772dc1e2d2023cd5c5cf8e42733607b5d632103018d8b
+F test/fts3corrupt6.test d274f139ec173392002c768631f404fefc007ae02ffa1b03d8cbd096c3fc00f9
F test/fts3cov.test 7eacdbefd756cfa4dc2241974e3db2834e9b372ca215880e00032222f32194cf
F test/fts3d.test 2bd8c97bcb9975f2334147173b4872505b6a41359a4f9068960a36afe07a679f
F test/fts3defer.test f4c20e4c7153d20a98ee49ee5f3faef624fefc9a067f8d8d629db380c4d9f1de
@@ -989,7 +989,7 @@ F test/fts3fault.test 798e45af84be7978ca33d5bdc94246eb44724db24174b5d8e9b1ac46c5
F test/fts3fault2.test 6a17a11d8034b1c4eca9f3091649273d56c49ff049e2173df8060f94341e9da0
F test/fts3first.test dbdedd20914c8d539aa3206c9b34a23775644641
F test/fts3fuzz001.test e3c7b0ce9b04cc02281dcc96812a277f02df03cd7dc082055d87e11eb18aaf56
-F test/fts3join.test 949b4f5ae3ae9cc2423cb865d711e32476bdb205ab2be923fdf48246e4a44166
+F test/fts3join.test b285c919559af5b093c51abb2c07ce7ec0156dbc9573f444b78dabd9f3040db2
F test/fts3malloc.test b0e4c133b8d61d4f6d112d8110f8320e9e453ef6
F test/fts3matchinfo.test aa66cc50615578b30f6df9984819ae5b702511cf8a94251ec7c594096a703a4a
F test/fts3matchinfo2.test 00144e841704b8debfcdf6097969cd9f2a1cf759e2203cda42583648f2e6bf58
@@ -998,12 +998,12 @@ F test/fts3near.test 7e3354d46f155a822b59c0e957fd2a70c1d7e905
F test/fts3offsets.test b85fd382abdc78ebce721d8117bd552dfb75094c
F test/fts3prefix.test fa794eaab0bdae466494947b0b153d7844478ab2
F test/fts3prefix2.test e1f0a822ca661dced7f12ce392e14eaf65609dce
-F test/fts3query.test ca033ff2ebcc22c69d89032fb0bc1850997d31e7e60ecd26440796ba1654e78f
+F test/fts3query.test 45806a302921b245a9dba5d85c9d51fb98b3f137eea6e6bf6eae4883e041ab72
F test/fts3rank.test cd99bc83a3c923c8d52afd90d86979cf05fc41849f892faeac3988055ef37b99
F test/fts3rnd.test 1320d8826a845e38a96e769562bf83d7a92a15d0
F test/fts3shared.test 57e26a801f21027b7530da77db54286a6fe4997e
F test/fts3snippet.test 0887196d67cffbe365edde535b95ecc642a532ce8551ccd9a73aab5999c3ffae
-F test/fts3snippet2.test 2dabb5889eda4c9980aad325e688b470781f97ce7c0fca0db125616fae0a2cdd
+F test/fts3snippet2.test e79afeb1f673713f96d7fc5655726081975399d11e659d15553207be43301dc4
F test/fts3sort.test ed34c716a11cc2009a35210e84ad5f9c102362ca
F test/fts3tok1.test a663f4cac22a9505400bc22aacb818d7055240409c28729669ea7d4cc2120d15
F test/fts3tok_err.test 52273cd193b9036282f7bacb43da78c6be87418d
@@ -1030,7 +1030,7 @@ F test/fts4record.test a48508f69a84c9287c8019d3a1ae712f5730d8335ffaf8e2101e691d0
F test/fts4rename.test 2e0565ffd92b2c51f1a757df0b8f2ca30537197106fec09e943919801d173692
F test/fts4umlaut.test fcaca4471de7e78c9d1f7e8976e3e8704d7d8ad979d57a739d00f3f757380429
F test/fts4unicode.test 82a9c16b68ba2f358a856226bb2ee02f81583797bc4744061c54401bf1a0f4c9
-F test/fts4upfrom.test 8df5acb6e10ad73f393d1add082b042ab1db72567888847d098152121e507b34
+F test/fts4upfrom.test f25835162c989dffd5e2ef91ec24c4848cc9973093e2d492d1c7b32afac1b49d
F test/full.test 6b3c8fb43c6beab6b95438c1675374b95fab245d
F test/func.test f673822636fb8ed618dd2b80230d16e495d19c8f2e2e7d6c22e93e2b3de097ad
F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
@@ -1046,7 +1046,7 @@ F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
F test/fuzz_common.tcl b7197de6ed1ee8250a4f82d67876f4561b42ee8cbbfc6160dcb66331bad3f830
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
-F test/fuzzcheck.c 8f83829e6c4da26abf6aded7fe9f04e56d46a418c8d7b8b67e14cf6f2ee0a25c
+F test/fuzzcheck.c 772110a59c6f839f95e49a9fd3e5f855bd9cbb90e9d366a6ccd15cb3616fc631
F test/fuzzdata1.db d36e88741b4f23bcbaaf55b006290669d03c6c891cf13c7b3a53bc1b097b693f
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
@@ -1064,7 +1064,7 @@ F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98
F test/having.test a89236dd8d55aa50c4805f82ac9daf64d477a44d712d8209c118978d0ca21ec9
F test/hexlit.test 4a6a5f46e3c65c4bf1fa06f5dd5a9507a5627751
F test/hidden.test 23c1393a79e846d68fd902d72c85d5e5dcf98711
-F test/hook.test fa54fa8afc842ae375f10c1f9fc0014fa59789052fc30c9eae19811fa3afa009
+F test/hook.test 55b6d605d06dadbb04416eae8ad79889aea3521d119c87f04353c25f9c1450a4
F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
F test/icu.test 716a6b89fbabe5cc63e0cd4c260befb08fd7b9d761f04d43669233292f0753b1
F test/ieee754.test b0945d12be7d255f3dfa18e2511b17ca37e0edd2b803231c52d05b86c04ab26e
@@ -1072,7 +1072,7 @@ F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
F test/in.test 688ed2011d922d83141a45af431601738674a4c0bdde34b6351f688b82a169b3
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
-F test/in4.test 64ac9c767ac5af562f066a40163d4202f8fa3be05d264ec65d6258e74606b30c
+F test/in4.test cd08375ba470b248c3dc4ab30fd5dbcb682deafe3862d8249ba0ad6a11dd25ea
F test/in5.test b32ce7f4a93f44c5dee94af16886d922cc16ebe33c8e1765c73d4049d0f4b40f
F test/in6.test 8562d0945195cab3cc4ab3794e9118e72cb44c43f785c2b04d48a9d06ca6b4ec
F test/incrblob.test c9b96afc292aeff43d6687bcb09b0280aa599822
@@ -1091,13 +1091,13 @@ F test/index2.test f835d5e13ca163bd78c4459ca15fd2e4ed487407
F test/index3.test 51685f39345462b84fcf77eb8537af847fdf438cc96b05c45d6aaca4e473ade0
F test/index4.test ab92e736d5946840236cd61ac3191f91a7856bf6
F test/index5.test 8621491915800ec274609e42e02a97d67e9b13e7
-F test/index6.test f172653b35b20233e59200e8b92a76db61bf7285437bf777b93b306ba26a47e7
-F test/index7.test b8a0ba2110fd517bb48c4e76d26d60f1ab2ed9e257b18d71f820d7e71e9f8570
-F test/index8.test bc2e3db70e8e62459aaa1bd7e4a9b39664f8f9d7
+F test/index6.test 880858a65d8686120fe9a8971a4d82b429cc206fe7fd525b8b2b55451c74d82d
+F test/index7.test b238344318e0b4e42126717f6554f0e7dfd0b39cecad4b736039b43e1e3b6eb3
+F test/index8.test caa097735c91dbc23d8a402f5e63a2a03c83840ba3928733ed7f9a03f8a912a3
F test/index9.test 0aa3e509dddf81f93380396e40e9bb386904c1054924ba8fa9bcdfe85a8e7721
-F test/indexedby.test a3ca11f0819a9279619099f36b624bcaa315f7a1ed65c3ed2219c2a944683d2c
-F test/indexexpr1.test 284e119999d132cc8bf37735a928c9859b28e8e295d02b7a6a4f93977c7f9ba5
-F test/indexexpr2.test dba11dbb0a58fcba4cd694f46b4004976123b81b0501f525d43c9be59f0207b1
+F test/indexedby.test f21eca4f7a6ffe14c8500a7ad6cd53166666c99e5ccd311842a28bc94a195fe0
+F test/indexexpr1.test 7e0e7a33acb4d9b3524398e6ce90cc05c26603fabbaf3062083a036c8874bc12
+F test/indexexpr2.test 2c7abe3c48f8aaa5a448615ab4d13df3662185d28419c00999670834a3f0b484
F test/indexfault.test 98d78a8ff1f5335628b62f886a1cb7c7dac1ef6d48fa39c51ec871c87dce9811
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
F test/insert.test 4e3f0de67aac3c5be1f4aaedbcea11638f1b5cdc9a3115be14d19aa9db7623c6
@@ -1111,7 +1111,7 @@ F test/instrfault.test 95e28efade652e6d51ae11b377088fe523a581a07ec428009e152a4dd
F test/intarray.test bb976b0b3df0ebb6a2eddfb61768280440e672beba5460ed49679ea984ccf440
F test/interrupt.test 16ea879ec728cb76414c148c5f24afd5d1f91054
F test/interrupt2.test e4408ca770a6feafbadb0801e54a0dcd1a8d108d
-F test/intpkey.test ac71107a49a06492b69b82aafaf225400598d3c8
+F test/intpkey.test aee694afed1a65c86c4e69ad030224b3fc268113d00685234d40079fca16bad3
F test/intreal.test 2a87e85a5949bd55e41ef04c58f5800587c5380bdbc559ff1c79b614b0e6a533
F test/io.test f95bca1783b01ea7761671560d023360d2dfa4cc
F test/ioerr.test 470fcc78e9cd352d162baf782fe301ea807d764241f58a48fc58109c2dfcdb6b
@@ -1122,10 +1122,10 @@ F test/ioerr5.test 2edfa4fb0f896f733071303b42224df8bedd9da4
F test/ioerr6.test a395a6ab144b26a9e3e21059a1ab6a7149cca65b
F test/istrue.test 9619a2d77580f676048aaff7a16a0bcfea2b96c6c660dfaded2e53c873418899
F test/join.test 25da4f53523a4aa17c893134b47fba6aa4799bb33350517b157785878290e238
-F test/join2.test 21fc30e54ab35ed66bf51b89cec18729205497f5cc43c83bc042f96a73721593
+F test/join2.test 9bdc615841b91c97a16d68bad9508aea11fa0c6b34e5689847bcc4dac70e4990
F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
-F test/join5.test 3a96dc62f0b45402d7207e22d1993fe0c2fce1c57644a11439891dd62b990eb7
+F test/join5.test f418fccdfefa41f1659663463aa517431ddcf3e30ccbb80e64173b7d615a03f4
F test/join6.test f809c025fa253f9e150c0e9afd4cef8813257bceeb6f46e04041228c9403cc2c
F test/journal1.test c7b768041b7f494471531e17abc2f4f5ebf9e5096984f43ed17c4eb80ba34497
F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
@@ -1143,9 +1143,9 @@ F test/kvtest.c feb4358fb022da8ebd098c45811f2f6507688bb6c43aa72b3e840df19026317b
F test/lastinsert.test 42e948fd6442f07d60acbd15d33fb86473e0ef63
F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
F test/lemon-test01.y 58b764610fd934e189ffbb0bbfa33d171b9cb06019b55bdc04d090d6767e11d7
-F test/like.test 0b7b4765ca59d95a1f92dfab9e4d810c9fb8280b5edd6332a01340a20db9e0ed
+F test/like.test 35e83182beb4c730d50e0f9aff7613fb5cdf8ca9147a833a77290fa5b8ba9474
F test/like2.test 3b2ee13149ba4a8a60b59756f4e5d345573852da
-F test/like3.test 03d1bdf848483b78d2cfd1db283d75c4ec2e37c8b8eccc006813f3978d78fbbd
+F test/like3.test a76e5938fadbe6d32807284c796bafd869974a961057bc5fc5a28e06de98745c
F test/limit.test 350f5d03c29e7dff9a2cde016f84f8d368d40bcd02fa2b2a52fa10c4bf3cbfaf
F test/limit2.test 9409b033284642a859fafc95f29a5a6a557bd57c1f0d7c3f554bd64ed69df77e
F test/loadext.test faa4f6eed07a5aac35d57fdd7bc07f8fc82464cfd327567c10cf0ba3c86cde04
@@ -1180,7 +1180,7 @@ F test/mallocG.test 0ff91b65c50bdaba680fb75d87fe4ad35bb7934f
F test/mallocH.test 79b65aed612c9b3ed2dcdaa727c85895fd1bfbdb
F test/mallocI.test 6c23a71df077fa5d387be90e7e669c5b368ca38a
F test/mallocJ.test b5d1839da331d96223e5f458856f8ffe1366f62e
-F test/mallocK.test 1f4b5efbf61715ab79b20b38739ff4b3d110ceb53f54e5db6da1f01c083707ab
+F test/mallocK.test 25897506da0098cea09b302ff432b0fb6d8002773c1e0fc9732aa8b444bfd455
F test/mallocL.test fb311ff80afddf3b1a75e52289081f4754d901dc
F test/mallocM.test 78bbe9d3da84a5c679123cdb40d7b2010b18fc46e13897e4f253c6ba6fbff134
F test/malloc_common.tcl aac62499b76be719fac31e7a3e54a7fd53272e7f
@@ -1202,7 +1202,7 @@ F test/misc3.test cf3dda47d5dda3e53fc5804a100d3c82be736c9d
F test/misc4.test 10cd6addb2fa9093df4751a1b92b50440175dd5468a6ec84d0386e78f087db0e
F test/misc5.test c4aeaa0fa28faa08f2485309c38db4719e6cd1364215d5687a5b96d340a3fa58
F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
-F test/misc7.test 7b4c88c1d5ea8c8b9d537d212c08a0343d345fdd5c789598692c1c0e60fbda69
+F test/misc7.test 747f376edb3ffef54248de1f880707b881a4193038e032c650f1cb54b56d8016
F test/misc8.test 8782708f4c8a459591c3e8fe1215bd2048bffb4024b3df249e9b9ed407dc61ed
F test/misuse.test 9e7f78402005e833af71dcab32d048003869eca5abcaccc985d4f8dc1d86bcc7
F test/mjournal.test 28a08d5cb5fb5b5702a46e19176e45e964e0800d1f894677169e79f34030e152
@@ -1226,10 +1226,10 @@ F test/notify1.test 669b2b743618efdc18ca4b02f45423d5d2304abf
F test/notify2.test 2ecabaa1305083856b7c39cf32816b612740c161
F test/notify3.test 10ff25cde502e72a92053a2f215d64bece4ef934
F test/notnull.test a37b663d5bb728d66fc182016613fb8e4a0a4bbf3d75b8876a7527f7d4ed3f18
-F test/notnull2.test 965a893619751255e59c911a8c58504b3174a3788b1458b7c7365b232209711b
-F test/notnullfault.test 6126e31300632070ca6021698393c7fcf61ab4791bc2aa1d6d704242c0fcd4f8
+F test/notnull2.test 9b09c3405f1dfaf8c1725fb16d815407a5ceb4bb5bc7300e7a506348b3e78cd9
+F test/notnullfault.test fc4bb7845582a2b3db376001ef49118393b1b11abe0d24adb03db057ee2b73d5
F test/null.test b7ff206a1c60fe01aa2abd33ef9ea83c93727d993ca8a613de86e925c9f2bc6f
-F test/nulls1.test 82c5bc33148405f21205865abf13c786084438d573a4ac4e87e11b6091cde526
+F test/nulls1.test 7a5e4346ee4285034100b4cd20e6784f16a9d6c927e44ecdf10034086bbee9c9
F test/numcast.test 5d126f7f581432e86a90d1e35cac625164aec4a1
F test/numindex1.test 20a5450d4b056e48cd5db30e659f13347a099823
F test/offset1.test f06b83657bcf26f9ce805e67450e189e282143b2
@@ -1237,7 +1237,7 @@ F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
F test/optfuzz-db01.c 9f2fa80b8f84ebbf1f2e8b13421a4e0477fe300f6686fbd76cac1d2db66e0fdc
F test/optfuzz-db01.txt 21f6bdeadc701cf11528276e2a55c70bfcb846ba42df327f979bd9e7b6ce7041
F test/optfuzz.c 50e330304eb1992e15ddd11f3daaad9bcc0d9aaad09cb2bcc77f9515df2e88b1
-F test/orderby1.test 6bf0ce45cbfb1cf4779dd418ac5e8cf66abfa04de2c1d2edf1e0e85f1520d8f3
+F test/orderby1.test a4bba04b9c60a21e53486fbc173a596b29641a3b3a57a0f26a1cbef1360358e9
F test/orderby2.test bc11009f7cd99d96b1b11e57b199b00633eb5b04
F test/orderby3.test 8619d06a3debdcd80a27c0fdea5c40b468854b99
F test/orderby4.test 4d39bfbaaa3ae64d026ca2ff166353d2edca4ba4
@@ -1296,18 +1296,18 @@ F test/releasetest.tcl fb76d8fcc95ac29d6356cd9e52b726ab9e43a24082897618dfbcb7c2b
F test/releasetest_data.tcl 3d41ddb3f04f474ac9d925485da24ce6576ff0ebc4c7201c8a340bc09846c261
F test/resetdb.test 8062cf10a09d8c048f8de7711e94571c38b38168db0e5877ba7561789e5eeb2b
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
-F test/returning1.test 209b910c132cb2015bb1159f852c7124778004963c09095c42c3d2442110c56c
+F test/returning1.test ed4baff6a22d8fb0052dcace0181395fbd67d4629cb0ee194175a1cfd097f24d
F test/rollback.test 06680159bc6746d0f26276e339e3ae2f951c64812468308838e0a3362d911eaa
-F test/rollback2.test bc868d57899dc6972e2b4483faae0e03365a0556941474eec487ae21d8d38bb6
+F test/rollback2.test 3f3a4e20401825017df7e7671e9f31b6de5fae5620c2b9b49917f52f8c160a8f
F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
F test/round1.test 768018b04522ca420b1aba8a24bd76091d269f3bce3902af3ec6ebcee41ab21e
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
F test/rowid.test bfbd7b97d9267660be3c8f28507c4ed7f205196b8877c0db42df347c2e8845e3
-F test/rowvalue.test b5436c767394a3f8fa5e7e474b2114ba430fdab34a5c8573c1b6256756534565
+F test/rowvalue.test 466efbb7bb93ca9f95d89f69c7c140aa52cc57ac6dfa7efba09ea4a9ab3cd9f0
F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
F test/rowvalue3.test 3068f508753af69884b12125995f023da0dbb256
-F test/rowvalue4.test 02e35f7762371c2f57ebd856aa056eac56cb27ef7715a0bb31eac1895a745356
+F test/rowvalue4.test 441e7e366ac6d939a3a95a574031c56ec2a854077a91d66eee5ff1d86cb5be58
F test/rowvalue5.test c81c7d8cf36711ab37675ad7376084ae2a359cb6
F test/rowvalue6.test d19b54feb604d5601f8614b15e214e0774c01087
F test/rowvalue7.test c1cbdbf407029db01f87764097c6ac02a1c5a37efd2776eff32a9cdfdf6f2dba
@@ -1324,7 +1324,7 @@ F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
F test/savepoint6.test f41279c5e137139fa5c21485773332c7adb98cd7
F test/savepoint7.test cde525ea3075283eb950cdcdefe23ead4f700daa
F test/savepointfault.test f044eac64b59f09746c7020ee261734de82bf9b2
-F test/scanstatus.test 874e35011779b07725a47dbf1dd6282b0ca04af7e028fb0b534ee544b571be42
+F test/scanstatus.test 9a0ed37ab6d57b50567282788fffdf832d9b16739ecc41bff9d77a8d767cf317
F test/schema.test 5dd11c96ba64744de955315d2e4f8992e447533690153b93377dffb2a5ef5431
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
@@ -1342,11 +1342,11 @@ F test/select5.test df9ec0d218cedceb4fe7b63262025b547b50a55e59148c6f40b60ca25f1d
F test/select6.test 319d45e414cdd321bf17cfacedaf19e3935ad64dac357c53f1492338c6e9b801
F test/select7.test f659f231489349e8c5734e610803d7654207318f
F test/select8.test 8c8f5ae43894c891efc5755ed905467d1d67ad5d
-F test/select9.test aebc2bb0c3bc44606125033cbcaac2c8d1f33a95
-F test/selectA.test 68de52409e45a3313d00b8461b48bef4fb729faf36ade9067a994eae55cc86f4
+F test/select9.test f7586b207ce2304ab80dc93d3146469a28fd4403621dd3a82d06644563d3c812
+F test/selectA.test 5a9ef0f36c0f2666eb5e998073a98fce90c2fd0aa63a79c462c80036e9e0926d
F test/selectB.test 954e4e49cf1f896d61794e440669e03a27ceea25
F test/selectC.test fec14c9015ed4ec941508bbc144f30b42e40ac34a4bb33001450369865dd0b75
-F test/selectD.test fc20452847a01775710090383cfb4423275d2f745fed61f34fbf37573ac0d214
+F test/selectD.test 6d1909b49970bf92f45ce657505befcef5fc7cbc13544e18103a316d32189bfb
F test/selectE.test a8730ca330fcf40ace158f134f4fe0eb00c7edbf
F test/selectF.test 21c94e6438f76537b72532fa9fd4710cdd455fc3
F test/selectG.test 089f7d3d7e6db91566f00b036cb353107a2cca6220eb1cb264085a836dae8840
@@ -1379,11 +1379,11 @@ F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce
F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329
-F test/skipscan1.test ed524bc86f27646b3a297f45d6557b55db338977b6838f8064b196b35848b31b
-F test/skipscan2.test 3eb703ce794f139e7b83567911046298bcde29606116727f9b700ce34f559d2d
+F test/skipscan1.test 1a9972e1dc15ca3887f306d3cd9a29679afb382eca0f3539f3b746f3c2ccaf68
+F test/skipscan2.test c588cb7ed947db724d300f2a0dc537dd2ad292b0f812641d8481bc0b95dd3f49
F test/skipscan3.test ec5bab3f81c7038b43450e7b3062e04a198bdbb5
-F test/skipscan5.test 980875ad45d8aacfe7bdec7c288343520cd1d14e84befdcfe50c785f9e6c8709
-F test/skipscan6.test 0b4cd1b4ac9f84d91454df513c99a4932fa07e8f27b8049bea605068b3e34ac7
+F test/skipscan5.test 0672103fd2c8f96bd114133f356192b35ece45c794fe3677e1d9e5e3104a608e
+F test/skipscan6.test bddbb35dd335e2d21b7791a61e3b2e1f3255dc307ce80aa6fe19cc298e6feb13
F test/snapshot.test a504f2e7009f512ef66c719f0ea1c55a556bdaf1e1312c80a04d46fc1a3e9632
F test/snapshot2.test 8d6ff5dd9cc503f6e12d408a30409c3f9c653507b24408d9cd7195931c89bc54
F test/snapshot3.test 8744313270c55f6e18574283553d3c5c5fe4c5970585663613a0e75c151e599b
@@ -1471,7 +1471,7 @@ F test/tkt-2d1a5c67d.test be1326f3061caec85085f4c9ee4490561ca037c0
F test/tkt-2ea2425d34.test 1cf13e6f75d149b3209a0cb32927a82d3d79fb28
F test/tkt-31338dca7e.test 6fb8807851964da0d24e942f2e19c7c705b9fb58
F test/tkt-313723c356.test 4b306ad45c736cedf2f5221f6155b92143244b6d
-F test/tkt-385a5b56b9.test 5204a7cba0e28c99df0acbf95af5e1af4d32965a7a14de6eccebf949607618b1
+F test/tkt-385a5b56b9.test 81d7c8ef2d2a378323ba2190c1f02f91022fdff0d8d0b84c04954d02c85ef374
F test/tkt-38cb5df375.test f3cc8671f1eb604d4ae9cf886ed4366bec656678
F test/tkt-3998683a16.test 6d1d04d551ed1704eb3396ca87bb9ccc8c5c1eb7
F test/tkt-3a77c9714e.test 90e3e8455ee945a4076d4c44062b8845708af24a880355328fe7008f2047c9f0
@@ -1486,7 +1486,7 @@ F test/tkt-5e10420e8d.test 904d1687b3c06d43e5b3555bbcf6802e7c0ffd84
F test/tkt-5ee23731f.test 9db6e1d7209dc0794948b260d6f82b2b1de83a9f
F test/tkt-6bfb98dfc0.test 24780633627b5cfc0635a5500c2389ebfb563336
F test/tkt-752e1646fc.test ea78d88d14fe9866bdd991c634483334639e13bf
-F test/tkt-78e04e52ea.test cb44d0f5e7940223be740a39913a1b9b9b30d7e4a17ed3349141f893bae1b8f2
+F test/tkt-78e04e52ea.test b731f2ab7d1c2482ac5152097da02ef4805a45147ba9498d3cd9da27072f34d1
F test/tkt-7a31705a7e6.test 9e9c057b6a9497c8f7ba7b16871029414ccf6550e7345d9085d6d71c9a56bb6f
F test/tkt-7bbfb7d442.test 7b2cd79c7a17ae6750e75ec1a7846712a69c9d18
F test/tkt-80ba201079.test 105a721e6aad0ae3c5946d7615d1e4d03f6145b8
@@ -1505,7 +1505,7 @@ F test/tkt-a8a0d2996a.test 002e1cde8fc30c39611b52cf981c88200b858765748556822da72
F test/tkt-b1d3a2e531.test 8f7576e41ca179289ee1a8fee28386fd8e4b0550
F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0
F test/tkt-b72787b1.test a95e8cdad0b98af1853ac7f0afd4ab27b77bf5f3
-F test/tkt-b75a9ca6b0.test ade89229d853a67a21bbd5e6e1e787a8f9d21f19908d1b7fca6bf3d4d5aa0767
+F test/tkt-b75a9ca6b0.test dc6a853c242f7d0326564ae32e9e5eb462b5e8d2bc5b01ea3b18fd24f8e5894b
F test/tkt-ba7cbfaedc.test b4c0deccc12aeb55cfdb57935b16b5d67c5a9877
F test/tkt-bd484a090c.test 60460bf946f79a79712b71f202eda501ca99b898
F test/tkt-bdc6bbbb38.test fc38bb09bdd440e3513a1f5f98fc60a075182d7d
@@ -1571,7 +1571,7 @@ F test/tkt3346.test 6f67c3ed7db94dfc5df4f5f0b63809a1f611e01a
F test/tkt3357.test 77c37c6482b526fe89941ce951c22d011f5922ed
F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
-F test/tkt3442.test a1fc47c669e651d16494de3ff349bcb53281456f2ca02c8bc14220b6044bbfe8
+F test/tkt3442.test 6287173de5bb2d43693b1f822426018a209f9df49ce2f454808bac1771852330
F test/tkt3457.test 5651e2cbb94645b677ec663160b9e192b87b7d365aecdfb24e19f749575a6fc2
F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
@@ -1607,14 +1607,14 @@ F test/tkt3992.test f3e7d548ac26f763b47bc0f750da3d03c81071da
F test/tkt3997.test a335fa41ca3985660a139df7b734a26ef53284bd
F test/tkt4018.test 18dbc6617f7a4b90e938d1bd6d26ad18daafaf08
F test/tokenize.test ce430a7aed48fc98301611429595883fdfcab5d7
-F test/tpch01.test 7c4eb8cdd79c568f46d344b3e789c9fdb8a766d112871352704861f3fca32a2a
+F test/tpch01.test 4479008f85f6f8f25f7ab2cb305d665752b4727fa28a8df3d8e0ad46520c62ff
F test/trace.test a659a9862957f4789e37a92b3bf6d2caf5c86b02cdeefc41e850ae53acf6992a
F test/trace2.test f5cb67ad3bc09e0c58e8cca78dfd0b5639259983
F test/trace3.test ae2004df24b585fed9046cc0bae4601762bc6fc4aa321d475f1350bba5047f31
F test/trans.test 45f6f9ab6f66a7b5744f1caac06b558f95da62501916906cf55586a896f9f439
F test/trans2.test 62bd045bfc7a1c14c5ba83ba64d21ade31583f76
F test/trans3.test 91a100e5412b488e22a655fe423a14c26403ab94
-F test/transitive1.test 293300f46916569f08875cdb2fe2134be2c27677
+F test/transitive1.test 239eec5343388983f112c16d666aa89960cd85302b6af6cd8408ce8edb7b3316
F test/trigger1.test d30cd09ae8ac365a088f09daba583cc5c0b8fc7d4e1d70809d0b4be3bf6ae2ab
F test/trigger2.test d15da46f7012832faf3e0c536b47024409d5fb1722d2bb77e29c06d96d704bb1
F test/trigger3.test aa640bb2bbb03edd5ff69c055117ea088f121945
@@ -1631,7 +1631,7 @@ F test/triggerD.test 8e7f3921a92a5797d472732108109e44575fa650
F test/triggerE.test 612969cb57a4ef792059ad6d01af0117e1ae862c283753ffcc9a6428642b22ee
F test/triggerF.test 5d76f0a8c428ff87a4d5ed52da06f6096a2c787a1e21b846111dfac4123de3ad
F test/triggerG.test 2b816093c91ba73c733cfa8aedcc210ad819d72a98b1da30768a3c56505233e9
-F test/triggerupfrom.test d25961fa70a99b6736193da7b49a36d8c1d28d56188f0be6406d4366315cd6e4
+F test/triggerupfrom.test d1f9e56090408115c522bee626cc33a2f3370f627a5e341d832589d72e3aa271
F test/trustschema1.test 4e970aef0bfe0cee139703cc7209d0e0f07725d999b180ba50770f49edef1494
F test/tt3_checkpoint.c 9e75cf7c1c364f52e1c47fd0f14c4340a9db0fe1
F test/tt3_index.c 39eec10a35f57672225be4d182862152896dee4a
@@ -1650,19 +1650,19 @@ F test/unionvtabfault.test e8759f3d14fb938ce9657e2342db34aeac0fb9bc1692b0d1ebb00
F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
F test/unixexcl.test d936ba2b06794018e136418addd59a2354eeae97
-F test/unordered.test ffeea7747d5ba962a8009a20b7e53d68cbae05b063604c68702c5998eb50c981
+F test/unordered.test 0edaf3411d300693bca595897c5201421c6c5ec787990a1dfe2f7f60ae93f1e2
F test/update.test e906ca7cb1dc6f52af1ea243e08f727edfa79f924c2691f2f9e72481f847310d
F test/update2.test 67455bc61fcbcf96923c45b3bc4f87bc72be7d67575ad35f134906148c7b06d3
F test/upfrom1.tcl 8859d9d437f03b44174c4524a7a734a391fd4526fcff65be08285dafc9dc9041
F test/upfrom1.test d18f69f7c691bc791e7f31bf0e354eeff04cf2f44edc32d6b1928bad71697073
-F test/upfrom2.test 6ebd3be8c3fac984e89a177d823686f04605b512fc167392bce6d8ba2ba63325
-F test/upfrom3.test 7dab379d128e8dd7beb2055b295fb113c7ba93e8c2038f5ddb7a4a10f0ebb348
-F test/upfromfault.test 70ecf8eb85559727a487283f69374e3ae39879e994d8a2437c49d7c05ecb70c9
+F test/upfrom2.test f92e47bfc35e9410d3e8716ee626384e89ad026c55fd6148508ca9d707521673
+F test/upfrom3.test 6130f24ebf97f5ea865e5d2a14a2d543fe5428a62e87cc60f62d875e45c1f5f0
+F test/upfromfault.test 3a10075a0043f0c4fad6614b2c371f88a8ba5a4acab68b907438413865d6a8d6
F test/upsert1.test 88f9e258c6a0eeeb85937b08831e8daad440ba41f125af48439e9d33f266fb18
F test/upsert2.test 9c3cdbb1a890227f6504ce4b0e3de68f4cdfa16bb21d8641208a9239896c5a09
F test/upsert3.test 88d7d590a1948a9cb6eac1b54b0642f67a9f35a1fc0f19b200e97d5d39e3179c
F test/upsert4.test 25d2a1da92f149331ae0c51ca6e3eee78189577585eab92de149900d62994fa5
-F test/upsert5.test f49faf5f15b5c3641c6f5d7c7cc531ef5ac997567b2b6bb7bc96f7c88753ca0b
+F test/upsert5.test fff0dcfce73c649204543088d8e5bde01172676063ec9b8f8fc7f195abc386fe
F test/upsertfault.test f21ca47740841fdb4d61acfa7b17646d773e67724fe8c185b71c018db8a94b35
F test/uri.test 3481026f00ade6dfe8adb7acb6e1e47b04369568
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
@@ -1732,34 +1732,34 @@ F test/walprotocol2.test 7d3b6b4bf0b12f8007121b1e6ef714bc99101fb3b48e46371df1db8
F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
F test/walro2.test 0e79dd15cbdb4f482c01ea248373669c732414a726b357d04846a816afafb768
F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
-F test/walsetlk.test 11f7fe792fdce54cf09874dab824e0627f2eedecfb9f7983e325606ec5184e0c
+F test/walsetlk.test 3185bebc90557e0d611442c8d64f7a0cb7b06f8e156eea37a4a7358f722715be
F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
F test/walthread.test 14b20fcfa6ae152f5d8e12f5dc8a8a724b7ef189f5d8ef1e2ceab79f2af51747
F test/walvfs.test bccb3e0d235ef85e276f491d34db32c9ada1ea67be8d9f10aabe7b30319ec656
F test/wapp.tcl b440cd8cf57953d3a49e7ee81e6a18f18efdaf113b69f7d8482b0710a64566ec
F test/wapptest.tcl 899594e25684861d5b0c0880fb012364def50ef8097041b8ddf74be5ba7fa270 x
-F test/where.test e713c0c64e3e6b062235e39a2f7e5508c517df16b63d69fd786e26bc7330b1c6
-F test/where2.test 478d2170637b9211f593120648858593bf2445a1
-F test/where3.test 2341a294e17193a6b1699ea7f192124a5286ca6acfcc3f4b06d16c931fbcda2c
+F test/where.test 4f7a3939e5190845ef42142031a1819070f65e065e6a840a09adc54dccfef01f
+F test/where2.test 03c21a11e7b90e2845fc3c8b4002fc44cc2797fa74c86ee47d70bd7ea4f29ed6
+F test/where3.test 5b4ffc0ac2ea0fe92f02b1244b7531522fe4d7bccf6fa8741d54e82c10e67753
F test/where4.test 4a371bfcc607f41d233701bdec33ac2972908ba8
F test/where5.test fdf66f96d29a064b63eb543e28da4dfdccd81ad2
F test/where6.test 5da5a98cec820d488e82708301b96cb8c18a258b
-F test/where7.test 75722434c486ac9e74718caa6cce234f45ba34c0b6c0f9555b29eb8bb5f6ade1
+F test/where7.test ab41d53ce8f2a6919ea3d5b13cd1153c1375a8e3ddaa129b81781f9033981383
F test/where8.test 461ca40265ed996a6305da99bb024b0e41602bb586acf544c08f95922358e49f
-F test/where9.test 8e3e0ff42cc17156f52361a1c012281550d0d632912fec92d1d6df74db7a8e6d
+F test/where9.test b1942ed1d4c4632ea99e135691371f33803428ee4092a462280338ab3347f916
F test/whereA.test 9d1077b117f1b68d5f739d94f36956c36cf995eb87bb19b77b2e81af020edd20
F test/whereB.test 0def95db3bdec220a731c7e4bec5930327c1d8c5
F test/whereC.test cae295158703cb3fc23bf1a108a9ab730efff0f6
F test/whereD.test c1c335e914e28b122e000e9310f02d2be83e1c9dbca2e29f46bd732703944d1b
-F test/whereE.test b3a055eef928c992b0a33198a7b8dc10eea5ad2f
-F test/whereF.test 3d9412b1199d3e2bed34fcb76b4c48d0bf4df95d27e3f8dd27b6f8b4716d0d89
-F test/whereG.test 77127a4d214bb21da3b5c695cf4106cd9e418c60d9c24471ba55d3772067cd35
+F test/whereE.test 0ac7e61c6225354a980666996539da154991b4325af943a25a9079079c82fb03
+F test/whereF.test 926b65519608e3f2aa28720822b9154fb5c7b13519dd78194f434a511ab3dac5
+F test/whereG.test 0a489c891a74500b3994266342785dc12e675ac55ad74935c7c1b70393edf82c
F test/whereH.test e4b07f7a3c2f5d31195cd33710054c78667573b2
-F test/whereI.test a2874062140ed4aba9ffae76e6190a3df6fc73d1373fdfa8fd632945082a5364
-F test/whereJ.test 88287550f6ee604422403b053455b1ad894eeaa5c35d348532dfa1439286cb9a
-F test/whereK.test f8e3cf26a8513ecc7f514f54df9f0572c046c42b
-F test/whereL.test 1afe47227f093dc0547236491fb37529b7be9724b8575925a321001b80e6a23a
+F test/whereI.test c4bb7e2ca56d49bd8ab5c7bd085b8b83e353922b46904d68aefb3c7468643581
+F test/whereJ.test fc05e374cc9f2dc204148d6c06822c380ad388895fe97a6d335b94a26a08aecf
+F test/whereK.test 0270ab7f04ba5436fb9156d31d642a1c82727f4c4bfe5ba90d435c78cf44684a
+F test/whereL.test 7717caf61ff4b09d05ddd2978701c4cf5661408bd4dce31d38eff482f60f44f3
F test/wherefault.test 1374c3aa198388925246475f84ad4cd5f9528864
F test/wherelfault.test 9012e4ef5259058b771606616bd007af5d154e64cc25fa9fd4170f6411db44e3
F test/wherelimit.test daa0fd9122c5745cc459ec40b8d3c16ce13ce8382b5b847e7cfff4b871260cbf
@@ -1787,20 +1787,20 @@ F test/windowB.test 6e601f8178ba8ba28b2f19e74fe613815084bb4a8d2ad942defc7d42e191
F test/windowerr.tcl f5acd6fbc210d7b5546c0e879d157888455cd4a17a1d3f28f07c1c8a387019e0
F test/windowerr.test a8b752402109c15aa1c5efe1b93ccb0ce1ef84fa964ae1cd6684dd0b3cc1819b
F test/windowfault.test d543d46571b32d19f198cb04b6505747fabf3cc369970daae47074ee793612be
-F test/windowpushd.test 5b9c114e8173c3addacf58a0fcd941437b14649f2033700184479a13f188ad00
-F test/with1.test 780be387f01e290e768bdfd1827280f9e37ba37223eb4736aba386864fac5a94
-F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1ab
-F test/with3.test 85e059bf4c2ef5626411ee59f399b4bb4b4a0f009bcb7db86f254e570ed11831
+F test/windowpushd.test d8895d08870b7226f7693665bd292eb177e62ca06799184957b3ca7dc03067df
+F test/with1.test b231edbf0f7c1d94bc14365cd9f33e197b2f0aa16add927ee121649fce014c15
+F test/with2.test 000fb95f1f29dae868cea0f41505eb5126077d49eb967ff88f9ee46212ad8863
+F test/with3.test ad32d13ad50661e6fa305f62a0717649c348792e7b658bf2644976227a9e0373
F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
F test/with5.test 6248213c41fab36290b5b73aa3f937309dfba337004d9d8434c3fabc8c7d4be8
-F test/with6.test 3001b59179cbdc26a8c67ff8f46944e3141fdece9ab064c49bbf08459b67b207
+F test/with6.test 661d7e416bef6c0a2556b2c9f0c8178a5b15932bed65246abed99723a8d4e7c0
F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
F test/without_rowid1.test e4034c0849ccc2e8bb749c69f15bd69bb9fcf8fe77e8d17ce02369604242fe83
F test/without_rowid2.test af260339f79d13cb220288b67cd287fbcf81ad99
F test/without_rowid3.test 39ab0dd773eaa62e59b17093f875327630f54c4145458f6d2b053d68d4b2f67b
F test/without_rowid4.test 4e08bcbaee0399f35d58b5581881e7a6243d458a
F test/without_rowid5.test 89b1c587bd92a0590e440da33e7666bf4891572a
-F test/without_rowid6.test 8463b20098e9f75a501a9f17dfb42fffc79068eac0b2775fe56ef2281d2df45e
+F test/without_rowid6.test efbd7add62c59bf5ca97bf8da674e734e6a70ef979234e816166824b4d258f68
F test/without_rowid7.test d7c59a93d726b55812d620f8f284e01904a5b85f9ee9eea8f2f68571a5e8c40e
F test/wordcount.c d721a4b6fae93e6e33449700bce1686bc23257c27425bc3ef1599dc912adec66
F test/writecrash.test f1da7f7adfe8d7f09ea79b42e5ca6dcc41102f27f8e334ad71539501ddd910cc
@@ -1876,7 +1876,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
F tool/split-sqlite3c.tcl 3efcd4240b738f6bb2b5af0aea7e1e0ef9bc1c61654f645076cec883030b710c
-F tool/sqldiff.c 4151108387cb56c08906e5ac8d6a353dcfe8fc6014eeded0f0910e2230ea0f5b
+F tool/sqldiff.c 21226ef092ec1e543b237c5d3d2d32d344a60f2437eadfea04f65b348fbd00e4
F tool/sqlite3_analyzer.c.in 7eeaae8b0d7577662acaabbb11107af0659d1b41bc1dfdd4d91422de27127968
F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
@@ -1911,7 +1911,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 6446c0961077396086251670102ea7bf17d54a6b0f0ca56c6af89028a1ff9039
-R b66159d3defa695ee162d96725abba18
-U dan
-Z c919991679b7a45f0f2c00ac17619d54
+P 2eb28afd01f43143a9c0cd6cea68f3095f993952d54ee06b781514a7754490cd 531550056c38589c99c9a97b6afdbf8f34ff8d2131d74e9d42af3506e8045064
+R aab22ac2508293d1e9023d896ea6f587
+T +closed 531550056c38589c99c9a97b6afdbf8f34ff8d2131d74e9d42af3506e8045064
+U drh
+Z 0b217fc8614676d990a942b0e6a0bc1d
diff --git a/manifest.uuid b/manifest.uuid
index 9d40d3ce2..b5fec31c4 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-531550056c38589c99c9a97b6afdbf8f34ff8d2131d74e9d42af3506e8045064 \ No newline at end of file
+0770470488e140fa21cb5097c26d58e21da85544af8b69faced1670bbc6d6089 \ No newline at end of file
diff --git a/src/btree.c b/src/btree.c
index 709445b16..1623e0172 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -2737,19 +2737,23 @@ static void freeTempSpace(BtShared *pBt){
*/
int sqlite3BtreeClose(Btree *p){
BtShared *pBt = p->pBt;
- BtCursor *pCur;
/* Close all cursors opened via this handle. */
assert( sqlite3_mutex_held(p->db->mutex) );
sqlite3BtreeEnter(p);
- pCur = pBt->pCursor;
- while( pCur ){
- BtCursor *pTmp = pCur;
- pCur = pCur->pNext;
- if( pTmp->pBtree==p ){
- sqlite3BtreeCloseCursor(pTmp);
+
+ /* Verify that no other cursors have this Btree open */
+#ifdef SQLITE_DEBUG
+ {
+ BtCursor *pCur = pBt->pCursor;
+ while( pCur ){
+ BtCursor *pTmp = pCur;
+ pCur = pCur->pNext;
+ assert( pTmp->pBtree!=p );
+
}
}
+#endif
/* Rollback any active transaction and free the handle structure.
** The call to sqlite3BtreeRollback() drops any table-locks held by
@@ -4131,7 +4135,7 @@ int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
sqlite3BtreeLeave(p);
return rc;
}
- p->iDataVersion--; /* Compensate for pPager->iDataVersion++; */
+ p->iBDataVersion--; /* Compensate for pPager->iDataVersion++; */
pBt->inTransaction = TRANS_READ;
btreeClearHasContent(pBt);
}
@@ -4541,7 +4545,14 @@ int sqlite3BtreeCloseCursor(BtCursor *pCur){
unlockBtreeIfUnused(pBt);
sqlite3_free(pCur->aOverflow);
sqlite3_free(pCur->pKey);
- sqlite3BtreeLeave(pBtree);
+ if( (pBt->openFlags & BTREE_SINGLE) && pBt->pCursor==0 ){
+ /* Since the BtShared is not sharable, there is no need to
+ ** worry about the missing sqlite3BtreeLeave() call here. */
+ assert( pBtree->sharable==0 );
+ sqlite3BtreeClose(pBtree);
+ }else{
+ sqlite3BtreeLeave(pBtree);
+ }
pCur->pBtree = 0;
}
return SQLITE_OK;
@@ -9654,7 +9665,7 @@ void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
assert( idx>=0 && idx<=15 );
if( idx==BTREE_DATA_VERSION ){
- *pMeta = sqlite3PagerDataVersion(pBt->pPager) + p->iDataVersion;
+ *pMeta = sqlite3PagerDataVersion(pBt->pPager) + p->iBDataVersion;
}else{
*pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
}
diff --git a/src/btreeInt.h b/src/btreeInt.h
index 851b8e6c1..37c07fe93 100644
--- a/src/btreeInt.h
+++ b/src/btreeInt.h
@@ -350,7 +350,7 @@ struct Btree {
u8 hasIncrblobCur; /* True if there are one or more Incrblob cursors */
int wantToLock; /* Number of nested calls to sqlite3BtreeEnter() */
int nBackup; /* Number of backup operations reading this btree */
- u32 iDataVersion; /* Combines with pBt->pPager->iDataVersion */
+ u32 iBDataVersion; /* Combines with pBt->pPager->iDataVersion */
Btree *pNext; /* List of other sharable Btrees from the same db */
Btree *pPrev; /* Back pointer of the same list */
#ifdef SQLITE_DEBUG
diff --git a/src/build.c b/src/build.c
index d60cb7267..b5ec40909 100644
--- a/src/build.c
+++ b/src/build.c
@@ -4149,7 +4149,11 @@ void sqlite3CreateIndex(
/* Clean up before exiting */
exit_create_index:
if( pIndex ) sqlite3FreeIndex(db, pIndex);
- if( pTab ){ /* Ensure all REPLACE indexes are at the end of the list */
+ if( pTab ){
+ /* Ensure all REPLACE indexes on pTab are at the end of the pIndex list.
+ ** The list was already ordered when this routine was entered, so at this
+ ** point at most a single index (the newly added index) will be out of
+ ** order. So we have to reorder at most one index. */
Index **ppFrom = &pTab->pIndex;
Index *pThis;
for(ppFrom=&pTab->pIndex; (pThis = *ppFrom)!=0; ppFrom=&pThis->pNext){
@@ -4163,6 +4167,16 @@ exit_create_index:
}
break;
}
+#ifdef SQLITE_DEBUG
+ /* Verify that all REPLACE indexes really are now at the end
+ ** of the index list. In other words, no other index type ever
+ ** comes after a REPLACE index on the list. */
+ for(pThis = pTab->pIndex; pThis; pThis=pThis->pNext){
+ assert( pThis->onError!=OE_Replace
+ || pThis->pNext==0
+ || pThis->pNext->onError==OE_Replace );
+ }
+#endif
}
sqlite3ExprDelete(db, pPIWhere);
sqlite3ExprListDelete(db, pList);
@@ -4249,7 +4263,7 @@ void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){
pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
if( pIndex==0 ){
if( !ifExists ){
- sqlite3ErrorMsg(pParse, "no such index: %S", pName, 0);
+ sqlite3ErrorMsg(pParse, "no such index: %S", pName->a);
}else{
sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].zDatabase);
}
diff --git a/src/date.c b/src/date.c
index 1db26b1c6..f88f544e3 100644
--- a/src/date.c
+++ b/src/date.c
@@ -881,6 +881,7 @@ static int isDate(
int eType;
memset(p, 0, sizeof(*p));
if( argc==0 ){
+ if( !sqlite3NotPureFunc(context) ) return 1;
return setDateTimeToCurrent(context, p);
}
if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT
diff --git a/src/expr.c b/src/expr.c
index bd12ad9f0..e3d28f4d4 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -1478,6 +1478,7 @@ ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
pNew = sqlite3DbMallocRawNN(db, sqlite3DbMallocSize(db, p));
if( pNew==0 ) return 0;
pNew->nExpr = p->nExpr;
+ pNew->nAlloc = p->nAlloc;
pItem = pNew->a;
pOldItem = p->a;
for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
@@ -1650,41 +1651,64 @@ Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
** NULL is returned. If non-NULL is returned, then it is guaranteed
** that the new entry was successfully appended.
*/
+static const struct ExprList_item zeroItem;
+SQLITE_NOINLINE ExprList *sqlite3ExprListAppendNew(
+ sqlite3 *db, /* Database handle. Used for memory allocation */
+ Expr *pExpr /* Expression to be appended. Might be NULL */
+){
+ struct ExprList_item *pItem;
+ ExprList *pList;
+
+ pList = sqlite3DbMallocRawNN(db, sizeof(ExprList)+sizeof(pList->a[0])*4 );
+ if( pList==0 ){
+ sqlite3ExprDelete(db, pExpr);
+ return 0;
+ }
+ pList->nAlloc = 4;
+ pList->nExpr = 1;
+ pItem = &pList->a[0];
+ *pItem = zeroItem;
+ pItem->pExpr = pExpr;
+ return pList;
+}
+SQLITE_NOINLINE ExprList *sqlite3ExprListAppendGrow(
+ sqlite3 *db, /* Database handle. Used for memory allocation */
+ ExprList *pList, /* List to which to append. Might be NULL */
+ Expr *pExpr /* Expression to be appended. Might be NULL */
+){
+ struct ExprList_item *pItem;
+ ExprList *pNew;
+ pList->nAlloc *= 2;
+ pNew = sqlite3DbRealloc(db, pList,
+ sizeof(*pList)+(pList->nAlloc-1)*sizeof(pList->a[0]));
+ if( pNew==0 ){
+ sqlite3ExprListDelete(db, pList);
+ sqlite3ExprDelete(db, pExpr);
+ return 0;
+ }else{
+ pList = pNew;
+ }
+ pItem = &pList->a[pList->nExpr++];
+ *pItem = zeroItem;
+ pItem->pExpr = pExpr;
+ return pList;
+}
ExprList *sqlite3ExprListAppend(
Parse *pParse, /* Parsing context */
ExprList *pList, /* List to which to append. Might be NULL */
Expr *pExpr /* Expression to be appended. Might be NULL */
){
struct ExprList_item *pItem;
- sqlite3 *db = pParse->db;
- assert( db!=0 );
if( pList==0 ){
- pList = sqlite3DbMallocRawNN(db, sizeof(ExprList) );
- if( pList==0 ){
- goto no_mem;
- }
- pList->nExpr = 0;
- }else if( (pList->nExpr & (pList->nExpr-1))==0 ){
- ExprList *pNew;
- pNew = sqlite3DbRealloc(db, pList,
- sizeof(*pList)+(2*(sqlite3_int64)pList->nExpr-1)*sizeof(pList->a[0]));
- if( pNew==0 ){
- goto no_mem;
- }
- pList = pNew;
+ return sqlite3ExprListAppendNew(pParse->db,pExpr);
+ }
+ if( pList->nAlloc<pList->nExpr+1 ){
+ return sqlite3ExprListAppendGrow(pParse->db,pList,pExpr);
}
pItem = &pList->a[pList->nExpr++];
- assert( offsetof(struct ExprList_item,zEName)==sizeof(pItem->pExpr) );
- assert( offsetof(struct ExprList_item,pExpr)==0 );
- memset(&pItem->zEName,0,sizeof(*pItem)-offsetof(struct ExprList_item,zEName));
+ *pItem = zeroItem;
pItem->pExpr = pExpr;
return pList;
-
-no_mem:
- /* Avoid leaking memory if malloc has failed. */
- sqlite3ExprDelete(db, pExpr);
- sqlite3ExprListDelete(db, pList);
- return 0;
}
/*
diff --git a/src/insert.c b/src/insert.c
index f0b93ae37..2fbfcce4a 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -817,7 +817,7 @@ void sqlite3Insert(
bIdListInOrder = 0;
}else{
sqlite3ErrorMsg(pParse, "table %S has no column named %s",
- pTabList, 0, pColumn->a[i].zName);
+ pTabList->a, pColumn->a[i].zName);
pParse->checkSchema = 1;
goto insert_cleanup;
}
@@ -945,7 +945,7 @@ void sqlite3Insert(
if( nColumn!=(pTab->nCol-nHidden) ){
sqlite3ErrorMsg(pParse,
"table %S has %d columns but %d values were supplied",
- pTabList, 0, pTab->nCol-nHidden, nColumn);
+ pTabList->a, pTab->nCol-nHidden, nColumn);
goto insert_cleanup;
}
}
@@ -1004,7 +1004,9 @@ void sqlite3Insert(
pNx->iDataCur = iDataCur;
pNx->iIdxCur = iIdxCur;
if( pNx->pUpsertTarget ){
- sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx);
+ if( sqlite3UpsertAnalyzeTarget(pParse, pTabList, pNx) ){
+ goto insert_cleanup;
+ }
}
pNx = pNx->pNextUpsert;
}while( pNx!=0 );
@@ -2426,7 +2428,7 @@ static void codeWithoutRowidPreupdate(
Vdbe *v = pParse->pVdbe;
int r = sqlite3GetTempReg(pParse);
assert( !HasRowid(pTab) );
- assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) );
+ assert( 0==(pParse->db->mDbFlags & DBFLAG_Vacuum) || CORRUPT_DB );
sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
sqlite3VdbeAddOp4(v, OP_Insert, iCur, regData, r, (char*)pTab, P4_TABLE);
sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
diff --git a/src/os_unix.c b/src/os_unix.c
index a688ed270..e3cfe35cd 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -6361,7 +6361,8 @@ static int unixBackupDir(const char *z, int *pJ){
int j = *pJ;
int i;
if( j<=0 ) return 0;
- for(i=j-1; ALWAYS(i>0) && z[i-1]!='/'; i--){}
+ for(i=j-1; i>0 && z[i-1]!='/'; i--){}
+ if( i==0 ) return 0;
if( z[i]=='.' && i==j-2 && z[i+1]=='.' ) return 0;
*pJ = i-1;
return 1;
diff --git a/src/printf.c b/src/printf.c
index 9aab863ed..6f3b5681a 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -29,7 +29,7 @@
#define etSQLESCAPE2 10 /* Strings with '\'' doubled and enclosed in '',
NULL pointers replaced by SQL NULL. %Q */
#define etTOKEN 11 /* a pointer to a Token structure */
-#define etSRCLIST 12 /* a pointer to a SrcList */
+#define etSRCITEM 12 /* a pointer to a SrcItem */
#define etPOINTER 13 /* The %p conversion */
#define etSQLESCAPE3 14 /* %w -> Strings with '\"' doubled */
#define etORDINAL 15 /* %r -> 1st, 2nd, 3rd, 4th, etc. English only */
@@ -95,10 +95,16 @@ static const et_info fmtinfo[] = {
/* All the rest are undocumented and are for internal use only */
{ 'T', 0, 0, etTOKEN, 0, 0 },
- { 'S', 0, 0, etSRCLIST, 0, 0 },
+ { 'S', 0, 0, etSRCITEM, 0, 0 },
{ 'r', 10, 1, etORDINAL, 0, 0 },
};
+/* Notes:
+**
+** %S Takes a pointer to SrcItem. Shows name or database.name
+** %!S Like %S but prefer the zName over the zAlias
+*/
+
/* Floating point constants used for rounding */
static const double arRound[] = {
5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05,
@@ -853,21 +859,24 @@ void sqlite3_str_vappendf(
length = width = 0;
break;
}
- case etSRCLIST: {
- SrcList *pSrc;
- int k;
+ case etSRCITEM: {
SrcItem *pItem;
if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
- pSrc = va_arg(ap, SrcList*);
- k = va_arg(ap, int);
- pItem = &pSrc->a[k];
+ pItem = va_arg(ap, SrcItem*);
assert( bArgList==0 );
- assert( k>=0 && k<pSrc->nSrc );
- if( pItem->zDatabase ){
- sqlite3_str_appendall(pAccum, pItem->zDatabase);
- sqlite3_str_append(pAccum, ".", 1);
+ if( pItem->zAlias && !flag_altform2 ){
+ sqlite3_str_appendall(pAccum, pItem->zAlias);
+ }else if( pItem->zName ){
+ if( pItem->zDatabase ){
+ sqlite3_str_appendall(pAccum, pItem->zDatabase);
+ sqlite3_str_append(pAccum, ".", 1);
+ }
+ sqlite3_str_appendall(pAccum, pItem->zName);
+ }else if( pItem->zAlias ){
+ sqlite3_str_appendall(pAccum, pItem->zAlias);
+ }else if( pItem->pSelect ){
+ sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
}
- sqlite3_str_appendall(pAccum, pItem->zName);
length = width = 0;
break;
}
diff --git a/src/select.c b/src/select.c
index beb5c1e3b..cab90eb01 100644
--- a/src/select.c
+++ b/src/select.c
@@ -1986,7 +1986,7 @@ int sqlite3ColumnsFromExprList(
nCol = pEList->nExpr;
aCol = sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);
testcase( aCol==0 );
- if( nCol>32767 ) nCol = 32767;
+ if( NEVER(nCol>32767) ) nCol = 32767;
}else{
nCol = 0;
aCol = 0;
@@ -4039,6 +4039,7 @@ static int flattenSubquery(
if( (p->selFlags & SF_Recursive) ) return 0;
if( pSrc->nSrc>1 ){
+ if( pParse->nSelect>500 ) return 0;
aCsrMap = sqlite3DbMallocZero(db, pParse->nTab*sizeof(int));
}
}
@@ -4115,6 +4116,7 @@ static int flattenSubquery(
if( pNew==0 ){
p->pPrior = pPrior;
}else{
+ pNew->selId = ++pParse->nSelect;
if( aCsrMap && db->mallocFailed==0 ){
renumberCursors(pParse, pNew, iFrom, aCsrMap);
}
@@ -5058,16 +5060,24 @@ static int resolveFromTermToCte(
pSavedWith = pParse->pWith;
pParse->pWith = pWith;
if( pSel->selFlags & SF_Recursive ){
+ int rc;
assert( pRecTerm!=0 );
assert( (pRecTerm->selFlags & SF_Recursive)==0 );
assert( pRecTerm->pNext!=0 );
assert( (pRecTerm->pNext->selFlags & SF_Recursive)!=0 );
assert( pRecTerm->pWith==0 );
pRecTerm->pWith = pSel->pWith;
- sqlite3WalkSelect(pWalker, pRecTerm);
+ rc = sqlite3WalkSelect(pWalker, pRecTerm);
pRecTerm->pWith = 0;
+ if( rc ){
+ pParse->pWith = pSavedWith;
+ return 2;
+ }
}else{
- sqlite3WalkSelect(pWalker, pSel);
+ if( sqlite3WalkSelect(pWalker, pSel) ){
+ pParse->pWith = pSavedWith;
+ return 2;
+ }
}
pParse->pWith = pWith;
@@ -5772,7 +5782,7 @@ static void explainSimpleCount(
){
if( pParse->explain==2 ){
int bCover = (pIdx!=0 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pIdx)));
- sqlite3VdbeExplain(pParse, 0, "SCAN TABLE %s%s%s",
+ sqlite3VdbeExplain(pParse, 0, "SCAN %s%s%s",
pTab->zName,
bCover ? " USING COVERING INDEX " : "",
bCover ? pIdx->zName : ""
@@ -6345,10 +6355,10 @@ int sqlite3Select(
pItem->regReturn = ++pParse->nMem;
sqlite3VdbeAddOp3(v, OP_InitCoroutine, pItem->regReturn, 0, addrTop);
- VdbeComment((v, "%s", pItem->pTab->zName));
+ VdbeComment((v, "%!S", pItem));
pItem->addrFillSub = addrTop;
sqlite3SelectDestInit(&dest, SRT_Coroutine, pItem->regReturn);
- ExplainQueryPlan((pParse, 1, "CO-ROUTINE %u", pSub->selId));
+ ExplainQueryPlan((pParse, 1, "CO-ROUTINE %!S", pItem));
sqlite3Select(pParse, pSub, &dest);
pItem->pTab->nRowLogEst = pSub->nSelectRow;
pItem->fg.viaCoroutine = 1;
@@ -6376,7 +6386,9 @@ int sqlite3Select(
sqlite3VdbeAddOp2(v, OP_OpenDup, pItem->iCursor, pPrior->iCursor);
pSub->nSelectRow = pPrior->pSelect->nSelectRow;
}else{
- /* Generate a subroutine that will materialize the view. */
+ /* Materalize the view. If the view is not correlated, generate a
+ ** subroutine to do the materialization so that subsequent uses of
+ ** the same view can reuse the materialization. */
int topAddr;
int onceAddr = 0;
int retAddr;
@@ -6390,20 +6402,20 @@ int sqlite3Select(
** a trigger, then we only need to compute the value of the subquery
** once. */
onceAddr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);
- VdbeComment((v, "materialize \"%s\"", pItem->pTab->zName));
+ VdbeComment((v, "materialize %!S", pItem));
}else{
- VdbeNoopComment((v, "materialize \"%s\"", pItem->pTab->zName));
+ VdbeNoopComment((v, "materialize %!S", pItem));
}
sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
- ExplainQueryPlan((pParse, 1, "MATERIALIZE %u", pSub->selId));
+ ExplainQueryPlan((pParse, 1, "MATERIALIZE %!S", pItem));
sqlite3Select(pParse, pSub, &dest);
pItem->pTab->nRowLogEst = pSub->nSelectRow;
if( onceAddr ) sqlite3VdbeJumpHere(v, onceAddr);
retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
- VdbeComment((v, "end %s", pItem->pTab->zName));
+ VdbeComment((v, "end %!S", pItem));
sqlite3VdbeChangeP1(v, topAddr, retAddr);
sqlite3ClearTempRegCache(pParse);
- if( pItem->fg.isCte ){
+ if( pItem->fg.isCte && pItem->fg.isCorrelated==0 ){
CteUse *pCteUse = pItem->u2.pCteUse;
pCteUse->addrM9e = pItem->addrFillSub;
pCteUse->regRtn = pItem->regReturn;
diff --git a/src/shell.c.in b/src/shell.c.in
index 980fa6e6f..3e52e256f 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -3063,6 +3063,7 @@ static void exec_prepared_stmt_columnar(
if( rc!=SQLITE_ROW ) return;
nColumn = sqlite3_column_count(pStmt);
nAlloc = nColumn*4;
+ if( nAlloc<=0 ) nAlloc = 1;
azData = sqlite3_malloc64( nAlloc*sizeof(char*) );
if( azData==0 ) shell_out_of_memory();
for(i=0; i<nColumn; i++){
@@ -3102,6 +3103,7 @@ static void exec_prepared_stmt_columnar(
if( n>p->actualWidth[j] ) p->actualWidth[j] = n;
}
if( seenInterrupt ) goto columnar_end;
+ if( nColumn==0 ) goto columnar_end;
switch( p->cMode ){
case MODE_Column: {
colSep = " ";
@@ -5777,7 +5779,7 @@ static int lintFkeyIndexes(
" || fkey_collate_clause("
" f.[table], COALESCE(f.[to], p.[name]), s.name, f.[from]),' AND ')"
", "
- " 'SEARCH TABLE ' || s.name || ' USING COVERING INDEX*('"
+ " 'SEARCH ' || s.name || ' USING COVERING INDEX*('"
" || group_concat('*=?', ' AND ') || ')'"
", "
" s.name || '(' || group_concat(f.[from], ', ') || ')'"
@@ -5797,7 +5799,7 @@ static int lintFkeyIndexes(
"GROUP BY s.name, f.id "
"ORDER BY (CASE WHEN ? THEN f.[table] ELSE s.name END)"
;
- const char *zGlobIPK = "SEARCH TABLE * USING INTEGER PRIMARY KEY (rowid=?)";
+ const char *zGlobIPK = "SEARCH * USING INTEGER PRIMARY KEY (rowid=?)";
for(i=2; i<nArg; i++){
int n = strlen30(azArg[i]);
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index 0107d74b6..8dd8b1a7c 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -2875,6 +2875,7 @@ struct Expr {
*/
struct ExprList {
int nExpr; /* Number of expressions on the list */
+ int nAlloc; /* Number of a[] slots allocated */
struct ExprList_item { /* For each expression in the list */
Expr *pExpr; /* The parse tree for this expression */
char *zEName; /* Token associated with this expression */
diff --git a/src/tokenize.c b/src/tokenize.c
index 712447c4c..5e01de2b9 100644
--- a/src/tokenize.c
+++ b/src/tokenize.c
@@ -80,7 +80,7 @@ static const unsigned char aiClass[] = {
#ifdef SQLITE_EBCDIC
/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xa xb xc xd xe xf */
/* 0x */ 29, 28, 28, 28, 28, 7, 28, 28, 28, 28, 28, 28, 7, 7, 28, 28,
-/* 1x */ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+/* 1x */ 28, 28, 28, 28, 28, 7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
/* 2x */ 28, 28, 28, 28, 28, 7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
/* 3x */ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
/* 4x */ 7, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 26, 12, 17, 20, 10,
diff --git a/src/treeview.c b/src/treeview.c
index b696d764e..976558698 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -134,19 +134,11 @@ void sqlite3TreeViewSrcList(TreeView *pView, const SrcList *pSrc){
StrAccum x;
char zLine[100];
sqlite3StrAccumInit(&x, 0, zLine, sizeof(zLine), 0);
- sqlite3_str_appendf(&x, "{%d:*}", pItem->iCursor);
- if( pItem->zDatabase ){
- sqlite3_str_appendf(&x, " %s.%s", pItem->zDatabase, pItem->zName);
- }else if( pItem->zName ){
- sqlite3_str_appendf(&x, " %s", pItem->zName);
- }
+ sqlite3_str_appendf(&x, "{%d:*} %!S", pItem->iCursor, pItem);
if( pItem->pTab ){
sqlite3_str_appendf(&x, " tab=%Q nCol=%d ptr=%p used=%llx",
pItem->pTab->zName, pItem->pTab->nCol, pItem->pTab, pItem->colUsed);
}
- if( pItem->zAlias ){
- sqlite3_str_appendf(&x, " (AS %s)", pItem->zAlias);
- }
if( pItem->fg.jointype & JT_LEFT ){
sqlite3_str_appendf(&x, " LEFT-JOIN");
}
diff --git a/src/trigger.c b/src/trigger.c
index 689c7c741..562084561 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -209,12 +209,12 @@ void sqlite3BeginTrigger(
*/
if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
sqlite3ErrorMsg(pParse, "cannot create %s trigger on view: %S",
- (tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName, 0);
+ (tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName->a);
goto trigger_orphan_error;
}
if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
sqlite3ErrorMsg(pParse, "cannot create INSTEAD OF"
- " trigger on table: %S", pTableName, 0);
+ " trigger on table: %S", pTableName->a);
goto trigger_orphan_error;
}
@@ -611,7 +611,7 @@ void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
}
if( !pTrigger ){
if( !noErr ){
- sqlite3ErrorMsg(pParse, "no such trigger: %S", pName, 0);
+ sqlite3ErrorMsg(pParse, "no such trigger: %S", pName->a);
}else{
sqlite3CodeVerifyNamedSchema(pParse, zDb);
}
diff --git a/src/vdbe.c b/src/vdbe.c
index 71f30b754..080c7eaf8 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -272,11 +272,6 @@ static VdbeCursor *allocateCursor(
assert( iCur>=0 && iCur<p->nCursor );
if( p->apCsr[iCur] ){ /*OPTIMIZATION-IF-FALSE*/
- /* Before calling sqlite3VdbeFreeCursor(), ensure the isEphemeral flag
- ** is clear. Otherwise, if this is an ephemeral cursor created by
- ** OP_OpenDup, the cursor will not be closed and will still be part
- ** of a BtShared.pCursor list. */
- if( p->apCsr[iCur]->pBtx==0 ) p->apCsr[iCur]->isEphemeral = 0;
sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
p->apCsr[iCur] = 0;
}
@@ -3873,7 +3868,7 @@ case OP_OpenDup: {
pOrig = p->apCsr[pOp->p2];
assert( pOrig );
- assert( pOrig->pBtx!=0 ); /* Only ephemeral cursors can be duplicated */
+ assert( pOrig->isEphemeral ); /* Only ephemeral cursors can be duplicated */
pCx = allocateCursor(p, pOp->p1, pOrig->nField, -1, CURTYPE_BTREE);
if( pCx==0 ) goto no_mem;
@@ -3883,7 +3878,10 @@ case OP_OpenDup: {
pCx->isTable = pOrig->isTable;
pCx->pgnoRoot = pOrig->pgnoRoot;
pCx->isOrdered = pOrig->isOrdered;
- rc = sqlite3BtreeCursor(pOrig->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
+ pCx->pBtx = pOrig->pBtx;
+ pCx->hasBeenDuped = 1;
+ pOrig->hasBeenDuped = 1;
+ rc = sqlite3BtreeCursor(pCx->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
pCx->pKeyInfo, pCx->uc.pCursor);
/* The sqlite3BtreeCursor() routine can only fail for the first cursor
** opened for a database. Since there is already an open cursor when this
@@ -3949,9 +3947,10 @@ case OP_OpenEphemeral: {
aMem[pOp->p3].z = "";
}
pCx = p->apCsr[pOp->p1];
- if( pCx && ALWAYS(pCx->pBtx) ){
- /* If the ephermeral table is already open, erase all existing content
- ** so that the table is empty again, rather than creating a new table. */
+ if( pCx && !pCx->hasBeenDuped ){
+ /* If the ephermeral table is already open and has no duplicates from
+ ** OP_OpenDup, then erase all existing content so that the table is
+ ** empty again, rather than creating a new table. */
assert( pCx->isEphemeral );
pCx->seqCount = 0;
pCx->cacheStatus = CACHE_STALE;
@@ -3965,33 +3964,36 @@ case OP_OpenEphemeral: {
vfsFlags);
if( rc==SQLITE_OK ){
rc = sqlite3BtreeBeginTrans(pCx->pBtx, 1, 0);
- }
- if( rc==SQLITE_OK ){
- /* If a transient index is required, create it by calling
- ** sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before
- ** opening it. If a transient table is required, just use the
- ** automatically created table with root-page 1 (an BLOB_INTKEY table).
- */
- if( (pCx->pKeyInfo = pKeyInfo = pOp->p4.pKeyInfo)!=0 ){
- assert( pOp->p4type==P4_KEYINFO );
- rc = sqlite3BtreeCreateTable(pCx->pBtx, &pCx->pgnoRoot,
- BTREE_BLOBKEY | pOp->p5);
- if( rc==SQLITE_OK ){
- assert( pCx->pgnoRoot==SCHEMA_ROOT+1 );
- assert( pKeyInfo->db==db );
- assert( pKeyInfo->enc==ENC(db) );
- rc = sqlite3BtreeCursor(pCx->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
- pKeyInfo, pCx->uc.pCursor);
+ if( rc==SQLITE_OK ){
+ /* If a transient index is required, create it by calling
+ ** sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before
+ ** opening it. If a transient table is required, just use the
+ ** automatically created table with root-page 1 (an BLOB_INTKEY table).
+ */
+ if( (pCx->pKeyInfo = pKeyInfo = pOp->p4.pKeyInfo)!=0 ){
+ assert( pOp->p4type==P4_KEYINFO );
+ rc = sqlite3BtreeCreateTable(pCx->pBtx, &pCx->pgnoRoot,
+ BTREE_BLOBKEY | pOp->p5);
+ if( rc==SQLITE_OK ){
+ assert( pCx->pgnoRoot==SCHEMA_ROOT+1 );
+ assert( pKeyInfo->db==db );
+ assert( pKeyInfo->enc==ENC(db) );
+ rc = sqlite3BtreeCursor(pCx->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
+ pKeyInfo, pCx->uc.pCursor);
+ }
+ pCx->isTable = 0;
+ }else{
+ pCx->pgnoRoot = SCHEMA_ROOT;
+ rc = sqlite3BtreeCursor(pCx->pBtx, SCHEMA_ROOT, BTREE_WRCSR,
+ 0, pCx->uc.pCursor);
+ pCx->isTable = 1;
}
- pCx->isTable = 0;
- }else{
- pCx->pgnoRoot = SCHEMA_ROOT;
- rc = sqlite3BtreeCursor(pCx->pBtx, SCHEMA_ROOT, BTREE_WRCSR,
- 0, pCx->uc.pCursor);
- pCx->isTable = 1;
+ }
+ pCx->isOrdered = (pOp->p5!=BTREE_UNORDERED);
+ if( rc ){
+ sqlite3BtreeClose(pCx->pBtx);
}
}
- pCx->isOrdered = (pOp->p5!=BTREE_UNORDERED);
}
if( rc ) goto abort_due_to_error;
pCx->nullRow = 1;
@@ -4425,13 +4427,13 @@ seek_not_found:
**
** There are three possible outcomes from this opcode:<ol>
**
-** <li> If after This.P1 steps, the cursor is still point to a place that
-** is earlier in the btree than the target row,
-** then fall through into the subsquence OP_SeekGE opcode.
+** <li> If after This.P1 steps, the cursor is still pointing to a place that
+** is earlier in the btree than the target row, then fall through
+** into the subsquence OP_SeekGE opcode.
**
** <li> If the cursor is successfully moved to the target row by 0 or more
** sqlite3BtreeNext() calls, then jump to This.P2, which will land just
-** past the OP_IdxGT opcode that follows the OP_SeekGE.
+** past the OP_IdxGT or OP_IdxGE opcode that follows the OP_SeekGE.
**
** <li> If the cursor ends up past the target row (indicating the the target
** row does not exist in the btree) then jump to SeekOP.P2.
@@ -4448,7 +4450,8 @@ case OP_SeekScan: {
/* pOp->p2 points to the first instruction past the OP_IdxGT that
** follows the OP_SeekGE. */
assert( pOp->p2>=(int)(pOp-aOp)+2 );
- assert( aOp[pOp->p2-1].opcode==OP_IdxGT );
+ assert( aOp[pOp->p2-1].opcode==OP_IdxGT || aOp[pOp->p2-1].opcode==OP_IdxGE );
+ testcase( aOp[pOp->p2-1].opcode==OP_IdxGE );
assert( pOp[1].p1==aOp[pOp->p2-1].p1 );
assert( pOp[1].p2==aOp[pOp->p2-1].p2 );
assert( pOp[1].p3==aOp[pOp->p2-1].p3 );
@@ -5983,6 +5986,8 @@ case OP_IdxRowid: { /* out2 */
pTabCur->deferredMoveto = 1;
assert( pOp->p4type==P4_INTARRAY || pOp->p4.ai==0 );
pTabCur->aAltMap = pOp->p4.ai;
+ assert( !pC->isEphemeral );
+ assert( !pTabCur->isEphemeral );
pTabCur->pAltCursor = pC;
}else{
pOut = out2Prerelease(p, pOp);
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 4f8a2edf3..cb423f20a 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -86,6 +86,7 @@ struct VdbeCursor {
Bool isEphemeral:1; /* True for an ephemeral table */
Bool useRandomRowid:1; /* Generate new record numbers semi-randomly */
Bool isOrdered:1; /* True if the table is not BTREE_UNORDERED */
+ Bool hasBeenDuped:1; /* This cursor was source or target of OP_OpenDup */
u16 seekHit; /* See the OP_SeekHit and OP_IfNoHope opcodes */
Btree *pBtx; /* Separate file holding temporary table */
i64 seqCount; /* Sequence counter */
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index ede652dfa..38315e9f4 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -2472,20 +2472,15 @@ void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
return;
}
assert( pCx->pBtx==0 || pCx->eCurType==CURTYPE_BTREE );
+ assert( pCx->pBtx==0 || pCx->isEphemeral );
switch( pCx->eCurType ){
case CURTYPE_SORTER: {
sqlite3VdbeSorterClose(p->db, pCx);
break;
}
case CURTYPE_BTREE: {
- if( pCx->isEphemeral ){
- if( pCx->pBtx ) sqlite3BtreeClose(pCx->pBtx);
- /* The pCx->pCursor will be close automatically, if it exists, by
- ** the call above. */
- }else{
- assert( pCx->uc.pCursor!=0 );
- sqlite3BtreeCloseCursor(pCx->uc.pCursor);
- }
+ assert( pCx->uc.pCursor!=0 );
+ sqlite3BtreeCloseCursor(pCx->uc.pCursor);
break;
}
#ifndef SQLITE_OMIT_VIRTUALTABLE
@@ -3569,6 +3564,7 @@ int sqlite3VdbeCursorMoveto(VdbeCursor **pp, u32 *piCol){
assert( p->eCurType==CURTYPE_BTREE || p->eCurType==CURTYPE_PSEUDO );
if( p->deferredMoveto ){
u32 iMap;
+ assert( !p->isEphemeral );
if( p->aAltMap && (iMap = p->aAltMap[1+*piCol])>0 && !p->nullRow ){
*pp = p->pAltCursor;
*piCol = iMap - 1;
diff --git a/src/wherecode.c b/src/wherecode.c
index a7a76fb70..771a50fc7 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -148,16 +148,8 @@ int sqlite3WhereExplainOneScan(
|| (wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX));
sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
- sqlite3_str_appendall(&str, isSearch ? "SEARCH" : "SCAN");
- if( pItem->pSelect ){
- sqlite3_str_appendf(&str, " SUBQUERY %u", pItem->pSelect->selId);
- }else{
- sqlite3_str_appendf(&str, " TABLE %s", pItem->zName);
- }
-
- if( pItem->zAlias ){
- sqlite3_str_appendf(&str, " AS %s", pItem->zAlias);
- }
+ str.printfFlags = SQLITE_PRINTF_INTERNAL;
+ sqlite3_str_appendf(&str, "%s %S", isSearch ? "SEARCH" : "SCAN", pItem);
if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
const char *zFmt = 0;
Index *pIdx;
diff --git a/test/altermalloc3.test b/test/altermalloc3.test
index c9011e802..5e4e75149 100644
--- a/test/altermalloc3.test
+++ b/test/altermalloc3.test
@@ -45,4 +45,3 @@ do_faultsim_test 1 -prep {
finish_test
-
diff --git a/test/altertab.test b/test/altertab.test
index 0ed8fe596..f29458cb7 100644
--- a/test/altertab.test
+++ b/test/altertab.test
@@ -738,4 +738,3 @@ do_catchsql_test 24.2.1 {
finish_test
-
diff --git a/test/analyze3.test b/test/analyze3.test
index 1f4a2722b..7469c537c 100644
--- a/test/analyze3.test
+++ b/test/analyze3.test
@@ -124,10 +124,10 @@ do_execsql_test analyze3-1.1.x {
#
do_eqp_test analyze3-1.1.2 {
SELECT sum(y) FROM t1 WHERE x>200 AND x<300
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
do_eqp_test analyze3-1.1.3 {
SELECT sum(y) FROM t1 WHERE x>0 AND x<1100
-} {SCAN TABLE t1}
+} {SCAN t1}
# 2017-06-26: Verify that the SQLITE_DBCONFIG_ENABLE_QPSG setting disables
# the use of bound parameters by STAT4
@@ -137,27 +137,27 @@ unset -nocomplain l
unset -nocomplain u
do_eqp_test analyze3-1.1.3.100 {
SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
set l 200
set u 300
do_eqp_test analyze3-1.1.3.101 {
SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
set l 0
set u 1100
do_eqp_test analyze3-1.1.3.102 {
SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SCAN TABLE t1}
+} {SCAN t1}
db cache flush
sqlite3_db_config db ENABLE_QPSG 1
do_eqp_test analyze3-1.1.3.103 {
SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SEARCH TABLE t1 USING INDEX i1 (x>? AND x<?)}
+} {SEARCH t1 USING INDEX i1 (x>? AND x<?)}
db cache flush
sqlite3_db_config db ENABLE_QPSG 0
do_eqp_test analyze3-1.1.3.104 {
SELECT sum(y) FROM t1 WHERE x>$l AND x<$u
-} {SCAN TABLE t1}
+} {SCAN t1}
do_test analyze3-1.1.4 {
sf_execsql { SELECT sum(y) FROM t1 WHERE x>200 AND x<300 }
@@ -207,10 +207,10 @@ do_execsql_test analyze3-2.1.x {
} {200 990}
do_eqp_test analyze3-1.2.2 {
SELECT sum(y) FROM t2 WHERE x>1 AND x<2
-} {SEARCH TABLE t2 USING INDEX i2 (x>? AND x<?)}
+} {SEARCH t2 USING INDEX i2 (x>? AND x<?)}
do_eqp_test analyze3-1.2.3 {
SELECT sum(y) FROM t2 WHERE x>0 AND x<99
-} {SCAN TABLE t2}
+} {SCAN t2}
do_test analyze3-1.2.4 {
sf_execsql { SELECT sum(y) FROM t2 WHERE x>12 AND x<20 }
@@ -259,10 +259,10 @@ do_execsql_test analyze3-1.3.x {
} {99 1000}
do_eqp_test analyze3-1.3.2 {
SELECT sum(y) FROM t3 WHERE x>200 AND x<300
-} {SEARCH TABLE t3 USING INDEX i3 (x>? AND x<?)}
+} {SEARCH t3 USING INDEX i3 (x>? AND x<?)}
do_eqp_test analyze3-1.3.3 {
SELECT sum(y) FROM t3 WHERE x>0 AND x<1100
-} {SCAN TABLE t3}
+} {SCAN t3}
do_test analyze3-1.3.4 {
sf_execsql { SELECT sum(y) FROM t3 WHERE x>200 AND x<300 }
@@ -314,10 +314,10 @@ do_test analyze3-2.1 {
} {}
do_eqp_test analyze3-2.2 {
SELECT count(a) FROM t1 WHERE b LIKE 'a%'
-} {SEARCH TABLE t1 USING INDEX i1 (b>? AND b<?)}
+} {SEARCH t1 USING INDEX i1 (b>? AND b<?)}
do_eqp_test analyze3-2.3 {
SELECT count(a) FROM t1 WHERE b LIKE '%a'
-} {SCAN TABLE t1}
+} {SCAN t1}
# Return the first argument if like_match_blobs is true (the default)
# or the second argument if not
@@ -704,11 +704,11 @@ do_test analyze3-6.1 {
do_eqp_test analyze3-6-3 {
SELECT * FROM t1 WHERE a = 5 AND c = 13;
-} {SEARCH TABLE t1 USING INDEX i2 (c=?)}
+} {SEARCH t1 USING INDEX i2 (c=?)}
do_eqp_test analyze3-6-2 {
SELECT * FROM t1 WHERE a = 5 AND b > 'w' AND c = 13;
-} {SEARCH TABLE t1 USING INDEX i2 (c=?)}
+} {SEARCH t1 USING INDEX i2 (c=?)}
#-----------------------------------------------------------------------------
# 2015-04-20.
diff --git a/test/analyze4.test b/test/analyze4.test
index 9fc98aa8f..e3b0d23f6 100644
--- a/test/analyze4.test
+++ b/test/analyze4.test
@@ -38,7 +38,7 @@ do_test analyze4-1.0 {
# Should choose the t1a index since it is more specific than t1b.
db eval {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=5 AND b IS NULL}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
# Verify that the t1b index shows that it does not narrow down the
# search any at all.
diff --git a/test/analyze6.test b/test/analyze6.test
index b6353f266..807fec132 100644
--- a/test/analyze6.test
+++ b/test/analyze6.test
@@ -61,7 +61,7 @@ do_test analyze6-1.0 {
#
do_test analyze6-1.1 {
eqp {SELECT count(*) FROM ev, cat WHERE x=y}
-} {/*SCAN TABLE cat USING COVERING INDEX catx*SEARCH TABLE ev USING COVERING INDEX evy (y=?)*/}
+} {/*SCAN cat USING COVERING INDEX catx*SEARCH ev USING COVERING INDEX evy (y=?)*/}
# The same plan is chosen regardless of the order of the tables in the
# FROM clause.
@@ -70,8 +70,8 @@ do_eqp_test analyze6-1.2 {
SELECT count(*) FROM cat, ev WHERE x=y
} {
QUERY PLAN
- |--SCAN TABLE cat USING COVERING INDEX catx
- `--SEARCH TABLE ev USING COVERING INDEX evy (y=?)
+ |--SCAN cat USING COVERING INDEX catx
+ `--SEARCH ev USING COVERING INDEX evy (y=?)
}
@@ -86,26 +86,26 @@ do_test analyze6-2.1 {
ANALYZE;
}
eqp {SELECT * FROM t201 WHERE z=5}
-} {/*SEARCH TABLE t201 USING INDEX t201z (z=?)*/}
+} {/*SEARCH t201 USING INDEX t201z (z=?)*/}
do_test analyze6-2.2 {
eqp {SELECT * FROM t201 WHERE y=5}
-} {/*SEARCH TABLE t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
+} {/*SEARCH t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
do_test analyze6-2.3 {
eqp {SELECT * FROM t201 WHERE x=5}
-} {/*SEARCH TABLE t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
+} {/*SEARCH t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
do_test analyze6-2.4 {
execsql {
INSERT INTO t201 VALUES(1,2,3),(2,3,4),(3,4,5);
ANALYZE t201;
}
eqp {SELECT * FROM t201 WHERE z=5}
-} {/*SEARCH TABLE t201 USING INDEX t201z (z=?)*/}
+} {/*SEARCH t201 USING INDEX t201z (z=?)*/}
do_test analyze6-2.5 {
eqp {SELECT * FROM t201 WHERE y=5}
-} {/*SEARCH TABLE t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
+} {/*SEARCH t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
do_test analyze6-2.6 {
eqp {SELECT * FROM t201 WHERE x=5}
-} {/*SEARCH TABLE t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
+} {/*SEARCH t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
do_test analyze6-2.7 {
execsql {
INSERT INTO t201 VALUES(4,5,7);
@@ -115,12 +115,12 @@ do_test analyze6-2.7 {
ANALYZE t201;
}
eqp {SELECT * FROM t201 WHERE z=5}
-} {/*SEARCH TABLE t201 USING INDEX t201z (z=?)*/}
+} {/*SEARCH t201 USING INDEX t201z (z=?)*/}
do_test analyze6-2.8 {
eqp {SELECT * FROM t201 WHERE y=5}
-} {/*SEARCH TABLE t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
+} {/*SEARCH t201 USING INDEX sqlite_autoindex_t201_1 (y=?)*/}
do_test analyze6-2.9 {
eqp {SELECT * FROM t201 WHERE x=5}
-} {/*SEARCH TABLE t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
+} {/*SEARCH t201 USING INTEGER PRIMARY KEY (rowid=?)*/}
finish_test
diff --git a/test/analyze7.test b/test/analyze7.test
index b3dba0256..53a80f641 100644
--- a/test/analyze7.test
+++ b/test/analyze7.test
@@ -37,13 +37,13 @@ do_test analyze7-1.0 {
WHERE value BETWEEN 1 AND 256;
EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;
}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test analyze7-1.1 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
do_test analyze7-1.2 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
# Run an analyze on one of the three indices. Verify that this
# effects the row-count estimate on the one query that uses that
@@ -53,20 +53,20 @@ do_test analyze7-2.0 {
execsql {ANALYZE t1a;}
db cache flush
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test analyze7-2.1 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
do_test analyze7-2.2 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
# Verify that since the query planner now things that t1a is more
# selective than t1b, it prefers to use t1a.
#
do_test analyze7-2.3 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123 AND b=123}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
# Run an analysis on another of the three indices. Verify that this
# new analysis works and does not disrupt the previous analysis.
@@ -75,40 +75,40 @@ do_test analyze7-3.0 {
execsql {ANALYZE t1cd;}
db cache flush;
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test analyze7-3.1 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b=123;}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
do_test analyze7-3.2.1 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=?;}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
ifcapable stat4 {
# If ENABLE_STAT4 is defined, SQLite comes up with a different estimated
# row count for (c=2) than it does for (c=?).
do_test analyze7-3.2.2 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
- } {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+ } {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
} else {
# If ENABLE_STAT4 is not defined, the expected row count for (c=2) is the
# same as that for (c=?).
do_test analyze7-3.2.3 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=2;}
- } {/*SEARCH TABLE t1 USING INDEX t1cd (c=?)*/}
+ } {/*SEARCH t1 USING INDEX t1cd (c=?)*/}
}
do_test analyze7-3.3 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123 AND b=123}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
ifcapable {!stat4} {
do_test analyze7-3.4 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=123 AND b=123}
- } {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+ } {/*SEARCH t1 USING INDEX t1b (b=?)*/}
do_test analyze7-3.5 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=123 AND c=123}
- } {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+ } {/*SEARCH t1 USING INDEX t1a (a=?)*/}
}
do_test analyze7-3.6 {
execsql {EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE c=123 AND d=123 AND b=123}
-} {/*SEARCH TABLE t1 USING INDEX t1cd (c=? AND d=?)*/}
+} {/*SEARCH t1 USING INDEX t1cd (c=? AND d=?)*/}
finish_test
diff --git a/test/analyze8.test b/test/analyze8.test
index 7c61652e5..69605fd6f 100644
--- a/test/analyze8.test
+++ b/test/analyze8.test
@@ -61,25 +61,25 @@ do_test 1.0 {
#
do_test 1.1 {
eqp {SELECT * FROM t1 WHERE a=100 AND b=55}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
do_test 1.2 {
eqp {SELECT * FROM t1 WHERE a=99 AND b=55}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test 1.3 {
eqp {SELECT * FROM t1 WHERE a=101 AND b=55}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test 1.4 {
eqp {SELECT * FROM t1 WHERE a=100 AND b=56}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b=?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b=?)*/}
do_test 1.5 {
eqp {SELECT * FROM t1 WHERE a=99 AND b=56}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test 1.6 {
eqp {SELECT * FROM t1 WHERE a=101 AND b=56}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test 2.1 {
eqp {SELECT * FROM t1 WHERE a=100 AND b BETWEEN 50 AND 54}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b>? AND b<?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b>? AND b<?)*/}
# There are many more values of c between 0 and 100000 than there are
# between 800000 and 900000. So t1c is more selective for the latter
@@ -99,17 +99,17 @@ do_execsql_test 3.0 {
} {50 376 32}
do_test 3.1 {
eqp {SELECT * FROM t1 WHERE b BETWEEN 30 AND 34 AND c BETWEEN 0 AND 100000}
-} {/*SEARCH TABLE t1 USING INDEX t1b (b>? AND b<?)*/}
+} {/*SEARCH t1 USING INDEX t1b (b>? AND b<?)*/}
do_test 3.2 {
eqp {SELECT * FROM t1
WHERE b BETWEEN 30 AND 34 AND c BETWEEN 800000 AND 900000}
-} {/*SEARCH TABLE t1 USING INDEX t1c (c>? AND c<?)*/}
+} {/*SEARCH t1 USING INDEX t1c (c>? AND c<?)*/}
do_test 3.3 {
eqp {SELECT * FROM t1 WHERE a=100 AND c BETWEEN 0 AND 100000}
-} {/*SEARCH TABLE t1 USING INDEX t1a (a=?)*/}
+} {/*SEARCH t1 USING INDEX t1a (a=?)*/}
do_test 3.4 {
eqp {SELECT * FROM t1
WHERE a=100 AND c BETWEEN 800000 AND 900000}
-} {/*SEARCH TABLE t1 USING INDEX t1c (c>? AND c<?)*/}
+} {/*SEARCH t1 USING INDEX t1c (c>? AND c<?)*/}
finish_test
diff --git a/test/analyze9.test b/test/analyze9.test
index 75a02653d..a7f9b5dea 100644
--- a/test/analyze9.test
+++ b/test/analyze9.test
@@ -578,16 +578,16 @@ do_test 13.1 {
} {}
do_eqp_test 13.2.1 {
SELECT * FROM t1 WHERE a='abc' AND rowid<15 AND b<12
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
do_eqp_test 13.2.2 {
SELECT * FROM t1 WHERE a='abc' AND rowid<'15' AND b<12
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
do_eqp_test 13.3.1 {
SELECT * FROM t1 WHERE a='abc' AND rowid<100 AND b<12
-} {/SEARCH TABLE t1 USING INDEX i2/}
+} {/SEARCH t1 USING INDEX i2/}
do_eqp_test 13.3.2 {
SELECT * FROM t1 WHERE a='abc' AND rowid<'100' AND b<12
-} {/SEARCH TABLE t1 USING INDEX i2/}
+} {/SEARCH t1 USING INDEX i2/}
#-------------------------------------------------------------------------
# Check also that affinities are taken into account when using stat4 data
@@ -609,10 +609,10 @@ do_test 14.1 {
} {}
do_eqp_test 13.2.1 {
SELECT * FROM t1 WHERE a='ott' AND b<10 AND c=1
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
do_eqp_test 13.2.2 {
SELECT * FROM t1 WHERE a='ott' AND b<'10' AND c=1
-} {/SEARCH TABLE t1 USING INDEX i1/}
+} {/SEARCH t1 USING INDEX i1/}
#-------------------------------------------------------------------------
# By default, 16 non-periodic samples are collected for the stat4 table.
@@ -1056,11 +1056,11 @@ do_eqp_test 23.1 {
-- Formerly used index i41. But i41 is not a covering index whereas
-- the PRIMARY KEY is a covering index, and so as of 2017-10-15, the
-- PRIMARY KEY is preferred.
-} {SEARCH TABLE t4 USING PRIMARY KEY (c=? AND b=? AND a<?)}
+} {SEARCH t4 USING PRIMARY KEY (c=? AND b=? AND a<?)}
do_eqp_test 23.2 {
SELECT * FROM t4 WHERE
(e=1 AND b='xyz' AND c='zyx' AND a<'JJJ') AND f<300
-} {SEARCH TABLE t4 USING INDEX i42 (f<?)}
+} {SEARCH t4 USING INDEX i42 (f<?)}
do_execsql_test 24.0 {
CREATE TABLE t5(c, d, b, e, a, PRIMARY KEY(a, b, c)) WITHOUT ROWID;
@@ -1106,25 +1106,25 @@ ifcapable stat4&&cte {
# Term (b<?) is estimated at 25%. Better than (a<30) but not as
# good as (a<20).
do_eqp_test 25.2.1 { SELECT * FROM t6 WHERE a<30 AND b<? } \
- {SEARCH TABLE t6 USING INDEX bb (b<?)}
+ {SEARCH t6 USING INDEX bb (b<?)}
do_eqp_test 25.2.2 { SELECT * FROM t6 WHERE a<20 AND b<? } \
- {SEARCH TABLE t6 USING INDEX aa (a<?)}
+ {SEARCH t6 USING INDEX aa (a<?)}
# Term (b BETWEEN ? AND ?) is estimated at 1/64.
do_eqp_test 25.3.1 {
SELECT * FROM t6 WHERE a BETWEEN 5 AND 10 AND b BETWEEN ? AND ?
- } {SEARCH TABLE t6 USING INDEX bb (b>? AND b<?)}
+ } {SEARCH t6 USING INDEX bb (b>? AND b<?)}
# Term (b BETWEEN ? AND 60) is estimated to return roughly 15 rows -
# 60 from (b<=60) multiplied by 0.25 for the b>=? term. Better than
# (a<20) but not as good as (a<10).
do_eqp_test 25.4.1 {
SELECT * FROM t6 WHERE a < 10 AND (b BETWEEN ? AND 60)
- } {SEARCH TABLE t6 USING INDEX aa (a<?)}
+ } {SEARCH t6 USING INDEX aa (a<?)}
do_eqp_test 25.4.2 {
SELECT * FROM t6 WHERE a < 20 AND (b BETWEEN ? AND 60)
- } {SEARCH TABLE t6 USING INDEX bb (b>? AND b<?)}
+ } {SEARCH t6 USING INDEX bb (b>? AND b<?)}
}
#-------------------------------------------------------------------------
@@ -1180,7 +1180,7 @@ do_execsql_test 26.1.3 {
#
do_eqp_test 26.1.4 {
SELECT * FROM t1 WHERE x = 10000 AND y < 50 AND z = 444;
-} {SEARCH TABLE t1 USING INDEX t1z (z=?)}
+} {SEARCH t1 USING INDEX t1z (z=?)}
# This test - 26.2.* - tests that another manifestation of the same problem
@@ -1229,7 +1229,7 @@ do_execsql_test 26.2.1 {
do_eqp_test 26.2.2 {
SELECT * FROM t1 WHERE x='B' AND y>25 AND z=?;
-} {SEARCH TABLE t1 USING INDEX i1 (x=? AND y>?)}
+} {SEARCH t1 USING INDEX i1 (x=? AND y>?)}
finish_test
diff --git a/test/analyzeC.test b/test/analyzeC.test
index 2a0a89781..2f43d57a1 100644
--- a/test/analyzeC.test
+++ b/test/analyzeC.test
@@ -50,7 +50,7 @@ do_execsql_test 1.2 {
do_execsql_test 1.3 {
EXPLAIN QUERY PLAN
SELECT c FROM t1 ORDER BY a;
-} {/.*SCAN TABLE t1 USING INDEX t1a.*/}
+} {/.*SCAN t1 USING INDEX t1a.*/}
do_execsql_test 1.3x {
EXPLAIN QUERY PLAN
SELECT c FROM t1 ORDER BY a;
diff --git a/test/analyzeD.test b/test/analyzeD.test
index 9c7ed7586..7a51785a1 100644
--- a/test/analyzeD.test
+++ b/test/analyzeD.test
@@ -63,7 +63,7 @@ do_test 1.1 {
#
do_eqp_test 1.2 {
SELECT * FROM t1 WHERE a=3001 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_c (c=?)}
+} {SEARCH t1 USING INDEX t1_c (c=?)}
do_test 1.3 {
execsql { DELETE FROM sqlite_stat1 }
@@ -78,7 +78,7 @@ do_test 1.3 {
#
do_eqp_test 1.4 {
SELECT * FROM t1 WHERE a=3001 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_ab (a=?)}
+} {SEARCH t1 USING INDEX t1_ab (a=?)}
do_test 1.5 {
execsql {
@@ -89,7 +89,7 @@ do_test 1.5 {
do_eqp_test 1.6 {
SELECT * FROM t1 WHERE a=13 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_c (c=?)}
+} {SEARCH t1 USING INDEX t1_c (c=?)}
do_test 1.7 {
execsql { DELETE FROM sqlite_stat1 }
@@ -102,6 +102,6 @@ do_test 1.7 {
# gets this right, even without stat1 data.
do_eqp_test 1.8 {
SELECT * FROM t1 WHERE a=13 AND c=150;
-} {SEARCH TABLE t1 USING INDEX t1_c (c=?)}
+} {SEARCH t1 USING INDEX t1_c (c=?)}
finish_test
diff --git a/test/analyzeE.test b/test/analyzeE.test
index 66db1e122..733b79367 100644
--- a/test/analyzeE.test
+++ b/test/analyzeE.test
@@ -36,47 +36,47 @@ do_execsql_test analyzeE-1.0 {
do_execsql_test analyzeE-1.1 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-1.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.3 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.4 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1 AND 500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.5 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.6 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.7 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>2500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.8 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1900
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.9 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1100
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-1.10 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1100
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-1.11 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1900
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
# Verify that everything works the same on a DESCENDING index.
#
@@ -88,47 +88,47 @@ do_execsql_test analyzeE-2.0 {
do_execsql_test analyzeE-2.1 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-2.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.3 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750;
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.4 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1 AND 500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.5 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.6 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.7 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>2500
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.8 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1900
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.9 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1100
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-2.10 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1100
-} {/SEARCH TABLE t1 USING INDEX t1a/}
+} {/SEARCH t1 USING INDEX t1a/}
do_execsql_test analyzeE-2.11 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1900
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
# Now do a range query on the second term of an ASCENDING index
# where the first term is constrained by equality.
@@ -145,47 +145,47 @@ do_execsql_test analyzeE-3.0 {
do_execsql_test analyzeE-3.1 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500 AND c=123;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-3.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.3 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.4 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1 AND 500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.5 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.6 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.7 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>2500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.8 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1900 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.9 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1100 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-3.10 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1100 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-3.11 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1900 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
# Repeat the 3.x tests using a DESCENDING index
#
@@ -197,46 +197,46 @@ do_execsql_test analyzeE-4.0 {
do_execsql_test analyzeE-4.1 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 500 AND 2500 AND c=123;
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-4.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 2900 AND 3000 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.3 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1700 AND 1750 AND c=123;
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.4 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 1 AND 500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.5 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a BETWEEN 3000 AND 3000000 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.6 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.7 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>2500 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.8 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1900 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.9 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a>1100 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
do_execsql_test analyzeE-4.10 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1100 AND c=123
-} {/SEARCH TABLE t1 USING INDEX t1ca/}
+} {/SEARCH t1 USING INDEX t1ca/}
do_execsql_test analyzeE-4.11 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a<1900 AND c=123
-} {/SCAN TABLE t1/}
+} {/SCAN t1/}
finish_test
diff --git a/test/analyzeF.test b/test/analyzeF.test
index 143cecdf5..00107993e 100644
--- a/test/analyzeF.test
+++ b/test/analyzeF.test
@@ -62,7 +62,7 @@ foreach {tn where idx} {
11 "x = nullif('19', 0) AND y = nullif('4', 0)" {t1y (y=?)}
12 "x = nullif('4', 0) AND y = nullif('19', 0)" {t1y (y=?)}
} {
- set res "SEARCH TABLE t1 USING INDEX $idx"
+ set res "SEARCH t1 USING INDEX $idx"
do_eqp_test 1.$tn "SELECT * FROM t1 WHERE $where" $res
}
@@ -92,7 +92,7 @@ foreach {tn where idx} {
3 "x = nondet4() AND y = nondet19()" {t1y (y=?)}
4 "x = nondet19() AND y = nondet4()" {t1y (y=?)}
} {
- set res "SEARCH TABLE t1 USING INDEX $idx"
+ set res "SEARCH t1 USING INDEX $idx"
do_eqp_test 3.$tn "SELECT * FROM t1 WHERE $where" $res
}
diff --git a/test/analyzeG.test b/test/analyzeG.test
index eb1853b1d..ca65bc3b9 100644
--- a/test/analyzeG.test
+++ b/test/analyzeG.test
@@ -20,16 +20,6 @@ ifcapable !stat4 {
}
set testprefix analyzeG
-proc do_scan_order_test {tn sql expect} {
- uplevel [list do_test $tn [subst -nocommands {
- set res ""
- db eval "explain query plan $sql" {
- lappend res [set detail]
- }
- set res
- }] [list {*}$expect]]
-}
-
#-------------------------------------------------------------------------
# Test cases 1.* seek to verify that even if an index is not used, its
# stat4 data may be used by the planner to estimate the number of
@@ -54,15 +44,17 @@ do_execsql_test 1.0 {
# know this, so it has no preference as to which order the tables are
# scanned in. In practice this means that tables are scanned in the order
# they are specified in in the FROM clause.
-do_scan_order_test 1.1.1 {
+do_eqp_test 1.1.1 {
SELECT * FROM t1, t2 WHERE a=44 AND b=44;
} {
- {SCAN TABLE t1} {SCAN TABLE t2}
+
}
-do_scan_order_test 1.1.2 {
+do_eqp_test 1.1.2 {
SELECT * FROM t2, t1 WHERE a=44 AND b=44
} {
- {SCAN TABLE t2} {SCAN TABLE t1}
+ QUERY PLAN
+ |--SCAN t2
+ `--SCAN t1
}
do_execsql_test 1.2 {
@@ -73,15 +65,19 @@ do_execsql_test 1.2 {
# Now, with the ANALYZE data, the planner knows that (b=44) matches a
# large number of rows. So it elects to scan table "t1" first, regardless
# of the order in which the tables are specified in the FROM clause.
-do_scan_order_test 1.3.1 {
+do_eqp_test 1.3.1 {
SELECT * FROM t1, t2 WHERE a=44 AND b=44;
} {
- {SCAN TABLE t1} {SCAN TABLE t2}
+ QUERY PLAN
+ |--SCAN t1
+ `--SCAN t2
}
-do_scan_order_test 1.3.2 {
+do_eqp_test 1.3.2 {
SELECT * FROM t2, t1 WHERE a=44 AND b=44
} {
- {SCAN TABLE t1} {SCAN TABLE t2}
+ QUERY PLAN
+ |--SCAN t1
+ `--SCAN t2
}
diff --git a/test/attach4.test b/test/attach4.test
index 87911814a..9d54e7df5 100644
--- a/test/attach4.test
+++ b/test/attach4.test
@@ -135,4 +135,3 @@ do_execsql_test 2.2 {
}
finish_test
-
diff --git a/test/autoindex1.test b/test/autoindex1.test
index b08f8cfeb..6b437f186 100644
--- a/test/autoindex1.test
+++ b/test/autoindex1.test
@@ -183,18 +183,18 @@ do_eqp_test autoindex1-500.1 {
WHERE t501.a IN (SELECT x FROM t502 WHERE y=?);
} {
QUERY PLAN
- |--SEARCH TABLE t501 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH t501 USING INTEGER PRIMARY KEY (rowid=?)
`--LIST SUBQUERY xxxxxx
- `--SCAN TABLE t502
+ `--SCAN t502
}
do_eqp_test autoindex1-501 {
SELECT b FROM t501
WHERE t501.a IN (SELECT x FROM t502 WHERE y=t501.b);
} {
QUERY PLAN
- |--SCAN TABLE t501
+ |--SCAN t501
`--CORRELATED LIST SUBQUERY xxxxxx
- `--SEARCH TABLE t502 USING AUTOMATIC COVERING INDEX (y=?)
+ `--SEARCH t502 USING AUTOMATIC COVERING INDEX (y=?)
}
do_eqp_test autoindex1-502 {
SELECT b FROM t501
@@ -202,9 +202,9 @@ do_eqp_test autoindex1-502 {
AND t501.a IN (SELECT x FROM t502 WHERE y=t501.b);
} {
QUERY PLAN
- |--SEARCH TABLE t501 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH t501 USING INTEGER PRIMARY KEY (rowid=?)
`--CORRELATED LIST SUBQUERY xxxxxx
- `--SCAN TABLE t502
+ `--SCAN t502
}
# The following code checks a performance regression reported on the
@@ -277,13 +277,13 @@ do_eqp_test autoindex1-600a {
ORDER BY x.registering_flock;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--SCAN TABLE sheep AS s
- | |--SEARCH TABLE flock_owner AS prev USING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date<?)
+ |--MATERIALIZE y
+ | |--SCAN s
+ | |--SEARCH prev USING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date<?)
| `--CORRELATED SCALAR SUBQUERY xxxxxx
- | `--SEARCH TABLE flock_owner AS later USING COVERING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date>? AND owner_change_date<?)
- |--SCAN TABLE sheep AS x USING INDEX sheep_reg_flock_index
- `--SEARCH SUBQUERY xxxxxx AS y USING AUTOMATIC COVERING INDEX (sheep_no=?)
+ | `--SEARCH later USING COVERING INDEX sqlite_autoindex_flock_owner_1 (flock_no=? AND owner_change_date>? AND owner_change_date<?)
+ |--SCAN x USING INDEX sheep_reg_flock_index
+ `--SEARCH y USING AUTOMATIC COVERING INDEX (sheep_no=?)
}
@@ -294,7 +294,7 @@ do_eqp_test autoindex1-700a {
SELECT a FROM t5 WHERE b=10 ORDER BY c;
} {
QUERY PLAN
- |--SCAN TABLE t5
+ |--SCAN t5
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -413,7 +413,7 @@ do_execsql_test autoindex1-800 {
JOIN raw_contacts ON (data.raw_contact_id=raw_contacts._id)
JOIN accounts ON (raw_contacts.account_id=accounts._id)
WHERE mimetype_id=10 AND data14 IS NOT NULL;
-} {/SEARCH TABLE data .*SEARCH TABLE raw_contacts/}
+} {/SEARCH data .*SEARCH raw_contacts/}
do_execsql_test autoindex1-801 {
EXPLAIN QUERY PLAN
SELECT * FROM
@@ -421,7 +421,7 @@ do_execsql_test autoindex1-801 {
JOIN raw_contacts ON (data.raw_contact_id=raw_contacts._id)
JOIN accounts ON (raw_contacts.account_id=accounts._id)
WHERE mimetypes._id=10 AND data14 IS NOT NULL;
-} {/SEARCH TABLE data .*SEARCH TABLE raw_contacts/}
+} {/SEARCH data .*SEARCH raw_contacts/}
# Another test case from an important user of SQLite. The key feature of
# this test is that the "aggindex" subquery should make use of an
diff --git a/test/autoindex3.test b/test/autoindex3.test
index 9dcf2491f..824a82973 100644
--- a/test/autoindex3.test
+++ b/test/autoindex3.test
@@ -74,8 +74,8 @@ do_execsql_test 210 {
# At one point, SQLite was using the inferior plan:
#
-# 0|0|1|SEARCH TABLE v USING INDEX ve (e>?)
-# 0|1|0|SEARCH TABLE u USING COVERING INDEX uab (ANY(a) AND b=?)
+# 0|0|1|SEARCH v USING INDEX ve (e>?)
+# 0|1|0|SEARCH u USING COVERING INDEX uab (ANY(a) AND b=?)
#
# on the basis that the real index "uab" must be better than the automatic
# index. This is not right - a skip-scan is not necessarily better than an
@@ -85,8 +85,8 @@ do_eqp_test 220 {
select count(*) from u, v where u.b = v.b and v.e > 34;
} {
QUERY PLAN
- |--SEARCH TABLE v USING INDEX ve (e>?)
- `--SEARCH TABLE u USING AUTOMATIC COVERING INDEX (b=?)
+ |--SEARCH v USING INDEX ve (e>?)
+ `--SEARCH u USING AUTOMATIC COVERING INDEX (b=?)
}
diff --git a/test/autoindex5.test b/test/autoindex5.test
index 94e220328..6dd553a7b 100644
--- a/test/autoindex5.test
+++ b/test/autoindex5.test
@@ -102,7 +102,7 @@ do_eqp_test autoindex5-1.1 {
AND ( sp.release = 'sid' OR sp.release = 'stretch' OR sp.release = 'jessie'
OR sp.release = 'wheezy' OR sp.release = 'squeeze' )
ORDER BY sp.name, st.bug_name, sp.release, sp.subrelease;
-} {SEARCH SUBQUERY * USING AUTOMATIC COVERING INDEX (bug_name=?)}
+} {SEARCH debian_cve USING AUTOMATIC COVERING INDEX (bug_name=?)}
#-------------------------------------------------------------------------
# Test that ticket [8a2adec1] has been fixed.
diff --git a/test/avfs.test b/test/avfs.test
index b2daa70a2..2ebd608ba 100644
--- a/test/avfs.test
+++ b/test/avfs.test
@@ -20,6 +20,9 @@
# avfs-2.1. Test that the simple text file retains its initial text.
# avfs-3.1. Test that the appendvfs can grow and shrink, remaining intact.
# avfs-3.2. Test that appendvfs is intact after grow/shrink/close/reopen.
+# avfs-3.3. Test that appendvfs can grow by many pages and be written.
+# avfs-3.4. Test that grown appendvfs can be reopened and appear intact.
+# avfs-3.5. Test that much grown appendvfs can shrink and reopen intact.
# avfs-4.1. Test shell's ability to append to a non-appendvfs file.
# avfs-4.2. Test shell's ability to append to empty or nonexistent file.
# avfs-4.3. Test shell's ability to reopen and alter an appendvfs file.
@@ -159,11 +162,12 @@ do_test 2.1 {
} {Appendee intact.}
# Set of repeatable random integers for a couple tests.
+set ::nrint 50000
proc rint {v} {
return [::tcl::mathfunc::int [expr $v * 100000]]
}
array set ::randints [list 0 [rint [::tcl::mathfunc::srand 0]]]
-for {set i 1} {$i < 10000} {incr i} {
+for {set i 1} {$i < $::nrint} {incr i} {
set ::randints($i) [rint [::tcl::mathfunc::rand]]
}
@@ -176,7 +180,7 @@ do_test 3.1 {
CREATE TABLE ri (i INTEGER);
BEGIN;
}
- for {set i 0} {$i < 10000} {incr i} {
+ for {set i 0} {$i < $::nrint} {incr i} {
set r $::randints($i)
set s $::randints([incr i])
set t $::randints([incr i])
@@ -203,11 +207,11 @@ do_test 3.1 {
adb close
set adaSz [file size $::fa]
set adba [expr ($adbSz + 0.1)/$adaSz]
- # lappend results $adbSz $adaSz
+ # lappend results $adba
set results [concat $results [lrange $qr 0 2]]
- lappend results [expr {$adba > 10.0 && $adba < 20.0}]
+ lappend results [expr {$adba > 10.0}]
set ::result [join $results " | "]
-} {ok | 10000 | ok | ok | 1}
+} "ok | $::nrint | ok | ok | 1"
do_test 3.2 {
set results {}
@@ -219,6 +223,60 @@ do_test 3.2 {
set ::result [join $results " | "]
} {ok}
+# avfs-3.3. Test that appendvfs can grow by many pages and be written.
+do_test 3.3 {
+ set results {}
+ sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
+ set npages 300
+ adb eval { BEGIN }
+ while {$npages > 0} {
+ adb eval { INSERT INTO ri VALUES (randomblob(1500)) }
+ incr npages -1
+ }
+ adb eval { COMMIT }
+ adb eval {
+ SELECT integrity_check as ic FROM pragma_integrity_check();
+ } { lappend results $ic }
+ adb close
+ set adaSzr [expr [file size $::fa] / 300.0 / 1500 ]
+ set okSzr [expr $adaSzr > 1.0 && $adaSzr < 1.3 ]
+ lappend results $okSzr
+ set ::result [join $results " | "]
+} {ok | 1}
+
+# avfs-3.4. Test that grown appendvfs can be reopened and appear intact.
+do_test 3.4 {
+ set results {}
+ sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
+ adb eval {
+ SELECT integrity_check as ic FROM pragma_integrity_check();
+ } { lappend results $ic }
+ adb close
+ set ::result $ic
+} {ok}
+
+# avfs-3.5. Test that much grown appendvfs can shrink and reopen intact.
+do_test 3.5 {
+ set results {}
+ set adbsz [file size $::fa]
+ sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
+ adb eval {
+ DELETE FROM ri WHERE rowid % 8 <> 0;
+ SELECT integrity_check as ic FROM pragma_integrity_check();
+ VACUUM;
+ SELECT integrity_check as ic FROM pragma_integrity_check();
+ } { lappend results $ic }
+ adb close
+ set adasz [file size $::fa]
+ lappend results [expr {$adbsz/$adasz > 5}]
+ sqlite3 adb "file:$::fa?mode=rw$::vf" -uri 1
+ adb eval {
+ SELECT integrity_check as ic FROM pragma_integrity_check();
+ } { lappend results $ic }
+ adb close
+ set ::result [join $results " | "]
+} {ok | ok | 1 | ok}
+
set ::cliDoesAr [shellDoesAr]
do_test 4.1 {
@@ -332,6 +390,6 @@ do_test 5.2 {
forcedelete $::fa $::fza
-unset -nocomplain ::fa ::fza ::tlo ::result ::randints ::cliDoesAr
+unset -nocomplain ::fa ::fza ::tlo ::result ::randints ::nrint ::cliDoesAr
finish_test
diff --git a/test/bestindex1.test b/test/bestindex1.test
index b97af1114..0d6946994 100644
--- a/test/bestindex1.test
+++ b/test/bestindex1.test
@@ -51,11 +51,11 @@ do_execsql_test 1.0 {
do_eqp_test 1.1 {
SELECT * FROM x1 WHERE a = 'abc'
-} {SCAN TABLE x1 VIRTUAL TABLE INDEX 555:eq!}
+} {SCAN x1 VIRTUAL TABLE INDEX 555:eq!}
do_eqp_test 1.2 {
SELECT * FROM x1 WHERE a IN ('abc', 'def');
-} {SCAN TABLE x1 VIRTUAL TABLE INDEX 555:eq!}
+} {SCAN x1 VIRTUAL TABLE INDEX 555:eq!}
#-------------------------------------------------------------------------
#
@@ -141,17 +141,17 @@ foreach {tn mode} {
set plan(use) {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
`--USE TEMP B-TREE FOR ORDER BY
}
set plan(omit) {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x WHERE a='%1%'
`--USE TEMP B-TREE FOR ORDER BY
}
set plan(use2) {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:SELECT * FROM t1x
`--USE TEMP B-TREE FOR ORDER BY
}
diff --git a/test/bestindex2.test b/test/bestindex2.test
index c17665f6f..81ed9ebf6 100644
--- a/test/bestindex2.test
+++ b/test/bestindex2.test
@@ -89,40 +89,40 @@ do_execsql_test 1.0 {
do_eqp_test 1.1 {
SELECT * FROM t1 WHERE a='abc'
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
do_eqp_test 1.2 {
SELECT * FROM t1 WHERE a='abc' AND b='def'
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:indexed(a=? AND b=?)}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:indexed(a=? AND b=?)}
do_eqp_test 1.3 {
SELECT * FROM t1 WHERE a='abc' AND a='def'
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:indexed(a=?)}
do_eqp_test 1.4 {
SELECT * FROM t1,t2 WHERE c=a
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
- `--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:
+ `--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
}
do_eqp_test 1.5 {
SELECT * FROM t1, t2 CROSS JOIN t3 WHERE t2.c = +t1.b AND t3.e=t2.d
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
- |--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
- `--SCAN TABLE t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:
+ |--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+ `--SCAN t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
}
do_eqp_test 1.6 {
SELECT * FROM t1, t2, t3 WHERE t2.c = +t1.b AND t3.e = t2.d
} {
QUERY PLAN
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
- |--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
- `--SCAN TABLE t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:
+ |--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+ `--SCAN t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
}
do_execsql_test 1.7.1 {
@@ -133,10 +133,10 @@ do_eqp_test 1.7.2 {
WHERE t1.a = t2.c AND t1.b = t3.e
} {
QUERY PLAN
- |--SCAN TABLE x1
- |--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:
- |--SCAN TABLE t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
- `--SCAN TABLE t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
+ |--SCAN x1
+ |--SCAN t1 VIRTUAL TABLE INDEX 0:
+ |--SCAN t2 VIRTUAL TABLE INDEX 0:indexed(c=?)
+ `--SCAN t3 VIRTUAL TABLE INDEX 0:indexed(e=?)
}
finish_test
diff --git a/test/bestindex3.test b/test/bestindex3.test
index 80038e285..1ee3975f8 100644
--- a/test/bestindex3.test
+++ b/test/bestindex3.test
@@ -79,11 +79,11 @@ do_execsql_test 1.0 {
do_eqp_test 1.1 {
SELECT * FROM t1 WHERE a LIKE 'abc';
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a LIKE ?}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:a LIKE ?}
do_eqp_test 1.2 {
SELECT * FROM t1 WHERE a = 'abc';
-} {SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a EQ ?}
+} {SCAN t1 VIRTUAL TABLE INDEX 0:a EQ ?}
do_eqp_test 1.3 {
SELECT * FROM t1 WHERE a = 'abc' OR b = 'def';
@@ -91,9 +91,9 @@ do_eqp_test 1.3 {
QUERY PLAN
`--MULTI-INDEX OR
|--INDEX 1
- | `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a EQ ?
+ | `--SCAN t1 VIRTUAL TABLE INDEX 0:a EQ ?
`--INDEX 2
- `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:b EQ ?
+ `--SCAN t1 VIRTUAL TABLE INDEX 0:b EQ ?
}
do_eqp_test 1.4 {
@@ -102,9 +102,9 @@ do_eqp_test 1.4 {
QUERY PLAN
`--MULTI-INDEX OR
|--INDEX 1
- | `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:a LIKE ?
+ | `--SCAN t1 VIRTUAL TABLE INDEX 0:a LIKE ?
`--INDEX 2
- `--SCAN TABLE t1 VIRTUAL TABLE INDEX 0:b EQ ?
+ `--SCAN t1 VIRTUAL TABLE INDEX 0:b EQ ?
}
do_execsql_test 1.5 {
@@ -155,9 +155,9 @@ ifcapable !icu {
QUERY PLAN
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t2 USING INDEX t2x (x>? AND x<?)
+ | `--SEARCH t2 USING INDEX t2x (x>? AND x<?)
`--INDEX 2
- `--SEARCH TABLE t2 USING INDEX t2y (y=?)
+ `--SEARCH t2 USING INDEX t2y (y=?)
}]
}
diff --git a/test/bestindex4.test b/test/bestindex4.test
index e395012c4..f90bf41e9 100644
--- a/test/bestindex4.test
+++ b/test/bestindex4.test
@@ -159,16 +159,16 @@ do_eqp_test 2.1 {
SELECT * FROM t1, x1 WHERE x1.d=t1.x;
} {
QUERY PLAN
- |--SCAN TABLE x1 VIRTUAL TABLE INDEX 0:
- `--SEARCH TABLE t1 USING COVERING INDEX sqlite_autoindex_t1_1 (x=?)
+ |--SCAN x1 VIRTUAL TABLE INDEX 0:
+ `--SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (x=?)
}
do_eqp_test 2.2 {
SELECT * FROM t1, x1(t1.x)
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SCAN TABLE x1 VIRTUAL TABLE INDEX 555:
+ |--SCAN t1
+ `--SCAN x1 VIRTUAL TABLE INDEX 555:
}
diff --git a/test/bestindex7.test b/test/bestindex7.test
index aa1d70b86..f8d42b2b0 100644
--- a/test/bestindex7.test
+++ b/test/bestindex7.test
@@ -76,4 +76,3 @@ do_execsql_test 1.11 { select * from vt1 WHERE a IN (0, NULL) } {0}
do_execsql_test 1.12 { select * from vt1 WHERE a IN (NULL) } {}
finish_test
-
diff --git a/test/between.test b/test/between.test
index e2b25ca3c..16c3913d1 100644
--- a/test/between.test
+++ b/test/between.test
@@ -58,10 +58,10 @@ proc queryplan {sql} {
set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
# puts eqp=$eqp
foreach {a b c x} $eqp {
- if {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
- $x all as tab idx]} {
+ if {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+ $x all ss as tab idx]} {
lappend data $tab $idx
- } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
lappend data $tab *
}
}
diff --git a/test/bigmmap.test b/test/bigmmap.test
index 62e035b05..7802fd58e 100644
--- a/test/bigmmap.test
+++ b/test/bigmmap.test
@@ -94,9 +94,9 @@ for {set i 0} {$i < 9} {incr i} {
ORDER BY b, c;
" [string map {"\n " "\n"} "
QUERY PLAN
- |--SCAN TABLE t$t AS o USING COVERING INDEX sqlite_autoindex_t${t}_1
+ |--SCAN o USING COVERING INDEX sqlite_autoindex_t${t}_1
`--CORRELATED SCALAR SUBQUERY xxxxxx
- `--SEARCH TABLE t$t AS i USING INTEGER PRIMARY KEY (rowid=?)
+ `--SEARCH i USING INTEGER PRIMARY KEY (rowid=?)
"]
}
}
diff --git a/test/busy2.test b/test/busy2.test
index db8ca0e38..61fb8496a 100644
--- a/test/busy2.test
+++ b/test/busy2.test
@@ -168,4 +168,3 @@ do_multiclient_test tn {
}
finish_test
-
diff --git a/test/columncount.test b/test/columncount.test
index 3ecc1f8d8..669a35a72 100644
--- a/test/columncount.test
+++ b/test/columncount.test
@@ -54,4 +54,3 @@ do_ccsql_test 1.6 { DROP TABLE t3 } {0}
finish_test
-
diff --git a/test/cost.test b/test/cost.test
index 592973ab5..5684177a1 100644
--- a/test/cost.test
+++ b/test/cost.test
@@ -25,8 +25,8 @@ do_eqp_test 1.2 {
SELECT e FROM t3, t4 WHERE b=c ORDER BY b, d;
} {
QUERY PLAN
- |--SCAN TABLE t3 USING COVERING INDEX i3
- `--SEARCH TABLE t4 USING INDEX i4 (c=?)
+ |--SCAN t3 USING COVERING INDEX i3
+ `--SEARCH t4 USING INDEX i4 (c=?)
}
@@ -39,7 +39,7 @@ do_execsql_test 2.1 {
# if the index is a non-covering index.
do_eqp_test 2.2 {
SELECT * FROM t1 ORDER BY a;
-} {SCAN TABLE t1 USING INDEX i1}
+} {SCAN t1 USING INDEX i1}
do_execsql_test 3.1 {
CREATE TABLE t5(a INTEGER PRIMARY KEY,b,c,d,e,f,g);
@@ -59,11 +59,11 @@ do_eqp_test 3.2 {
QUERY PLAN
|--MULTI-INDEX OR
| |--INDEX 1
- | | `--SEARCH TABLE t5 USING INDEX t5b (b=?)
+ | | `--SEARCH t5 USING INDEX t5b (b=?)
| |--INDEX 2
- | | `--SEARCH TABLE t5 USING INDEX t5c (c=?)
+ | | `--SEARCH t5 USING INDEX t5c (c=?)
| `--INDEX 3
- | `--SEARCH TABLE t5 USING INDEX t5d (d=?)
+ | `--SEARCH t5 USING INDEX t5d (d=?)
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -83,11 +83,11 @@ do_execsql_test 4.1 {
}
do_eqp_test 4.2 {
SELECT * FROM t1 WHERE likelihood(a=?, 0.014) AND b BETWEEN ? AND ?;
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test 4.3 {
SELECT * FROM t1 WHERE likelihood(a=?, 0.016) AND b BETWEEN ? AND ?;
-} {SEARCH TABLE t1 USING INDEX i2 (b>? AND b<?)}
+} {SEARCH t1 USING INDEX i2 (b>? AND b<?)}
#-------------------------------------------------------------------------
@@ -102,7 +102,7 @@ do_eqp_test 5.2 {
SELECT * FROM t2 ORDER BY x, y;
} {
QUERY PLAN
- |--SCAN TABLE t2 USING INDEX t2i1
+ |--SCAN t2 USING INDEX t2i1
`--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
}
@@ -110,7 +110,7 @@ do_eqp_test 5.3 {
SELECT * FROM t2 WHERE x BETWEEN ? AND ? ORDER BY rowid;
} {
QUERY PLAN
- |--SEARCH TABLE t2 USING INDEX t2i1 (x>? AND x<?)
+ |--SEARCH t2 USING INDEX t2i1 (x>? AND x<?)
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -128,9 +128,9 @@ do_eqp_test 6.2 {
QUERY PLAN
|--MULTI-INDEX OR
| |--INDEX 1
- | | `--SEARCH TABLE t3 USING INDEX t3i1 (b>? AND b<?)
+ | | `--SEARCH t3 USING INDEX t3i1 (b>? AND b<?)
| `--INDEX 2
- | `--SEARCH TABLE t3 USING INDEX t3i2 (c=?)
+ | `--SEARCH t3 USING INDEX t3i2 (c=?)
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -155,9 +155,9 @@ do_eqp_test 7.2 {
QUERY PLAN
|--MULTI-INDEX OR
| |--INDEX 1
- | | `--SEARCH TABLE t1 USING INDEX t1b (b>? AND b<?)
+ | | `--SEARCH t1 USING INDEX t1b (b>? AND b<?)
| `--INDEX 2
- | `--SEARCH TABLE t1 USING INDEX t1b (b=?)
+ | `--SEARCH t1 USING INDEX t1b (b=?)
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -166,11 +166,11 @@ do_eqp_test 7.3 {
WHERE (+b IS NULL AND c NOT NULL AND d NOT NULL)
OR (b NOT NULL AND c IS NULL AND d NOT NULL)
OR (b NOT NULL AND c NOT NULL AND d IS NULL)
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test 7.4 {
SELECT rowid FROM t1 WHERE (+b IS NULL AND c NOT NULL) OR c IS NULL
-} {SCAN TABLE t1}
+} {SCAN t1}
#-------------------------------------------------------------------------
#
@@ -202,9 +202,9 @@ do_eqp_test 8.2 {
AND unlikely(album.aid=track.aid);
} {
QUERY PLAN
- |--SCAN TABLE track
- |--SEARCH TABLE album USING INTEGER PRIMARY KEY (rowid=?)
- |--SEARCH TABLE composer USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN track
+ |--SEARCH album USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH composer USING INTEGER PRIMARY KEY (rowid=?)
`--USE TEMP B-TREE FOR DISTINCT
}
@@ -271,19 +271,19 @@ ifcapable stat4 {
do_eqp_test 10.3 {
SELECT rowid FROM t6 WHERE a=0 AND c=0
- } {SEARCH TABLE t6 USING INDEX t6i2 (c=?)}
+ } {SEARCH t6 USING INDEX t6i2 (c=?)}
do_eqp_test 10.4 {
SELECT rowid FROM t6 WHERE a=0 AND b='xyz' AND c=0
- } {SEARCH TABLE t6 USING INDEX t6i2 (c=?)}
+ } {SEARCH t6 USING INDEX t6i2 (c=?)}
do_eqp_test 10.5 {
SELECT rowid FROM t6 WHERE likelihood(a=0, 0.1) AND c=0
- } {SEARCH TABLE t6 USING INDEX t6i1 (a=?)}
+ } {SEARCH t6 USING INDEX t6i1 (a=?)}
do_eqp_test 10.6 {
SELECT rowid FROM t6 WHERE likelihood(a=0, 0.1) AND b='xyz' AND c=0
- } {SEARCH TABLE t6 USING INDEX t6i1 (a=? AND b=?)}
+ } {SEARCH t6 USING INDEX t6i1 (a=? AND b=?)}
}
finish_test
diff --git a/test/count.test b/test/count.test
index 250eb669b..9769b765f 100644
--- a/test/count.test
+++ b/test/count.test
@@ -212,25 +212,25 @@ do_eqp_test count-7.2 {
SELECT count(1) FROM t1;
} {
QUERY PLAN
- `--SCAN TABLE t1 USING COVERING INDEX t1b
+ `--SCAN t1 USING COVERING INDEX t1b
}
do_eqp_test count-7.3 {
SELECT count(1) FROM t1 NOT INDEXED
} {
QUERY PLAN
- `--SCAN TABLE t1
+ `--SCAN t1
}
do_eqp_test count-7.3 {
SELECT count(*) FROM t1;
} {
QUERY PLAN
- `--SCAN TABLE t1 USING COVERING INDEX t1b
+ `--SCAN t1 USING COVERING INDEX t1b
}
do_eqp_test count-7.4 {
SELECT count(*) FROM t1 NOT INDEXED
} {
QUERY PLAN
- `--SCAN TABLE t1
+ `--SCAN t1
}
diff --git a/test/coveridxscan.test b/test/coveridxscan.test
index cc9864439..c87227cab 100644
--- a/test/coveridxscan.test
+++ b/test/coveridxscan.test
@@ -109,11 +109,11 @@ do_execsql_test 5.1.0 "
do_eqp_test 5.1.1 {
SELECT * FROM t1 ORDER BY c1, c2;
-} {SCAN TABLE t1 USING COVERING INDEX i1}
+} {SCAN t1 USING COVERING INDEX i1}
do_eqp_test 5.1.2 {
SELECT * FROM t2 ORDER BY c1, c2;
-} {SCAN TABLE t2 USING COVERING INDEX i2}
+} {SCAN t2 USING COVERING INDEX i2}
finish_test
diff --git a/test/date2.test b/test/date2.test
index 30a475737..a16e25c44 100644
--- a/test/date2.test
+++ b/test/date2.test
@@ -38,6 +38,13 @@ do_catchsql_test date2-130 {
INSERT INTO t1(x,y) VALUES('2017-08-01','two');
} {1 {CHECK constraint failed: date(x) BETWEEN '2017-07-01' AND '2017-07-31'}}
+# 2021-03-16 Forum post https://sqlite.org/forum/forumpost/464afd4086
+do_catchsql_test date2-140 {
+ DROP TABLE t1;
+ CREATE TABLE t1(x, y, z AS (date()));
+ INSERT INTO t1(x,y) VALUES(1,2);
+} {1 {non-deterministic use of date() in a generated column}}
+
do_execsql_test date2-200 {
CREATE TABLE t2(x,y);
INSERT INTO t2(x,y) VALUES(1, '2017-07-20'), (2, 'xyzzy');
diff --git a/test/e_createtable.test b/test/e_createtable.test
index e83e5cca1..c2cd1bc2c 100644
--- a/test/e_createtable.test
+++ b/test/e_createtable.test
@@ -1393,13 +1393,13 @@ do_execsql_test 4.10.0 {
}
do_createtable_tests 4.10 {
1 "EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE b = 5"
- {/*SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (b=?)*/}
+ {/*SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (b=?)*/}
2 "EXPLAIN QUERY PLAN SELECT * FROM t2 ORDER BY b, c"
- {/*SCAN TABLE t2 USING INDEX sqlite_autoindex_t2_1*/}
+ {/*SCAN t2 USING INDEX sqlite_autoindex_t2_1*/}
3 "EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE b=10 AND c>10"
- {/*SEARCH TABLE t2 USING INDEX sqlite_autoindex_t2_1 (b=? AND c>?)*/}
+ {/*SEARCH t2 USING INDEX sqlite_autoindex_t2_1 (b=? AND c>?)*/}
}
# EVIDENCE-OF: R-45493-35653 A CHECK constraint may be attached to a
diff --git a/test/e_fkey.test b/test/e_fkey.test
index 40fa075df..e5eb0d49c 100644
--- a/test/e_fkey.test
+++ b/test/e_fkey.test
@@ -992,15 +992,15 @@ do_detail_test e_fkey-25.2 {
EXPLAIN QUERY PLAN DELETE FROM artist WHERE 1;
EXPLAIN QUERY PLAN SELECT rowid FROM track WHERE trackartist = ?;
} {
- {SCAN TABLE artist}
- {SCAN TABLE track}
+ {SCAN artist}
+ {SCAN track}
}
do_detail_test e_fkey-25.3 {
PRAGMA foreign_keys = ON;
EXPLAIN QUERY PLAN DELETE FROM artist WHERE 1;
} {
- {SCAN TABLE artist}
- {SCAN TABLE track}
+ {SCAN artist}
+ {SCAN track}
}
do_test e_fkey-25.4 {
execsql {
@@ -1117,15 +1117,15 @@ do_test e_fkey-27.2 {
do_detail_test e_fkey-27.3 {
EXPLAIN QUERY PLAN UPDATE artist SET artistid = ?, artistname = ?
} {
- {SCAN TABLE artist}
- {SEARCH TABLE track USING COVERING INDEX trackindex (trackartist=?)}
- {SEARCH TABLE track USING COVERING INDEX trackindex (trackartist=?)}
+ {SCAN artist}
+ {SEARCH track USING COVERING INDEX trackindex (trackartist=?)}
+ {SEARCH track USING COVERING INDEX trackindex (trackartist=?)}
}
do_detail_test e_fkey-27.4 {
EXPLAIN QUERY PLAN DELETE FROM artist
} {
- {SCAN TABLE artist}
- {SEARCH TABLE track USING COVERING INDEX trackindex (trackartist=?)}
+ {SCAN artist}
+ {SEARCH track USING COVERING INDEX trackindex (trackartist=?)}
}
###########################################################################
diff --git a/test/eqp.test b/test/eqp.test
index f931f8f34..19d6ea91a 100644
--- a/test/eqp.test
+++ b/test/eqp.test
@@ -46,111 +46,131 @@ do_eqp_test 1.2 {
QUERY PLAN
|--MULTI-INDEX OR
| |--INDEX 1
- | | `--SEARCH TABLE t1 USING INDEX i1 (a=?)
+ | | `--SEARCH t1 USING INDEX i1 (a=?)
| `--INDEX 2
- | `--SEARCH TABLE t1 USING INDEX i2 (b=?)
- `--SCAN TABLE t2
+ | `--SEARCH t1 USING INDEX i2 (b=?)
+ `--SCAN t2
}
do_eqp_test 1.3 {
SELECT * FROM t2 CROSS JOIN t1 WHERE t1.a=1 OR t1.b=2;
} {
QUERY PLAN
- |--SCAN TABLE t2
+ |--SCAN t2
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t1 USING INDEX i1 (a=?)
+ | `--SEARCH t1 USING INDEX i1 (a=?)
`--INDEX 2
- `--SEARCH TABLE t1 USING INDEX i2 (b=?)
+ `--SEARCH t1 USING INDEX i2 (b=?)
}
do_eqp_test 1.3 {
SELECT a FROM t1 ORDER BY a
} {
QUERY PLAN
- `--SCAN TABLE t1 USING COVERING INDEX i1
+ `--SCAN t1 USING COVERING INDEX i1
}
do_eqp_test 1.4 {
SELECT a FROM t1 ORDER BY +a
} {
QUERY PLAN
- |--SCAN TABLE t1 USING COVERING INDEX i1
+ |--SCAN t1 USING COVERING INDEX i1
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test 1.5 {
SELECT a FROM t1 WHERE a=4
} {
QUERY PLAN
- `--SEARCH TABLE t1 USING COVERING INDEX i1 (a=?)
+ `--SEARCH t1 USING COVERING INDEX i1 (a=?)
}
do_eqp_test 1.6 {
SELECT DISTINCT count(*) FROM t3 GROUP BY a;
} {
QUERY PLAN
- |--SCAN TABLE t3
+ |--SCAN t3
|--USE TEMP B-TREE FOR GROUP BY
`--USE TEMP B-TREE FOR DISTINCT
}
-do_eqp_test 1.7 {
+do_eqp_test 1.7.1 {
SELECT * FROM t3 JOIN (SELECT 1)
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE SUBQUERY xxxxxx
| `--SCAN CONSTANT ROW
|--SCAN SUBQUERY xxxxxx
- `--SCAN TABLE t3
+ `--SCAN t3
}
+do_eqp_test 1.7.2 {
+ SELECT * FROM t3 JOIN (SELECT 1) AS v1
+} {
+ QUERY PLAN
+ |--MATERIALIZE v1
+ | `--SCAN CONSTANT ROW
+ |--SCAN v1
+ `--SCAN t3
+}
+do_eqp_test 1.7.3 {
+ SELECT * FROM t3 AS xx JOIN (SELECT 1) AS yy
+} {
+ QUERY PLAN
+ |--MATERIALIZE yy
+ | `--SCAN CONSTANT ROW
+ |--SCAN yy
+ `--SCAN xx
+}
+
+
do_eqp_test 1.8 {
SELECT * FROM t3 JOIN (SELECT 1 UNION SELECT 2)
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE SUBQUERY xxxxxx
| `--COMPOUND QUERY
| |--LEFT-MOST SUBQUERY
| | `--SCAN CONSTANT ROW
| `--UNION USING TEMP B-TREE
| `--SCAN CONSTANT ROW
|--SCAN SUBQUERY xxxxxx
- `--SCAN TABLE t3
+ `--SCAN t3
}
do_eqp_test 1.9 {
- SELECT * FROM t3 JOIN (SELECT 1 EXCEPT SELECT a FROM t3 LIMIT 17)
+ SELECT * FROM t3 JOIN (SELECT 1 EXCEPT SELECT a FROM t3 LIMIT 17) AS abc
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE abc
| `--COMPOUND QUERY
| |--LEFT-MOST SUBQUERY
| | `--SCAN CONSTANT ROW
| `--EXCEPT USING TEMP B-TREE
- | `--SCAN TABLE t3
- |--SCAN SUBQUERY xxxxxx
- `--SCAN TABLE t3
+ | `--SCAN t3
+ |--SCAN abc
+ `--SCAN t3
}
do_eqp_test 1.10 {
- SELECT * FROM t3 JOIN (SELECT 1 INTERSECT SELECT a FROM t3 LIMIT 17)
+ SELECT * FROM t3 JOIN (SELECT 1 INTERSECT SELECT a FROM t3 LIMIT 17) AS abc
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE abc
| `--COMPOUND QUERY
| |--LEFT-MOST SUBQUERY
| | `--SCAN CONSTANT ROW
| `--INTERSECT USING TEMP B-TREE
- | `--SCAN TABLE t3
- |--SCAN SUBQUERY xxxxxx
- `--SCAN TABLE t3
+ | `--SCAN t3
+ |--SCAN abc
+ `--SCAN t3
}
do_eqp_test 1.11 {
- SELECT * FROM t3 JOIN (SELECT 1 UNION ALL SELECT a FROM t3 LIMIT 17)
+ SELECT * FROM t3 JOIN (SELECT 1 UNION ALL SELECT a FROM t3 LIMIT 17) abc
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE abc
| `--COMPOUND QUERY
| |--LEFT-MOST SUBQUERY
| | `--SCAN CONSTANT ROW
| `--UNION ALL
- | `--SCAN TABLE t3
- |--SCAN SUBQUERY xxxxxx
- `--SCAN TABLE t3
+ | `--SCAN t3
+ |--SCAN abc
+ `--SCAN t3
}
#-------------------------------------------------------------------------
@@ -166,57 +186,57 @@ do_execsql_test 2.1 {
det 2.2.1 "SELECT DISTINCT min(x), max(x) FROM t1 GROUP BY x ORDER BY 1" {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
|--USE TEMP B-TREE FOR GROUP BY
|--USE TEMP B-TREE FOR DISTINCT
`--USE TEMP B-TREE FOR ORDER BY
}
det 2.2.2 "SELECT DISTINCT min(x), max(x) FROM t2 GROUP BY x ORDER BY 1" {
QUERY PLAN
- |--SCAN TABLE t2 USING COVERING INDEX t2i1
+ |--SCAN t2 USING COVERING INDEX t2i1
|--USE TEMP B-TREE FOR DISTINCT
`--USE TEMP B-TREE FOR ORDER BY
}
det 2.2.3 "SELECT DISTINCT * FROM t1" {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--USE TEMP B-TREE FOR DISTINCT
}
det 2.2.4 "SELECT DISTINCT * FROM t1, t2" {
QUERY PLAN
- |--SCAN TABLE t1
- |--SCAN TABLE t2
+ |--SCAN t1
+ |--SCAN t2
`--USE TEMP B-TREE FOR DISTINCT
}
det 2.2.5 "SELECT DISTINCT * FROM t1, t2 ORDER BY t1.x" {
QUERY PLAN
- |--SCAN TABLE t1
- |--SCAN TABLE t2
+ |--SCAN t1
+ |--SCAN t2
|--USE TEMP B-TREE FOR DISTINCT
`--USE TEMP B-TREE FOR ORDER BY
}
det 2.2.6 "SELECT DISTINCT t2.x FROM t1, t2 ORDER BY t2.x" {
QUERY PLAN
- |--SCAN TABLE t2 USING COVERING INDEX t2i1
- `--SCAN TABLE t1
+ |--SCAN t2 USING COVERING INDEX t2i1
+ `--SCAN t1
}
det 2.3.1 "SELECT max(x) FROM t2" {
QUERY PLAN
- `--SEARCH TABLE t2 USING COVERING INDEX t2i1
+ `--SEARCH t2 USING COVERING INDEX t2i1
}
det 2.3.2 "SELECT min(x) FROM t2" {
QUERY PLAN
- `--SEARCH TABLE t2 USING COVERING INDEX t2i1
+ `--SEARCH t2 USING COVERING INDEX t2i1
}
det 2.3.3 "SELECT min(x), max(x) FROM t2" {
QUERY PLAN
- `--SCAN TABLE t2 USING COVERING INDEX t2i1
+ `--SCAN t2 USING COVERING INDEX t2i1
}
det 2.4.1 "SELECT * FROM t1 WHERE rowid=?" {
QUERY PLAN
- `--SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+ `--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
}
@@ -228,42 +248,42 @@ do_eqp_test 3.1.1 {
SELECT (SELECT x FROM t1 AS sub) FROM t1;
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--SCALAR SUBQUERY xxxxxx
- `--SCAN TABLE t1 AS sub
+ `--SCAN sub
}
do_eqp_test 3.1.2 {
SELECT * FROM t1 WHERE (SELECT x FROM t1 AS sub);
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--SCALAR SUBQUERY xxxxxx
- `--SCAN TABLE t1 AS sub
+ `--SCAN sub
}
do_eqp_test 3.1.3 {
SELECT * FROM t1 WHERE (SELECT x FROM t1 AS sub ORDER BY y);
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--SCALAR SUBQUERY xxxxxx
- |--SCAN TABLE t1 AS sub
+ |--SCAN sub
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test 3.1.4 {
SELECT * FROM t1 WHERE (SELECT x FROM t2 ORDER BY x);
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--SCALAR SUBQUERY xxxxxx
- `--SCAN TABLE t2 USING COVERING INDEX t2i1
+ `--SCAN t2 USING COVERING INDEX t2i1
}
det 3.2.1 {
SELECT * FROM (SELECT * FROM t1 ORDER BY x LIMIT 10) ORDER BY y LIMIT 5
} {
QUERY PLAN
- |--CO-ROUTINE xxxxxx
- | |--SCAN TABLE t1
+ |--CO-ROUTINE SUBQUERY xxxxxx
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
|--SCAN SUBQUERY xxxxxx
`--USE TEMP B-TREE FOR ORDER BY
@@ -275,13 +295,13 @@ det 3.2.2 {
ORDER BY x2.y LIMIT 5
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--SCAN TABLE t1
+ |--MATERIALIZE x1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
- |--MATERIALIZE xxxxxx
- | `--SCAN TABLE t2 USING INDEX t2i1
- |--SCAN SUBQUERY xxxxxx AS x1
- |--SCAN SUBQUERY xxxxxx AS x2
+ |--MATERIALIZE x2
+ | `--SCAN t2 USING INDEX t2i1
+ |--SCAN x1
+ |--SCAN x2
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -289,25 +309,25 @@ det 3.3.1 {
SELECT * FROM t1 WHERE y IN (SELECT y FROM t2)
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--LIST SUBQUERY xxxxxx
- `--SCAN TABLE t2
+ `--SCAN t2
}
det 3.3.2 {
SELECT * FROM t1 WHERE y IN (SELECT y FROM t2 WHERE t1.x!=t2.x)
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--CORRELATED LIST SUBQUERY xxxxxx
- `--SCAN TABLE t2
+ `--SCAN t2
}
det 3.3.3 {
SELECT * FROM t1 WHERE EXISTS (SELECT y FROM t2 WHERE t1.x!=t2.x)
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--CORRELATED SCALAR SUBQUERY xxxxxx
- `--SCAN TABLE t2
+ `--SCAN t2
}
#-------------------------------------------------------------------------
@@ -319,9 +339,9 @@ do_eqp_test 4.1.1 {
QUERY PLAN
`--COMPOUND QUERY
|--LEFT-MOST SUBQUERY
- | `--SCAN TABLE t1
+ | `--SCAN t1
`--UNION ALL
- `--SCAN TABLE t2
+ `--SCAN t2
}
do_eqp_test 4.1.2 {
SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY 2
@@ -329,10 +349,10 @@ do_eqp_test 4.1.2 {
QUERY PLAN
`--MERGE (UNION ALL)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2
+ |--SCAN t2
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test 4.1.3 {
@@ -341,10 +361,10 @@ do_eqp_test 4.1.3 {
QUERY PLAN
`--MERGE (UNION)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2
+ |--SCAN t2
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test 4.1.4 {
@@ -353,10 +373,10 @@ do_eqp_test 4.1.4 {
QUERY PLAN
`--MERGE (INTERSECT)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2
+ |--SCAN t2
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test 4.1.5 {
@@ -365,10 +385,10 @@ do_eqp_test 4.1.5 {
QUERY PLAN
`--MERGE (EXCEPT)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2
+ |--SCAN t2
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -378,10 +398,10 @@ do_eqp_test 4.2.2 {
QUERY PLAN
`--MERGE (UNION ALL)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- `--SCAN TABLE t2 USING INDEX t2i1
+ `--SCAN t2 USING INDEX t2i1
}
do_eqp_test 4.2.3 {
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1
@@ -389,10 +409,10 @@ do_eqp_test 4.2.3 {
QUERY PLAN
`--MERGE (UNION)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2 USING INDEX t2i1
+ |--SCAN t2 USING INDEX t2i1
`--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
}
do_eqp_test 4.2.4 {
@@ -401,10 +421,10 @@ do_eqp_test 4.2.4 {
QUERY PLAN
`--MERGE (INTERSECT)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2 USING INDEX t2i1
+ |--SCAN t2 USING INDEX t2i1
`--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
}
do_eqp_test 4.2.5 {
@@ -413,10 +433,10 @@ do_eqp_test 4.2.5 {
QUERY PLAN
`--MERGE (EXCEPT)
|--LEFT
- | |--SCAN TABLE t1
+ | |--SCAN t1
| `--USE TEMP B-TREE FOR ORDER BY
`--RIGHT
- |--SCAN TABLE t2 USING INDEX t2i1
+ |--SCAN t2 USING INDEX t2i1
`--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
}
@@ -426,9 +446,9 @@ do_eqp_test 4.3.1 {
QUERY PLAN
`--COMPOUND QUERY
|--LEFT-MOST SUBQUERY
- | `--SCAN TABLE t1
+ | `--SCAN t1
`--UNION USING TEMP B-TREE
- `--SCAN TABLE t2 USING COVERING INDEX t2i1
+ `--SCAN t2 USING COVERING INDEX t2i1
}
do_eqp_test 4.3.2 {
@@ -437,11 +457,11 @@ do_eqp_test 4.3.2 {
QUERY PLAN
`--COMPOUND QUERY
|--LEFT-MOST SUBQUERY
- | `--SCAN TABLE t1
+ | `--SCAN t1
|--UNION USING TEMP B-TREE
- | `--SCAN TABLE t2 USING COVERING INDEX t2i1
+ | `--SCAN t2 USING COVERING INDEX t2i1
`--UNION USING TEMP B-TREE
- `--SCAN TABLE t1
+ `--SCAN t1
}
do_eqp_test 4.3.3 {
SELECT x FROM t1 UNION SELECT x FROM t2 UNION SELECT x FROM t1 ORDER BY 1
@@ -451,12 +471,12 @@ do_eqp_test 4.3.3 {
|--LEFT
| `--MERGE (UNION)
| |--LEFT
- | | |--SCAN TABLE t1
+ | | |--SCAN t1
| | `--USE TEMP B-TREE FOR ORDER BY
| `--RIGHT
- | `--SCAN TABLE t2 USING COVERING INDEX t2i1
+ | `--SCAN t2 USING COVERING INDEX t2i1
`--RIGHT
- |--SCAN TABLE t1
+ |--SCAN t1
`--USE TEMP B-TREE FOR ORDER BY
}
@@ -469,145 +489,145 @@ drop_all_tables
# XVIDENCE-OF: R-47779-47605 sqlite> EXPLAIN QUERY PLAN SELECT a, b
# FROM t1 WHERE a=1;
-# 0|0|0|SCAN TABLE t1
+# 0|0|0|SCAN t1
#
do_execsql_test 5.1.0 { CREATE TABLE t1(a INT, b INT, ex TEXT) }
det 5.1.1 "SELECT a, b FROM t1 WHERE a=1" {
- 0 0 0 {SCAN TABLE t1}
+ 0 0 0 {SCAN t1}
}
# XVIDENCE-OF: R-55852-17599 sqlite> CREATE INDEX i1 ON t1(a);
# sqlite> EXPLAIN QUERY PLAN SELECT a, b FROM t1 WHERE a=1;
-# 0|0|0|SEARCH TABLE t1 USING INDEX i1
+# 0|0|0|SEARCH t1 USING INDEX i1
#
do_execsql_test 5.2.0 { CREATE INDEX i1 ON t1(a) }
det 5.2.1 "SELECT a, b FROM t1 WHERE a=1" {
- 0 0 0 {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+ 0 0 0 {SEARCH t1 USING INDEX i1 (a=?)}
}
# XVIDENCE-OF: R-21179-11011 sqlite> CREATE INDEX i2 ON t1(a, b);
# sqlite> EXPLAIN QUERY PLAN SELECT a, b FROM t1 WHERE a=1;
-# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
+# 0|0|0|SEARCH t1 USING COVERING INDEX i2 (a=?)
#
do_execsql_test 5.3.0 { CREATE INDEX i2 ON t1(a, b) }
det 5.3.1 "SELECT a, b FROM t1 WHERE a=1" {
- 0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
+ 0 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=?)}
}
# XVIDENCE-OF: R-09991-48941 sqlite> EXPLAIN QUERY PLAN
# SELECT t1.*, t2.* FROM t1, t2 WHERE t1.a=1 AND t1.b>2;
-# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)
-# 0|1|1|SCAN TABLE t2
+# 0|0|0|SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)
+# 0|1|1|SCAN t2
#
do_execsql_test 5.4.0 {CREATE TABLE t2(c INT, d INT, ex TEXT)}
det 5.4.1 "SELECT t1.a, t2.c FROM t1, t2 WHERE t1.a=1 AND t1.b>2" {
- 0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)}
- 0 1 1 {SCAN TABLE t2}
+ 0 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)}
+ 0 1 1 {SCAN t2}
}
# XVIDENCE-OF: R-33626-61085 sqlite> EXPLAIN QUERY PLAN
# SELECT t1.*, t2.* FROM t2, t1 WHERE t1.a=1 AND t1.b>2;
-# 0|0|1|SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)
-# 0|1|0|SCAN TABLE t2
+# 0|0|1|SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)
+# 0|1|0|SCAN t2
#
det 5.5 "SELECT t1.a, t2.c FROM t2, t1 WHERE t1.a=1 AND t1.b>2" {
- 0 0 1 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=? AND b>?)}
- 0 1 0 {SCAN TABLE t2}
+ 0 0 1 {SEARCH t1 USING COVERING INDEX i2 (a=? AND b>?)}
+ 0 1 0 {SCAN t2}
}
# XVIDENCE-OF: R-04002-25654 sqlite> CREATE INDEX i3 ON t1(b);
# sqlite> EXPLAIN QUERY PLAN SELECT * FROM t1 WHERE a=1 OR b=2;
-# 0|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
-# 0|0|0|SEARCH TABLE t1 USING INDEX i3 (b=?)
+# 0|0|0|SEARCH t1 USING COVERING INDEX i2 (a=?)
+# 0|0|0|SEARCH t1 USING INDEX i3 (b=?)
#
do_execsql_test 5.5.0 {CREATE INDEX i3 ON t1(b)}
det 5.6.1 "SELECT a, b FROM t1 WHERE a=1 OR b=2" {
- 0 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
- 0 0 0 {SEARCH TABLE t1 USING INDEX i3 (b=?)}
+ 0 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=?)}
+ 0 0 0 {SEARCH t1 USING INDEX i3 (b=?)}
}
# XVIDENCE-OF: R-24577-38891 sqlite> EXPLAIN QUERY PLAN
# SELECT c, d FROM t2 ORDER BY c;
-# 0|0|0|SCAN TABLE t2
+# 0|0|0|SCAN t2
# 0|0|0|USE TEMP B-TREE FOR ORDER BY
#
det 5.7 "SELECT c, d FROM t2 ORDER BY c" {
- 0 0 0 {SCAN TABLE t2}
+ 0 0 0 {SCAN t2}
0 0 0 {USE TEMP B-TREE FOR ORDER BY}
}
# XVIDENCE-OF: R-58157-12355 sqlite> CREATE INDEX i4 ON t2(c);
# sqlite> EXPLAIN QUERY PLAN SELECT c, d FROM t2 ORDER BY c;
-# 0|0|0|SCAN TABLE t2 USING INDEX i4
+# 0|0|0|SCAN t2 USING INDEX i4
#
do_execsql_test 5.8.0 {CREATE INDEX i4 ON t2(c)}
det 5.8.1 "SELECT c, d FROM t2 ORDER BY c" {
- 0 0 0 {SCAN TABLE t2 USING INDEX i4}
+ 0 0 0 {SCAN t2 USING INDEX i4}
}
# XVIDENCE-OF: R-13931-10421 sqlite> EXPLAIN QUERY PLAN SELECT
# (SELECT b FROM t1 WHERE a=0), (SELECT a FROM t1 WHERE b=t2.c) FROM t2;
-# 0|0|0|SCAN TABLE t2
+# 0|0|0|SCAN t2
# 0|0|0|EXECUTE SCALAR SUBQUERY 1
-# 1|0|0|SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)
+# 1|0|0|SEARCH t1 USING COVERING INDEX i2 (a=?)
# 0|0|0|EXECUTE CORRELATED SCALAR SUBQUERY 2
-# 2|0|0|SEARCH TABLE t1 USING INDEX i3 (b=?)
+# 2|0|0|SEARCH t1 USING INDEX i3 (b=?)
#
det 5.9 {
SELECT (SELECT b FROM t1 WHERE a=0), (SELECT a FROM t1 WHERE b=t2.c) FROM t2
} {
- 0 0 0 {SCAN TABLE t2 USING COVERING INDEX i4}
+ 0 0 0 {SCAN t2 USING COVERING INDEX i4}
0 0 0 {EXECUTE SCALAR SUBQUERY 1}
- 1 0 0 {SEARCH TABLE t1 USING COVERING INDEX i2 (a=?)}
+ 1 0 0 {SEARCH t1 USING COVERING INDEX i2 (a=?)}
0 0 0 {EXECUTE CORRELATED SCALAR SUBQUERY 2}
- 2 0 0 {SEARCH TABLE t1 USING INDEX i3 (b=?)}
+ 2 0 0 {SEARCH t1 USING INDEX i3 (b=?)}
}
# XVIDENCE-OF: R-50892-45943 sqlite> EXPLAIN QUERY PLAN
# SELECT count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x;
-# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2
+# 1|0|0|SCAN t1 USING COVERING INDEX i2
# 0|0|0|SCAN SUBQUERY 1
# 0|0|0|USE TEMP B-TREE FOR GROUP BY
#
det 5.10 {
SELECT count(*) FROM (SELECT max(b) AS x FROM t1 GROUP BY a) GROUP BY x
} {
- 1 0 0 {SCAN TABLE t1 USING COVERING INDEX i2}
+ 1 0 0 {SCAN t1 USING COVERING INDEX i2}
0 0 0 {SCAN SUBQUERY 1}
0 0 0 {USE TEMP B-TREE FOR GROUP BY}
}
# XVIDENCE-OF: R-46219-33846 sqlite> EXPLAIN QUERY PLAN
# SELECT * FROM (SELECT * FROM t2 WHERE c=1), t1;
-# 0|0|0|SEARCH TABLE t2 USING INDEX i4 (c=?)
-# 0|1|1|SCAN TABLE t1
+# 0|0|0|SEARCH t2 USING INDEX i4 (c=?)
+# 0|1|1|SCAN t1
#
det 5.11 "SELECT a, b FROM (SELECT * FROM t2 WHERE c=1), t1" {
- 0 0 0 {SEARCH TABLE t2 USING INDEX i4 (c=?)}
- 0 1 1 {SCAN TABLE t1 USING COVERING INDEX i2}
+ 0 0 0 {SEARCH t2 USING INDEX i4 (c=?)}
+ 0 1 1 {SCAN t1 USING COVERING INDEX i2}
}
# XVIDENCE-OF: R-37879-39987 sqlite> EXPLAIN QUERY PLAN
# SELECT a FROM t1 UNION SELECT c FROM t2;
-# 1|0|0|SCAN TABLE t1
-# 2|0|0|SCAN TABLE t2
+# 1|0|0|SCAN t1
+# 2|0|0|SCAN t2
# 0|0|0|COMPOUND SUBQUERIES 1 AND 2 USING TEMP B-TREE (UNION)
#
det 5.12 "SELECT a,b FROM t1 UNION SELECT c, 99 FROM t2" {
- 1 0 0 {SCAN TABLE t1 USING COVERING INDEX i2}
- 2 0 0 {SCAN TABLE t2 USING COVERING INDEX i4}
+ 1 0 0 {SCAN t1 USING COVERING INDEX i2}
+ 2 0 0 {SCAN t2 USING COVERING INDEX i4}
0 0 0 {COMPOUND SUBQUERIES 1 AND 2 USING TEMP B-TREE (UNION)}
}
# XVIDENCE-OF: R-44864-63011 sqlite> EXPLAIN QUERY PLAN
# SELECT a FROM t1 EXCEPT SELECT d FROM t2 ORDER BY 1;
-# 1|0|0|SCAN TABLE t1 USING COVERING INDEX i2
-# 2|0|0|SCAN TABLE t2 2|0|0|USE TEMP B-TREE FOR ORDER BY
+# 1|0|0|SCAN t1 USING COVERING INDEX i2
+# 2|0|0|SCAN t2 2|0|0|USE TEMP B-TREE FOR ORDER BY
# 0|0|0|COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)
#
det 5.13 "SELECT a FROM t1 EXCEPT SELECT d FROM t2 ORDER BY 1" {
- 1 0 0 {SCAN TABLE t1 USING COVERING INDEX i1}
- 2 0 0 {SCAN TABLE t2}
+ 1 0 0 {SCAN t1 USING COVERING INDEX i1}
+ 2 0 0 {SCAN t2}
2 0 0 {USE TEMP B-TREE FOR ORDER BY}
0 0 0 {COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)}
}
@@ -647,8 +667,8 @@ if {![nonzero_reserved_bytes]} {
do_peqp_test 6.1 {
SELECT a, b FROM t1 EXCEPT SELECT d, 99 FROM t2 ORDER BY 1
} [string trimleft {
-1 0 0 SCAN TABLE t1 USING COVERING INDEX i2
-2 0 0 SCAN TABLE t2
+1 0 0 SCAN t1 USING COVERING INDEX i2
+2 0 0 SCAN t2
2 0 0 USE TEMP B-TREE FOR ORDER BY
0 0 0 COMPOUND SUBQUERIES 1 AND 2 (EXCEPT)
}]
@@ -669,12 +689,12 @@ do_execsql_test 7.0 {
det 7.1 "SELECT count(*) FROM t1" {
QUERY PLAN
- `--SCAN TABLE t1
+ `--SCAN t1
}
det 7.2 "SELECT count(*) FROM t2" {
QUERY PLAN
- `--SCAN TABLE t2 USING COVERING INDEX i1
+ `--SCAN t2 USING COVERING INDEX i1
}
do_execsql_test 7.3 {
@@ -693,12 +713,12 @@ sqlite3 db test.db
det 7.4 "SELECT count(*) FROM t1" {
QUERY PLAN
- `--SCAN TABLE t1
+ `--SCAN t1
}
det 7.5 "SELECT count(*) FROM t2" {
QUERY PLAN
- `--SCAN TABLE t2 USING COVERING INDEX i1
+ `--SCAN t2 USING COVERING INDEX i1
}
#-------------------------------------------------------------------------
@@ -714,37 +734,37 @@ do_execsql_test 8.0 {
det 8.1.1 "SELECT * FROM t2" {
QUERY PLAN
- `--SCAN TABLE t2
+ `--SCAN t2
}
det 8.1.2 "SELECT * FROM t2 WHERE rowid=?" {
QUERY PLAN
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
det 8.1.3 "SELECT count(*) FROM t2" {
QUERY PLAN
- `--SCAN TABLE t2
+ `--SCAN t2
}
det 8.2.1 "SELECT * FROM t1" {
QUERY PLAN
- `--SCAN TABLE t1
+ `--SCAN t1
}
det 8.2.2 "SELECT * FROM t1 WHERE b=?" {
QUERY PLAN
- `--SEARCH TABLE t1 USING PRIMARY KEY (b=?)
+ `--SEARCH t1 USING PRIMARY KEY (b=?)
}
det 8.2.3 "SELECT * FROM t1 WHERE b=? AND c=?" {
QUERY PLAN
- `--SEARCH TABLE t1 USING PRIMARY KEY (b=? AND c=?)
+ `--SEARCH t1 USING PRIMARY KEY (b=? AND c=?)
}
det 8.2.4 "SELECT count(*) FROM t1" {
QUERY PLAN
- `--SCAN TABLE t1
+ `--SCAN t1
}
# 2018-08-16: While working on Fossil I discovered that EXPLAIN QUERY PLAN
@@ -814,16 +834,16 @@ do_eqp_test 9.1 {
ORDER BY 1;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--SCAN TABLE forumpost AS x USING INDEX forumthread
+ |--MATERIALIZE thread
+ | |--SCAN x USING INDEX forumthread
| |--USING ROWID SEARCH ON TABLE private FOR IN-OPERATOR
| |--CORRELATED SCALAR SUBQUERY xxxxxx
- | | |--SEARCH TABLE forumpost USING COVERING INDEX forumthread (froot=?)
+ | | |--SEARCH forumpost USING COVERING INDEX forumthread (froot=?)
| | `--USING ROWID SEARCH ON TABLE private FOR IN-OPERATOR
| `--USE TEMP B-TREE FOR ORDER BY
- |--SCAN SUBQUERY xxxxxx
- |--SEARCH TABLE blob USING INTEGER PRIMARY KEY (rowid=?)
- |--SEARCH TABLE event USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN thread
+ |--SEARCH blob USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH event USING INTEGER PRIMARY KEY (rowid=?)
`--USE TEMP B-TREE FOR ORDER BY
}
diff --git a/test/exists2.test b/test/exists2.test
index c4fc9dc37..04b741c7c 100644
--- a/test/exists2.test
+++ b/test/exists2.test
@@ -50,7 +50,7 @@ do_execsql_eqp_test 1.1 {
do_execsql_eqp_test 1.2 {
SELECT t1.* FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.c=t1.a);
} {
- SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+ SEARCH t1 USING INTEGER PRIMARY KEY
} {
1 one 3 three 5 five 7 seven
}
@@ -58,7 +58,7 @@ do_execsql_eqp_test 1.2 {
do_execsql_eqp_test 1.3 {
SELECT t1.* FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.c+1=t1.a);
} {
- SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+ SEARCH t1 USING INTEGER PRIMARY KEY
} {
2 two 4 four 6 six
}
@@ -66,7 +66,7 @@ do_execsql_eqp_test 1.3 {
do_execsql_eqp_test 1.4 {
SELECT t1.* FROM t1 WHERE EXISTS(SELECT * FROM t2 WHERE t2.c+1=t1.a+1);
} {
- SCAN TABLE t1
+ SCAN t1
} {
1 one 3 three 5 five 7 seven
}
@@ -76,7 +76,7 @@ do_execsql_eqp_test 1.5 {
SELECT * FROM t2 WHERE t1.a=t2.c AND d IN (1, 2, 3)
);
} {
- SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+ SEARCH t1 USING INTEGER PRIMARY KEY
} {
1 one 3 three 5 five
}
@@ -86,7 +86,7 @@ do_execsql_eqp_test 1.6 {
SELECT * FROM t2 WHERE d IN (1, 2, 3)AND t1.a=t2.c
);
} {
- SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+ SEARCH t1 USING INTEGER PRIMARY KEY
} {
1 one 3 three 5 five
}
@@ -96,7 +96,7 @@ do_execsql_eqp_test 1.7 {
SELECT * FROM t2 WHERE d IN (1, 2, 3)AND t1.a=t2.c
);
} {
- SEARCH TABLE t1 USING INTEGER PRIMARY KEY
+ SEARCH t1 USING INTEGER PRIMARY KEY
} {
1 one 3 three 5 five
}
@@ -123,7 +123,7 @@ do_execsql_test 2.2 { SELECT a FROM t3, t4 WHERE c=a } {five four one two}
do_execsql_eqp_test 2.3 {
SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE a=c)
} {
- SEARCH TABLE t3 USING PRIMARY KEY
+ SEARCH t3 USING PRIMARY KEY
} {
four one
}
@@ -131,7 +131,7 @@ do_execsql_eqp_test 2.3 {
do_execsql_eqp_test 2.4 {
SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE c=a)
} {
- SCAN TABLE t3
+ SCAN t3
} {
five four one two
}
@@ -143,7 +143,7 @@ do_execsql_test 2.5 {
do_execsql_eqp_test 2.6 {
SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE c=a)
} {
- SEARCH TABLE t3 USING COVERING INDEX t3anc
+ SEARCH t3 USING COVERING INDEX t3anc
} {
five four one two
}
@@ -154,7 +154,7 @@ do_execsql_test 2.6a {
do_execsql_eqp_test 2.7 {
SELECT a FROM t3 WHERE EXISTS (SELECT 1 FROM t4 WHERE a=c)
} {
- SEARCH TABLE t3 USING PRIMARY KEY
+ SEARCH t3 USING PRIMARY KEY
} {
four one
}
diff --git a/test/existsfault.test b/test/existsfault.test
index 24e44a7b5..4a33eeb35 100644
--- a/test/existsfault.test
+++ b/test/existsfault.test
@@ -49,4 +49,3 @@ do_faultsim_test 1 -prep {
finish_test
-
diff --git a/test/fts3aux1.test b/test/fts3aux1.test
index c7e1ac1a5..1524d6d30 100644
--- a/test/fts3aux1.test
+++ b/test/fts3aux1.test
@@ -105,10 +105,10 @@ db func rec rec
#
do_execsql_test 2.1.1.1 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term='braid'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 1:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 1:*/}
do_execsql_test 2.1.1.2 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term='braid'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
# Now show that using "term='braid'" means the virtual table returns
# only 1 row to SQLite, but "+term='braid'" means all 19 are returned.
@@ -154,24 +154,24 @@ do_execsql_test 2.1.5 { SELECT * FROM terms WHERE term=NULL } {}
do_execsql_test 2.2.1.1 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term>'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 2:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 2:*/}
do_execsql_test 2.2.1.2 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term>'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
do_execsql_test 2.2.1.3 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term<'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 4:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 4:*/}
do_execsql_test 2.2.1.4 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term<'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
do_execsql_test 2.2.1.5 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE term BETWEEN 'brags' AND 'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 6:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 6:*/}
do_execsql_test 2.2.1.6 {
EXPLAIN QUERY PLAN SELECT * FROM terms WHERE +term BETWEEN 'brags' AND 'brain'
-} {/*SCAN TABLE terms VIRTUAL TABLE INDEX 0:*/}
+} {/*SCAN terms VIRTUAL TABLE INDEX 0:*/}
do_test 2.2.2.1 {
set cnt 0
@@ -335,7 +335,7 @@ foreach {tn sort orderby} {
9 1 "ORDER BY occurrences DESC"
} {
- set res {SCAN TABLE terms VIRTUAL TABLE INDEX 0:}
+ set res {SCAN terms VIRTUAL TABLE INDEX 0:}
if {$sort} { append res {*USE TEMP B-TREE FOR ORDER BY} }
set res "/*$res*/"
@@ -413,8 +413,8 @@ do_plansql_test 4.2 {
SELECT y FROM x2, terms WHERE y = term AND col = '*'
} {
QUERY PLAN
- |--SCAN TABLE x2
- `--SCAN TABLE terms VIRTUAL TABLE INDEX 1:
+ |--SCAN x2
+ `--SCAN terms VIRTUAL TABLE INDEX 1:
} {
a b c d e f g h i j k l
}
@@ -423,8 +423,8 @@ do_plansql_test 4.3 {
SELECT y FROM terms, x2 WHERE y = term AND col = '*'
} {
QUERY PLAN
- |--SCAN TABLE x2
- `--SCAN TABLE terms VIRTUAL TABLE INDEX 1:
+ |--SCAN x2
+ `--SCAN terms VIRTUAL TABLE INDEX 1:
} {
a b c d e f g h i j k l
}
@@ -433,8 +433,8 @@ do_plansql_test 4.4 {
SELECT y FROM x3, terms WHERE y = term AND col = '*'
} {
QUERY PLAN
- |--SCAN TABLE terms VIRTUAL TABLE INDEX 0:
- `--SEARCH TABLE x3 USING COVERING INDEX i1 (y=?)
+ |--SCAN terms VIRTUAL TABLE INDEX 0:
+ `--SEARCH x3 USING COVERING INDEX i1 (y=?)
} {
a b c d e f g h i j k l
}
@@ -443,8 +443,8 @@ do_plansql_test 4.5 {
SELECT y FROM terms, x3 WHERE y = term AND occurrences>1 AND col = '*'
} {
QUERY PLAN
- |--SCAN TABLE terms VIRTUAL TABLE INDEX 0:
- `--SEARCH TABLE x3 USING COVERING INDEX i1 (y=?)
+ |--SCAN terms VIRTUAL TABLE INDEX 0:
+ `--SEARCH x3 USING COVERING INDEX i1 (y=?)
} {
a k l
}
diff --git a/test/fts3corrupt6.test b/test/fts3corrupt6.test
index 5cb0a1869..8788a61d6 100644
--- a/test/fts3corrupt6.test
+++ b/test/fts3corrupt6.test
@@ -64,5 +64,3 @@ do_execsql_test 2.1 {
set sqlite_fts3_enable_parentheses $saved_sqlite_fts3_enable_parentheses
finish_test
-
-
diff --git a/test/fts3join.test b/test/fts3join.test
index f3b9b3639..9a7994193 100644
--- a/test/fts3join.test
+++ b/test/fts3join.test
@@ -97,10 +97,10 @@ do_eqp_test 4.2 {
WHERE t4.y = ?;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | `--SCAN TABLE ft4 VIRTUAL TABLE INDEX 3:
- |--SCAN TABLE t4
- `--SEARCH SUBQUERY xxxxxx AS rr USING AUTOMATIC COVERING INDEX (docid=?)
+ |--MATERIALIZE rr
+ | `--SCAN ft4 VIRTUAL TABLE INDEX 3:
+ |--SCAN t4
+ `--SEARCH rr USING AUTOMATIC COVERING INDEX (docid=?)
}
finish_test
diff --git a/test/fts3query.test b/test/fts3query.test
index ca3ee6695..70ee00529 100644
--- a/test/fts3query.test
+++ b/test/fts3query.test
@@ -119,29 +119,29 @@ do_eqp_test fts3query-4.2 {
SELECT t1.number FROM t1, ft WHERE t1.number=ft.rowid ORDER BY t1.date
} {
QUERY PLAN
- |--SCAN TABLE t1 USING COVERING INDEX i1
- `--SCAN TABLE ft VIRTUAL TABLE INDEX 1:
+ |--SCAN t1 USING COVERING INDEX i1
+ `--SCAN ft VIRTUAL TABLE INDEX 1:
}
do_eqp_test fts3query-4.3 {
SELECT t1.number FROM ft, t1 WHERE t1.number=ft.rowid ORDER BY t1.date
} {
QUERY PLAN
- |--SCAN TABLE t1 USING COVERING INDEX i1
- `--SCAN TABLE ft VIRTUAL TABLE INDEX 1:
+ |--SCAN t1 USING COVERING INDEX i1
+ `--SCAN ft VIRTUAL TABLE INDEX 1:
}
do_eqp_test fts3query-4.4 {
SELECT t1.number FROM t1, bt WHERE t1.number=bt.rowid ORDER BY t1.date
} {
QUERY PLAN
- |--SCAN TABLE t1 USING COVERING INDEX i1
- `--SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1 USING COVERING INDEX i1
+ `--SEARCH bt USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test fts3query-4.5 {
SELECT t1.number FROM bt, t1 WHERE t1.number=bt.rowid ORDER BY t1.date
} {
QUERY PLAN
- |--SCAN TABLE t1 USING COVERING INDEX i1
- `--SEARCH TABLE bt USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1 USING COVERING INDEX i1
+ `--SEARCH bt USING INTEGER PRIMARY KEY (rowid=?)
}
diff --git a/test/fts3snippet2.test b/test/fts3snippet2.test
index fc3994189..607b01e0f 100644
--- a/test/fts3snippet2.test
+++ b/test/fts3snippet2.test
@@ -57,4 +57,3 @@ do_execsql_test 2.2 {
set sqlite_fts3_enable_parentheses 0
finish_test
-
diff --git a/test/fts4upfrom.test b/test/fts4upfrom.test
index b1b43a037..889b64ad6 100644
--- a/test/fts4upfrom.test
+++ b/test/fts4upfrom.test
@@ -137,4 +137,3 @@ foreach {tn create_table} {
}
finish_test
-
diff --git a/test/fuzzcheck.c b/test/fuzzcheck.c
index b1117ce37..cb8509e23 100644
--- a/test/fuzzcheck.c
+++ b/test/fuzzcheck.c
@@ -735,7 +735,7 @@ static int progress_handler(void *pClientData) {
** "PRAGMA parser_trace" since they can dramatically increase the
** amount of output without actually testing anything useful.
**
-** Also block ATTACH and DETACH
+** Also block ATTACH if attaching a file from the filesystem.
*/
static int block_troublesome_sql(
void *Notused,
@@ -750,13 +750,15 @@ static int block_troublesome_sql(
(void)zArg3;
(void)zArg4;
if( eCode==SQLITE_PRAGMA ){
- if( sqlite3_strnicmp("vdbe_", zArg1, 5)==0
- || sqlite3_stricmp("parser_trace", zArg1)==0
- || sqlite3_stricmp("temp_store_directory", zArg1)==0
- ){
- return SQLITE_DENY;
- }
- if( sqlite3_stricmp("oom",zArg1)==0 && zArg2!=0 && zArg2[0]!=0 ){
+ if( eVerbosity==0 ){
+ if( sqlite3_strnicmp("vdbe_", zArg1, 5)==0
+ || sqlite3_stricmp("parser_trace", zArg1)==0
+ || sqlite3_stricmp("temp_store_directory", zArg1)==0
+ ){
+ return SQLITE_DENY;
+ }
+ }else if( sqlite3_stricmp("oom",zArg1)==0
+ && zArg2!=0 && zArg2[0]!=0 ){
oomCounter = atoi(zArg2);
}
}else if( eCode==SQLITE_ATTACH ){
diff --git a/test/hook.test b/test/hook.test
index 0b72b2dcf..1dba87f27 100644
--- a/test/hook.test
+++ b/test/hook.test
@@ -1015,4 +1015,3 @@ do_catchsql_test 12.6 {
} {1 {UNIQUE constraint failed: t4.a}}
finish_test
-
diff --git a/test/in4.test b/test/in4.test
index bbb32d8a7..de8c2d6db 100644
--- a/test/in4.test
+++ b/test/in4.test
@@ -330,7 +330,7 @@ do_execsql_test in4-6.1 {
do_execsql_test in4-6.1-eqp {
EXPLAIN QUERY PLAN
SELECT * FROM t6a, t6b WHERE a=3 AND b IN (c);
-} {~/SCAN TABLE t6a/}
+} {~/SCAN t6a/}
do_execsql_test in4-6.2 {
SELECT * FROM t6a, t6b WHERE a=3 AND c IN (b);
} {3 4 4 44}
diff --git a/test/index6.test b/test/index6.test
index d38569258..d22c4d47d 100644
--- a/test/index6.test
+++ b/test/index6.test
@@ -158,7 +158,7 @@ do_test index6-2.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a=5;
}
-} {/.* TABLE t2 USING INDEX t2a1 .*/}
+} {/(SEARCH|SCAN) t2 USING INDEX t2a1 /}
ifcapable stat4 {
execsql ANALYZE
do_test index6-2.3stat4 {
@@ -166,21 +166,21 @@ ifcapable stat4 {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a IS NOT NULL;
}
- } {/.* TABLE t2 USING INDEX t2a1 .*/}
+ } {/(SEARCH|SCAN) t2 USING INDEX t2a1 /}
} else {
do_test index6-2.3stat4 {
execsql {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a IS NOT NULL AND a>0;
}
- } {/.* TABLE t2 USING INDEX t2a1 .*/}
+ } {/(SEARCH|SCANE) t2 USING INDEX t2a1 /}
}
do_test index6-2.4 {
execsql {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a IS NULL;
}
-} {~/.*INDEX t2a1.*/}
+} {~/INDEX t2a1/}
do_execsql_test index6-2.101 {
DROP INDEX t2a1;
@@ -319,8 +319,8 @@ do_eqp_test index6-8.1 {
SELECT * FROM t8a LEFT JOIN t8b ON (x = 'value' AND y = a)
} {
QUERY PLAN
- |--SCAN TABLE t8a
- `--SEARCH TABLE t8b USING INDEX i8c (y=?)
+ |--SCAN t8a
+ `--SEARCH t8b USING INDEX i8c (y=?)
}
do_execsql_test index6-8.2 {
diff --git a/test/index7.test b/test/index7.test
index 084e8c3c7..eeb36bab5 100644
--- a/test/index7.test
+++ b/test/index7.test
@@ -113,7 +113,7 @@ do_execsql_test index7-1.7 {
do_execsql_test index7-1.7eqp {
EXPLAIN QUERY PLAN
SELECT b FROM t1 WHERE a NOT LIKE 'abc%' AND a=7 ORDER BY +b;
-} {/SEARCH TABLE t1 USING COVERING INDEX bad1 /}
+} {/SEARCH t1 USING COVERING INDEX bad1 /}
do_execsql_test index7-1.8 {
DELETE FROM t1 WHERE c>=101;
DROP INDEX IF EXISTS bad1;
@@ -202,28 +202,28 @@ do_test index7-2.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a=5;
}
-} {/.* TABLE t2 USING COVERING INDEX t2a1 .*/}
+} {/(SCAN|SEARCH) t2 USING COVERING INDEX t2a1 /}
ifcapable stat4 {
do_test index7-2.3stat4 {
execsql {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a IS NOT NULL;
}
- } {/.* TABLE t2 USING COVERING INDEX t2a1 .*/}
+ } {/(SCAN|SEARCH) t2 USING COVERING INDEX t2a1 /}
} else {
do_test index7-2.3stat4 {
execsql {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a IS NOT NULL AND a>0;
}
- } {/.* TABLE t2 USING COVERING INDEX t2a1 .*/}
+ } {/(SCAN|SEARCH) t2 USING COVERING INDEX t2a1 /}
}
do_test index7-2.4 {
execsql {
EXPLAIN QUERY PLAN
SELECT * FROM t2 WHERE a IS NULL;
}
-} {~/.*INDEX t2a1.*/}
+} {~/INDEX t2a1/}
do_execsql_test index7-2.101 {
DROP INDEX t2a1;
@@ -321,7 +321,7 @@ do_execsql_test index7-6.3 {
}
do_eqp_test index7-6.4 {
SELECT * FROM v4 WHERE d='xyz' AND c='def'
-} {SEARCH TABLE t4 USING INDEX i4 (c=?)}
+} {SEARCH t4 USING INDEX i4 (c=?)}
do_catchsql_test index7-6.5 {
CREATE INDEX t5a ON t5(a) WHERE a=#1;
@@ -349,7 +349,7 @@ do_execsql_test index7-8.1 {
INSERT INTO t1(x) VALUES(1),(2);
ANALYZE;
EXPLAIN QUERY PLAN SELECT 1 FROM t1 WHERE y=5;
-} {/SEARCH TABLE t1 USING COVERING INDEX t1y/}
+} {/SEARCH t1 USING COVERING INDEX t1y/}
finish_test
diff --git a/test/index8.test b/test/index8.test
index bb5822852..41ccf4bbc 100644
--- a/test/index8.test
+++ b/test/index8.test
@@ -41,7 +41,7 @@ do_execsql_test 1.0 {
do_execsql_test 1.0eqp {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE c=4 ORDER BY a, b LIMIT 2;
-} {/SCAN TABLE t1 USING INDEX t1abc/}
+} {/SCAN t1 USING INDEX t1abc/}
# If we change the index so that it no longer covers the WHERE clause,
# then we should (correctly) revert to using a table scan.
diff --git a/test/indexedby.test b/test/indexedby.test
index 41a52d822..6a371112b 100644
--- a/test/indexedby.test
+++ b/test/indexedby.test
@@ -42,16 +42,16 @@ proc EQP {sql} {
#
do_eqp_test indexedby-1.2 {
select * from t1 WHERE a = 10;
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test indexedby-1.3 {
select * from t1 ;
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test indexedby-1.4 {
select * from t1, t2 WHERE c = 10;
} {
QUERY PLAN
- |--SEARCH TABLE t2 USING INDEX i3 (c=?)
- `--SCAN TABLE t1
+ |--SEARCH t2 USING INDEX i3 (c=?)
+ `--SCAN t1
}
# Parser tests. Test that an INDEXED BY or NOT INDEX clause can be
@@ -118,21 +118,21 @@ do_test indexedby-2.7 {
#
do_eqp_test indexedby-3.1 {
SELECT * FROM t1 WHERE a = 'one' AND b = 'two'
-} {/SEARCH TABLE t1 USING INDEX/}
+} {/SEARCH t1 USING INDEX/}
do_eqp_test indexedby-3.1.1 {
SELECT * FROM t1 NOT INDEXED WHERE a = 'one' AND b = 'two'
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test indexedby-3.1.2 {
SELECT * FROM t1 NOT INDEXED WHERE rowid=1
-} {/SEARCH TABLE t1 USING INTEGER PRIMARY KEY .rowid=/}
+} {/SEARCH t1 USING INTEGER PRIMARY KEY .rowid=/}
do_eqp_test indexedby-3.2 {
SELECT * FROM t1 INDEXED BY i1 WHERE a = 'one' AND b = 'two'
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test indexedby-3.3 {
SELECT * FROM t1 INDEXED BY i2 WHERE a = 'one' AND b = 'two'
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
do_test indexedby-3.4 {
catchsql { SELECT * FROM t1 INDEXED BY i2 WHERE a = 'one' }
} {0 {}}
@@ -148,10 +148,10 @@ do_test indexedby-3.7 {
do_eqp_test indexedby-3.8 {
SELECT * FROM t3 INDEXED BY sqlite_autoindex_t3_1 ORDER BY e
-} {SCAN TABLE t3 USING INDEX sqlite_autoindex_t3_1}
+} {SCAN t3 USING INDEX sqlite_autoindex_t3_1}
do_eqp_test indexedby-3.9 {
SELECT * FROM t3 INDEXED BY sqlite_autoindex_t3_1 WHERE e = 10
-} {SEARCH TABLE t3 USING INDEX sqlite_autoindex_t3_1 (e=?)}
+} {SEARCH t3 USING INDEX sqlite_autoindex_t3_1 (e=?)}
do_test indexedby-3.10 {
catchsql { SELECT * FROM t3 INDEXED BY sqlite_autoindex_t3_1 WHERE f = 10 }
} {0 {}}
@@ -165,15 +165,15 @@ do_eqp_test indexedby-4.1 {
SELECT * FROM t1, t2 WHERE a = c
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SEARCH TABLE t2 USING INDEX i3 (c=?)
+ |--SCAN t1
+ `--SEARCH t2 USING INDEX i3 (c=?)
}
do_eqp_test indexedby-4.2 {
SELECT * FROM t1 INDEXED BY i1, t2 WHERE a = c
} {
QUERY PLAN
- |--SCAN TABLE t1 USING INDEX i1
- `--SEARCH TABLE t2 USING INDEX i3 (c=?)
+ |--SCAN t1 USING INDEX i1
+ `--SEARCH t2 USING INDEX i3 (c=?)
}
do_test indexedby-4.3 {
catchsql {
@@ -193,10 +193,10 @@ do_test indexedby-4.4 {
do_execsql_test indexedby-5.1 {
CREATE VIEW v2 AS SELECT * FROM t1 INDEXED BY i1 WHERE a > 5;
EXPLAIN QUERY PLAN SELECT * FROM v2
-} {/*SEARCH TABLE t1 USING INDEX i1 (a>?)*/}
+} {/*SEARCH t1 USING INDEX i1 (a>?)*/}
do_execsql_test indexedby-5.2 {
EXPLAIN QUERY PLAN SELECT * FROM v2 WHERE b = 10
-} {/*SEARCH TABLE t1 USING INDEX i1 (a>?)*/}
+} {/*SEARCH t1 USING INDEX i1 (a>?)*/}
do_test indexedby-5.3 {
execsql { DROP INDEX i1 }
catchsql { SELECT * FROM v2 }
@@ -217,10 +217,10 @@ do_test indexedby-5.5 {
#
do_eqp_test indexedby-6.1 {
SELECT * FROM t1 WHERE b = 10 ORDER BY rowid
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
do_eqp_test indexedby-6.2 {
SELECT * FROM t1 NOT INDEXED WHERE b = 10 ORDER BY rowid
-} {SCAN TABLE t1}
+} {SCAN t1}
# EVIDENCE-OF: R-40297-14464 The INDEXED BY phrase forces the SQLite
# query planner to use a particular named index on a DELETE, SELECT, or
@@ -230,19 +230,19 @@ do_eqp_test indexedby-6.2 {
#
do_eqp_test indexedby-7.1 {
DELETE FROM t1 WHERE a = 5
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test indexedby-7.2 {
DELETE FROM t1 NOT INDEXED WHERE a = 5
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test indexedby-7.3 {
DELETE FROM t1 INDEXED BY i1 WHERE a = 5
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test indexedby-7.4 {
DELETE FROM t1 INDEXED BY i1 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test indexedby-7.5 {
DELETE FROM t1 INDEXED BY i2 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
do_test indexedby-7.6 {
catchsql { DELETE FROM t1 INDEXED BY i2 WHERE a = 5}
} {0 {}}
@@ -251,19 +251,19 @@ do_test indexedby-7.6 {
#
do_eqp_test indexedby-8.1 {
UPDATE t1 SET rowid=rowid+1 WHERE a = 5
-} {SEARCH TABLE t1 USING COVERING INDEX i1 (a=?)}
+} {SEARCH t1 USING COVERING INDEX i1 (a=?)}
do_eqp_test indexedby-8.2 {
UPDATE t1 NOT INDEXED SET rowid=rowid+1 WHERE a = 5
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test indexedby-8.3 {
UPDATE t1 INDEXED BY i1 SET rowid=rowid+1 WHERE a = 5
-} {SEARCH TABLE t1 USING COVERING INDEX i1 (a=?)}
+} {SEARCH t1 USING COVERING INDEX i1 (a=?)}
do_eqp_test indexedby-8.4 {
UPDATE t1 INDEXED BY i1 SET rowid=rowid+1 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+} {SEARCH t1 USING INDEX i1 (a=?)}
do_eqp_test indexedby-8.5 {
UPDATE t1 INDEXED BY i2 SET rowid=rowid+1 WHERE a = 5 AND b = 10
-} {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+} {SEARCH t1 USING INDEX i2 (b=?)}
do_test indexedby-8.6 {
catchsql { UPDATE t1 INDEXED BY i2 SET rowid=rowid+1 WHERE a = 5}
} {0 {}}
@@ -338,7 +338,7 @@ do_execsql_test 11.4 {
} {1 1 3}
do_eqp_test 11.5 {
SELECT a,b,rowid FROM x1 INDEXED BY x1i WHERE a=1 AND b=1 AND rowid='3.0';
-} {SEARCH TABLE x1 USING COVERING INDEX x1i (a=? AND b=? AND rowid=?)}
+} {SEARCH x1 USING COVERING INDEX x1i (a=? AND b=? AND rowid=?)}
do_execsql_test 11.6 {
CREATE TABLE x2(c INTEGER PRIMARY KEY, a, b TEXT);
@@ -359,7 +359,7 @@ do_execsql_test 11.9 {
} {1 1 3}
do_eqp_test 11.10 {
SELECT a,b,c FROM x2 INDEXED BY x2i WHERE a=1 AND b=1 AND c='3.0';
-} {SEARCH TABLE x2 USING COVERING INDEX x2i (a=? AND b=? AND rowid=?)}
+} {SEARCH x2 USING COVERING INDEX x2i (a=? AND b=? AND rowid=?)}
#-------------------------------------------------------------------------
# Check INDEXED BY works (throws an exception) with partial indexes that
diff --git a/test/indexexpr1.test b/test/indexexpr1.test
index 19c257350..a31b87695 100644
--- a/test/indexexpr1.test
+++ b/test/indexexpr1.test
@@ -97,14 +97,14 @@ do_execsql_test indexexpr1-170 {
do_execsql_test indexexpr1-170eqp {
EXPLAIN QUERY PLAN
SELECT length(a) FROM t1 ORDER BY length(a);
-} {/SCAN TABLE t1 USING INDEX t1alen/}
+} {/SCAN t1 USING INDEX t1alen/}
do_execsql_test indexexpr1-171 {
SELECT length(a) FROM t1 ORDER BY length(a) DESC;
} {52 38 29 27 25 20}
do_execsql_test indexexpr1-171eqp {
EXPLAIN QUERY PLAN
SELECT length(a) FROM t1 ORDER BY length(a) DESC;
-} {/SCAN TABLE t1 USING INDEX t1alen/}
+} {/SCAN t1 USING INDEX t1alen/}
do_execsql_test indexexpr1-200 {
DROP TABLE t1;
diff --git a/test/indexexpr2.test b/test/indexexpr2.test
index 35caef3c2..8c1171e03 100644
--- a/test/indexexpr2.test
+++ b/test/indexexpr2.test
@@ -93,7 +93,7 @@ ifcapable json1 {
ORDER BY json_extract(x, '$.b') COLLATE nocase;
} [string map {"\n " \n} {
QUERY PLAN
- |--SCAN TABLE t2
+ |--SCAN t2
`--USE TEMP B-TREE FOR GROUP BY
}]
@@ -108,7 +108,7 @@ ifcapable json1 {
ORDER BY json_extract(x, '$.b') COLLATE nocase;
} [string map {"\n " \n} {
QUERY PLAN
- |--SEARCH TABLE t3 USING INDEX i3 (<expr>=?)
+ |--SEARCH t3 USING INDEX i3 (<expr>=?)
`--USE TEMP B-TREE FOR GROUP BY
}]
}
@@ -154,7 +154,7 @@ do_execsql_test 3.4.5 {
do_execsql_test 3.4.5eqp {
EXPLAIN QUERY PLAN
SELECT * FROM t4 ORDER BY Substr(a,-2) COLLATE nocase;
-} {/SCAN TABLE t4 USING INDEX i4/}
+} {/SCAN t4 USING INDEX i4/}
do_execsql_test 3.4.6 {
SELECT * FROM t4 ORDER BY Substr(a,-2) COLLATE binary;
} {.ABC1 1 .ABC3 3 .abc2 2 .abc4 4}
@@ -265,7 +265,7 @@ do_execsql_test 6.1.2 {
} {1 123 2 123 3 123abc 4 123.0}
do_eqp_test 6.1.3 {
SELECT a, b FROM x1 WHERE CAST(b AS INTEGER) = 123;
-} {SEARCH TABLE x1 USING INDEX x1i (<expr>=?)}
+} {SEARCH x1 USING INDEX x1i (<expr>=?)}
do_execsql_test 6.2.1 {
SELECT a, b FROM x1 WHERE CAST(b AS TEXT) = 123;
@@ -276,7 +276,7 @@ do_execsql_test 6.2.2 {
} {1 123 2 123}
do_eqp_test 6.2.3 {
SELECT a, b FROM x1 WHERE CAST(b AS TEXT) = 123;
-} {SEARCH TABLE x1 USING INDEX x1i2 (<expr>=?)}
+} {SEARCH x1 USING INDEX x1i2 (<expr>=?)}
do_execsql_test 7.0 {
CREATE TABLE IF NOT EXISTS t0(c0);
diff --git a/test/intpkey.test b/test/intpkey.test
index a56cab4c6..d6b8833a2 100644
--- a/test/intpkey.test
+++ b/test/intpkey.test
@@ -129,7 +129,7 @@ do_test intpkey-1.12.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE a==4;
}
-} {/SEARCH TABLE t1 /}
+} {/SEARCH t1 /}
# Try to insert a non-integer value into the primary key field. This
# should result in a data type mismatch.
diff --git a/test/join2.test b/test/join2.test
index f004fda07..170000ca2 100644
--- a/test/join2.test
+++ b/test/join2.test
@@ -113,16 +113,16 @@ do_eqp_test 3.1 {
SELECT v2 FROM t1 LEFT JOIN t2 USING (k2) LEFT JOIN t3_1 USING (k3);
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test 3.2 {
SELECT v2 FROM t1 LEFT JOIN t2 USING (k2) LEFT JOIN t3_2 USING (k3);
} {
QUERY PLAN
- |--SCAN TABLE t1
- `--SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t1
+ `--SEARCH t2 USING INTEGER PRIMARY KEY (rowid=?)
}
#-------------------------------------------------------------------------
@@ -161,16 +161,16 @@ do_eqp_test 4.1.5 {
SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v2);
} {
QUERY PLAN
- |--SCAN TABLE c1
- |--SEARCH TABLE c2 USING INTEGER PRIMARY KEY (rowid=?)
- `--SEARCH TABLE c3 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN c1
+ |--SEARCH c2 USING INTEGER PRIMARY KEY (rowid=?)
+ `--SEARCH c3 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test 4.1.6 {
SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v1+1);
} {
QUERY PLAN
- |--SCAN TABLE c1
- `--SEARCH TABLE c3 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN c1
+ `--SEARCH c3 USING INTEGER PRIMARY KEY (rowid=?)
}
do_execsql_test 4.2.0 {
@@ -208,16 +208,16 @@ do_eqp_test 4.2.5 {
SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v2);
} {
QUERY PLAN
- |--SCAN TABLE c1
- |--SEARCH TABLE c2 USING INDEX sqlite_autoindex_c2_1 (k=?)
- `--SEARCH TABLE c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
+ |--SCAN c1
+ |--SEARCH c2 USING INDEX sqlite_autoindex_c2_1 (k=?)
+ `--SEARCH c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
}
do_eqp_test 4.2.6 {
SELECT v1, v3 FROM c1 LEFT JOIN c2 ON (c2.k=v1) LEFT JOIN c3 ON (c3.k=v1+1);
} {
QUERY PLAN
- |--SCAN TABLE c1
- `--SEARCH TABLE c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
+ |--SCAN c1
+ `--SEARCH c3 USING INDEX sqlite_autoindex_c3_1 (k=?)
}
# 2017-11-23 (Thanksgiving day)
@@ -251,11 +251,11 @@ do_execsql_test 5.0 {
}
do_eqp_test 5.1 {
SELECT s1.a FROM s1 left join s2 using (a);
-} {SCAN TABLE s1}
+} {SCAN s1}
do_eqp_test 5.2 {
SELECT s1.a FROM s1 left join s3 using (a);
-} {SCAN TABLE s1}
+} {SCAN s1}
do_execsql_test 6.0 {
CREATE TABLE u1(a INTEGER PRIMARY KEY, b, c);
@@ -264,7 +264,7 @@ do_execsql_test 6.0 {
}
do_eqp_test 6.1 {
SELECT u2.* FROM u2 LEFT JOIN u1 ON( u1.a=u2.a AND u1.b=u2.b AND u1.c=u2.c );
-} {SCAN TABLE u2}
+} {SCAN u2}
db close
sqlite3 db :memory:
diff --git a/test/join5.test b/test/join5.test
index 6724419e6..e2ff2f6c2 100644
--- a/test/join5.test
+++ b/test/join5.test
@@ -277,12 +277,12 @@ do_eqp_test 7.2 {
);
} {
QUERY PLAN
- |--SCAN TABLE t1
+ |--SCAN t1
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t2 USING INDEX t2xy (x=? AND y=?)
+ | `--SEARCH t2 USING INDEX t2xy (x=? AND y=?)
`--INDEX 2
- `--SEARCH TABLE t2 USING INDEX t2xy (x=? AND y=?)
+ `--SEARCH t2 USING INDEX t2xy (x=? AND y=?)
}
do_execsql_test 7.3 {
@@ -302,8 +302,8 @@ do_eqp_test 7.4 {
SELECT * FROM t3 LEFT JOIN t4 ON (t4.x = t3.x) WHERE (t4.y = ? OR t4.z = ?);
} {
QUERY PLAN
- |--SCAN TABLE t3
- `--SEARCH TABLE t4 USING INDEX t4xz (x=?)
+ |--SCAN t3
+ `--SEARCH t4 USING INDEX t4xz (x=?)
}
reset_db
diff --git a/test/like.test b/test/like.test
index 8ea7cff78..ba9c15afc 100644
--- a/test/like.test
+++ b/test/like.test
@@ -168,13 +168,13 @@ proc queryplan {sql} {
set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
# puts eqp=$eqp
foreach {a b c x} $eqp {
- if {[regexp { TABLE (\w+ AS )?(\w+) USING COVERING INDEX (\w+)\y} \
- $x all as tab idx]} {
+ if {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING COVERING INDEX (\w+)\y} \
+ $x all ss as tab idx]} {
lappend data {} $idx
- } elseif {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
- $x all as tab idx]} {
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+ $x all ss as tab idx]} {
lappend data $tab $idx
- } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
lappend data $tab *
}
}
@@ -726,7 +726,7 @@ ifcapable like_opt&&!icu {
set res [sqlite3_exec_hex db {
EXPLAIN QUERY PLAN SELECT x FROM t2 WHERE x LIKE '%ff%25'
}]
- regexp {SCAN TABLE t2} $res
+ regexp {SCAN t2} $res
} {1}
}
do_test like-9.5.1 {
diff --git a/test/like3.test b/test/like3.test
index 3bfe30c31..a93e113d6 100644
--- a/test/like3.test
+++ b/test/like3.test
@@ -125,7 +125,7 @@ do_eqp_test like3-5.101 {
SELECT x FROM t5a WHERE x LIKE '/%';
} {
QUERY PLAN
- `--SCAN TABLE t5a
+ `--SCAN t5a
}
do_execsql_test like3-5.110 {
SELECT x FROM t5a WHERE x LIKE '/a%';
@@ -135,7 +135,7 @@ do_eqp_test like3-5.111 {
SELECT x FROM t5a WHERE x LIKE '/a%';
} {
QUERY PLAN
- `--SEARCH TABLE t5a USING COVERING INDEX sqlite_autoindex_t5a_1 (x>? AND x<?)
+ `--SEARCH t5a USING COVERING INDEX sqlite_autoindex_t5a_1 (x>? AND x<?)
}
}
do_execsql_test like3-5.120 {
@@ -145,7 +145,7 @@ do_eqp_test like3-5.121 {
SELECT x FROM t5a WHERE x LIKE '^12%' ESCAPE '^';
} {
QUERY PLAN
- `--SCAN TABLE t5a
+ `--SCAN t5a
}
do_execsql_test like3-5.122 {
SELECT x FROM t5a WHERE x LIKE '^-2%' ESCAPE '^';
@@ -154,7 +154,7 @@ do_eqp_test like3-5.123 {
SELECT x FROM t5a WHERE x LIKE '^12%' ESCAPE '^';
} {
QUERY PLAN
- `--SCAN TABLE t5a
+ `--SCAN t5a
}
do_execsql_test like3-5.200 {
@@ -166,7 +166,7 @@ do_eqp_test like3-5.201 {
SELECT x FROM t5b WHERE x GLOB '/*';
} {
QUERY PLAN
- `--SCAN TABLE t5b
+ `--SCAN t5b
}
do_execsql_test like3-5.210 {
SELECT x FROM t5b WHERE x GLOB '/a*';
@@ -175,7 +175,7 @@ do_eqp_test like3-5.211 {
SELECT x FROM t5b WHERE x GLOB '/a*';
} {
QUERY PLAN
- `--SEARCH TABLE t5b USING COVERING INDEX sqlite_autoindex_t5b_1 (x>? AND x<?)
+ `--SEARCH t5b USING COVERING INDEX sqlite_autoindex_t5b_1 (x>? AND x<?)
}
# 2019-05-01
@@ -234,13 +234,13 @@ do_eqp_test like3-6.110 {
SELECT * FROM t1 WHERE path LIKE 'a%';
} {
QUERY PLAN
- `--SEARCH TABLE t1 USING PRIMARY KEY (path>? AND path<?)
+ `--SEARCH t1 USING PRIMARY KEY (path>? AND path<?)
}
do_eqp_test like3-6.120 {
SELECT * FROM t1 WHERE path LIKE 'a%' ESCAPE 'x';
} {
QUERY PLAN
- `--SEARCH TABLE t1 USING PRIMARY KEY (path>? AND path<?)
+ `--SEARCH t1 USING PRIMARY KEY (path>? AND path<?)
}
do_execsql_test like3-6.200 {
DROP TABLE IF EXISTS t2;
@@ -252,26 +252,26 @@ do_eqp_test like3-6.210 {
SELECT * FROM t2 WHERE path LIKE 'a%';
} {
QUERY PLAN
- `--SEARCH TABLE t2 USING INDEX t2path (path>? AND path<?)
+ `--SEARCH t2 USING INDEX t2path (path>? AND path<?)
}
do_eqp_test like3-6.220 {
SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '\';
} {
QUERY PLAN
- `--SEARCH TABLE t2 USING INDEX t2path (path>? AND path<?)
+ `--SEARCH t2 USING INDEX t2path (path>? AND path<?)
}
db eval {PRAGMA case_sensitive_like=ON}
do_eqp_test like3-6.230 {
SELECT * FROM t2 WHERE path LIKE 'a%';
} {
QUERY PLAN
- `--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
+ `--SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
}
do_eqp_test like3-6.240 {
SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '\';
} {
QUERY PLAN
- `--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
+ `--SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
}
}
diff --git a/test/mallocK.test b/test/mallocK.test
index 139644d83..567a4c1f9 100644
--- a/test/mallocK.test
+++ b/test/mallocK.test
@@ -123,7 +123,7 @@ ifcapable stat4 {
SELECT DISTINCT c FROM t3 WHERE b BETWEEN '.xx..' AND '.xxxx';
} [string map {"\n " \n} {
QUERY PLAN
- |--SEARCH TABLE t3 USING INDEX i3 (ANY(a) AND b>? AND b<?)
+ |--SEARCH t3 USING INDEX i3 (ANY(a) AND b>? AND b<?)
`--USE TEMP B-TREE FOR DISTINCT
}]
}
diff --git a/test/misc7.test b/test/misc7.test
index 25f96af34..368a8c278 100644
--- a/test/misc7.test
+++ b/test/misc7.test
@@ -280,19 +280,19 @@ ifcapable explain {
SELECT * FROM abc AS t2 WHERE rowid = 1;
} {
QUERY PLAN
- `--SEARCH TABLE abc AS t2 USING INTEGER PRIMARY KEY (rowid=?)
+ `--SEARCH abc AS t2 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test misc7-14.2 {
SELECT * FROM abc AS t2 WHERE a = 1;
} {
QUERY PLAN
- `--SEARCH TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1 (a=?)
+ `--SEARCH abc AS t2 USING INDEX sqlite_autoindex_abc_1 (a=?)
}
do_eqp_test misc7-14.3 {
SELECT * FROM abc AS t2 ORDER BY a;
} {
QUERY PLAN
- `--SCAN TABLE abc AS t2 USING INDEX sqlite_autoindex_abc_1
+ `--SCAN abc AS t2 USING INDEX sqlite_autoindex_abc_1
}
}
diff --git a/test/notnull2.test b/test/notnull2.test
index 9ae190fe1..f9dfc0b30 100644
--- a/test/notnull2.test
+++ b/test/notnull2.test
@@ -98,4 +98,3 @@ do_execsql_test 2.1 {
}
finish_test
-
diff --git a/test/notnullfault.test b/test/notnullfault.test
index bf05dba9c..0db8e4adb 100644
--- a/test/notnullfault.test
+++ b/test/notnullfault.test
@@ -53,4 +53,3 @@ do_faultsim_test 2.1 -faults oom-t* -prep {
}
finish_test
-
diff --git a/test/nulls1.test b/test/nulls1.test
index b794f35b0..c44d0af25 100644
--- a/test/nulls1.test
+++ b/test/nulls1.test
@@ -184,7 +184,7 @@ do_eqp_test 5.3 {
SELECT * FROM t4 WHERE a IN (1, 2, 3) ORDER BY a, b NULLS LAST
} {
QUERY PLAN
- `--SEARCH TABLE t4 USING INDEX t4ab (a=?)
+ `--SEARCH t4 USING INDEX t4ab (a=?)
}
do_execsql_test 5.4 {
@@ -198,7 +198,7 @@ do_eqp_test 5.5 {
SELECT * FROM t4 WHERE a IN (1, 2, 3) ORDER BY a DESC, b DESC NULLS FIRST
} {
QUERY PLAN
- `--SEARCH TABLE t4 USING INDEX t4ab (a=?)
+ `--SEARCH t4 USING INDEX t4ab (a=?)
}
#-------------------------------------------------------------------------
@@ -224,7 +224,7 @@ do_eqp_test 6.1.2 {
SELECT a,b FROM t5 WHERE a=1 ORDER BY b NULLS LAST, c;
} {
QUERY PLAN
- `--SEARCH TABLE t5 USING COVERING INDEX t5ab (a=?)
+ `--SEARCH t5 USING COVERING INDEX t5ab (a=?)
}
do_execsql_test 6.2.1 {
SELECT a,b FROM t5 WHERE a=1 ORDER BY b DESC NULLS FIRST, c DESC
@@ -233,7 +233,7 @@ do_eqp_test 6.2.2 {
SELECT a,b FROM t5 WHERE a=1 ORDER BY b DESC NULLS FIRST, c DESC
} {
QUERY PLAN
- `--SEARCH TABLE t5 USING COVERING INDEX t5ab (a=?)
+ `--SEARCH t5 USING COVERING INDEX t5ab (a=?)
}
#-------------------------------------------------------------------------
@@ -294,7 +294,7 @@ do_execsql_test 9.3 {
do_eqp_test 9.4 {
SELECT c1, c2, ifnull(c3, 'NULL') FROM v0
WHERE c2=10 ORDER BY c1, c3 NULLS LAST
-} {SEARCH TABLE v0 USING COVERING INDEX v3 (ANY(c1) AND c2=?)}
+} {SEARCH v0 USING COVERING INDEX v3 (ANY(c1) AND c2=?)}
# 2020-03-01 ticket e12a0ae526bb51c7
diff --git a/test/orderby1.test b/test/orderby1.test
index 5152ffaf8..9b5df4c75 100644
--- a/test/orderby1.test
+++ b/test/orderby1.test
@@ -516,7 +516,7 @@ do_eqp_test 8.1 {
SELECT * FROM t1 ORDER BY a, b;
} {
QUERY PLAN
- |--SCAN TABLE t1 USING INDEX i1
+ |--SCAN t1 USING INDEX i1
`--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
}
diff --git a/test/returning1.test b/test/returning1.test
index 3c1253681..5044e53b0 100644
--- a/test/returning1.test
+++ b/test/returning1.test
@@ -116,4 +116,3 @@ do_execsql_test 5.5 {
} {123}
finish_test
-
diff --git a/test/rollback2.test b/test/rollback2.test
index 70aecc337..21ebdeaca 100644
--- a/test/rollback2.test
+++ b/test/rollback2.test
@@ -101,7 +101,7 @@ do_rollback_test 2.2 -setup {
#
do_eqp_test 3.1 {
SELECT i FROM t1 WHERE (i%2)==0 ORDER BY h DESC;
-} {SCAN TABLE t1 USING INDEX i1}
+} {SCAN t1 USING INDEX i1}
do_rollback_test 3.2 -setup {
BEGIN;
DELETE FROM t1 WHERE (i%2)==1;
@@ -131,7 +131,7 @@ do_execsql_test 4.1 { UPDATE t1 SET h = $leader || h; }
do_eqp_test 4.2 {
SELECT i FROM t1 WHERE (i%2)==0 ORDER BY h ASC;
-} {SCAN TABLE t1 USING INDEX i1}
+} {SCAN t1 USING INDEX i1}
do_rollback_test 4.3 -setup {
BEGIN;
DELETE FROM t1 WHERE (i%2)==1;
diff --git a/test/rowvalue.test b/test/rowvalue.test
index 91a59e71c..79cde6276 100644
--- a/test/rowvalue.test
+++ b/test/rowvalue.test
@@ -175,19 +175,19 @@ do_execsql_test 7.0 {
foreach {tn sql res eqp} {
1 "SELECT * FROM xy WHERE (i, j) IS (2, 2)" {2 2 2}
- "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid=?)"
+ "SEARCH xy USING INTEGER PRIMARY KEY (rowid=?)"
2 "SELECT * FROM xy WHERE (k, j) < (2, 3)" {1 1 1 2 2 2}
- "SCAN TABLE xy"
+ "SCAN xy"
3 "SELECT * FROM xy WHERE (i, j) < (2, 3)" {1 1 1 2 2 2}
- "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid<?)"
+ "SEARCH xy USING INTEGER PRIMARY KEY (rowid<?)"
4 "SELECT * FROM xy WHERE (i, j) > (2, 1)" {2 2 2 3 3 3 4 4 4}
- "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid>?)"
+ "SEARCH xy USING INTEGER PRIMARY KEY (rowid>?)"
5 "SELECT * FROM xy WHERE (i, j) > ('2', 1)" {2 2 2 3 3 3 4 4 4}
- "SEARCH TABLE xy USING INTEGER PRIMARY KEY (rowid>?)"
+ "SEARCH xy USING INTEGER PRIMARY KEY (rowid>?)"
} {
do_eqp_test 7.$tn.1 $sql $eqp
@@ -657,4 +657,10 @@ do_catchsql_test 28.10 {
DELETE FROM t0;
} {1 {sub-select returns 2 columns - expected 1}}
+# 2021-03-19
+# dbsqlfuzz find of a NEVER().
+do_catchsql_test 29.1 {
+ SELECT (SELECT 1 WHERE ((SELECT 1 WHERE (2,(2,0)) IS (2,(20))),(2,0)) IS (2,(20))) WHERE (2,(2,0)) IS (2 IN(SELECT 1 WHERE (2,(2,2,0)) IS (2,(20))),(20));
+} {1 {row value misused}}
+
finish_test
diff --git a/test/rowvalue4.test b/test/rowvalue4.test
index 2929a97d1..784859cb1 100644
--- a/test/rowvalue4.test
+++ b/test/rowvalue4.test
@@ -185,31 +185,31 @@ ifcapable stat4 {
}
do_eqp_test 3.1.1 { SELECT * FROM c1 WHERE a=1 AND c=2 } \
- {SEARCH TABLE c1 USING INDEX c1cd (c=?)}
+ {SEARCH c1 USING INDEX c1cd (c=?)}
do_eqp_test 3.1.2 { SELECT * FROM c1 WHERE a=1 AND b>'d' AND c=2 } \
- {SEARCH TABLE c1 USING INDEX c1cd (c=?)}
+ {SEARCH c1 USING INDEX c1cd (c=?)}
do_eqp_test 3.1.3 { SELECT * FROM c1 WHERE a=1 AND b>'l' AND c=2 } \
- {SEARCH TABLE c1 USING INDEX c1ab (a=? AND b>?)}
+ {SEARCH c1 USING INDEX c1ab (a=? AND b>?)}
do_eqp_test 3.2.1 { SELECT * FROM c1 WHERE a=1 AND c>1 } \
- {SEARCH TABLE c1 USING INDEX c1cd (c>?)}
+ {SEARCH c1 USING INDEX c1cd (c>?)}
do_eqp_test 3.2.2 { SELECT * FROM c1 WHERE a=1 AND c>0 } \
- {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+ {SEARCH c1 USING INDEX c1ab (a=?)}
do_eqp_test 3.2.3 { SELECT * FROM c1 WHERE a=1 AND c>=1 } \
- {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+ {SEARCH c1 USING INDEX c1ab (a=?)}
do_eqp_test 3.2.4 { SELECT * FROM c1 WHERE a=1 AND (c, d)>(1, 'c') } \
- {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+ {SEARCH c1 USING INDEX c1ab (a=?)}
do_eqp_test 3.2.5 { SELECT * FROM c1 WHERE a=1 AND (c, d)>(1, 'o') } \
- {SEARCH TABLE c1 USING INDEX c1cd ((c,d)>(?,?))}
+ {SEARCH c1 USING INDEX c1cd ((c,d)>(?,?))}
do_eqp_test 3.2.6 { SELECT * FROM c1 WHERE a=1 AND (c, +b)>(1, 'c') } \
- {SEARCH TABLE c1 USING INDEX c1ab (a=?)}
+ {SEARCH c1 USING INDEX c1ab (a=?)}
}
@@ -234,11 +234,11 @@ do_eqp_test 5.1 {
(c) IN (SELECT y FROM d1)
} {
QUERY PLAN
- |--SEARCH TABLE d2 USING INDEX d2ab (a=? AND b=?)
+ |--SEARCH d2 USING INDEX d2ab (a=? AND b=?)
|--LIST SUBQUERY xxxxxx
- | `--SCAN TABLE d1
+ | `--SCAN d1
`--LIST SUBQUERY xxxxxx
- `--SCAN TABLE d1
+ `--SCAN d1
}
do_execsql_test 6.0 {
@@ -249,23 +249,23 @@ do_execsql_test 6.0 {
do_eqp_test 6.1 {
SELECT * FROM e1 WHERE (a, b) > (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1ab ((a,b)>(?,?))}
+} {SEARCH e1 USING INDEX e1ab ((a,b)>(?,?))}
do_eqp_test 6.2 {
SELECT * FROM e1 WHERE (a, b) < (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1ab ((a,b)<(?,?))}
+} {SEARCH e1 USING INDEX e1ab ((a,b)<(?,?))}
do_eqp_test 6.3 {
SELECT * FROM e1 WHERE c = ? AND (d, e) > (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1cde (c=? AND (d,e)>(?,?))}
+} {SEARCH e1 USING INDEX e1cde (c=? AND (d,e)>(?,?))}
do_eqp_test 6.4 {
SELECT * FROM e1 WHERE c = ? AND (d, e) < (?, ?)
-} {SEARCH TABLE e1 USING INDEX e1cde (c=? AND (d,e)<(?,?))}
+} {SEARCH e1 USING INDEX e1cde (c=? AND (d,e)<(?,?))}
do_eqp_test 6.5 {
SELECT * FROM e1 WHERE (d, e) BETWEEN (?, ?) AND (?, ?) AND c = ?
-} {SEARCH TABLE e1 USING INDEX e1cde (c=? AND (d,e)>(?,?) AND (d,e)<(?,?))}
+} {SEARCH e1 USING INDEX e1cde (c=? AND (d,e)>(?,?) AND (d,e)<(?,?))}
#-------------------------------------------------------------------------
diff --git a/test/scanstatus.test b/test/scanstatus.test
index 1b92ef3fe..46249f665 100644
--- a/test/scanstatus.test
+++ b/test/scanstatus.test
@@ -45,8 +45,8 @@ proc do_scanstatus_test {tn res} {
do_execsql_test 1.1 { SELECT count(*) FROM t1, t2; } 6
do_scanstatus_test 1.2 {
- nLoop 1 nVisit 2 nEst 1048576.0 zName t1 zExplain {SCAN TABLE t1}
- nLoop 2 nVisit 6 nEst 1048576.0 zName t2 zExplain {SCAN TABLE t2}
+ nLoop 1 nVisit 2 nEst 1048576.0 zName t1 zExplain {SCAN t1}
+ nLoop 2 nVisit 6 nEst 1048576.0 zName t2 zExplain {SCAN t2}
}
do_execsql_test 1.3 {
@@ -54,8 +54,8 @@ do_execsql_test 1.3 {
SELECT count(*) FROM t1, t2;
} 6
do_scanstatus_test 1.4 {
- nLoop 1 nVisit 2 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
- nLoop 2 nVisit 6 nEst 3.0 zName t2 zExplain {SCAN TABLE t2}
+ nLoop 1 nVisit 2 nEst 2.0 zName t1 zExplain {SCAN t1}
+ nLoop 2 nVisit 6 nEst 3.0 zName t2 zExplain {SCAN t2}
}
do_execsql_test 1.5 { ANALYZE }
@@ -64,8 +64,8 @@ do_execsql_test 1.6 {
} 4
do_scanstatus_test 1.7 {
nLoop 1 nVisit 2 nEst 2.0 zName t2 zExplain
- {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid>?)}
- nLoop 2 nVisit 4 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
+ {SEARCH t2 USING INTEGER PRIMARY KEY (rowid>?)}
+ nLoop 2 nVisit 4 nEst 2.0 zName t1 zExplain {SCAN t1}
}
do_execsql_test 1.8 {
@@ -74,8 +74,8 @@ do_execsql_test 1.8 {
do_scanstatus_test 1.9 {
nLoop 2 nVisit 4 nEst 2.0 zName t2 zExplain
- {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid>?)}
- nLoop 4 nVisit 8 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
+ {SEARCH t2 USING INTEGER PRIMARY KEY (rowid>?)}
+ nLoop 4 nVisit 8 nEst 2.0 zName t1 zExplain {SCAN t1}
}
do_test 1.9 {
@@ -84,8 +84,8 @@ do_test 1.9 {
do_scanstatus_test 1.10 {
nLoop 0 nVisit 0 nEst 2.0 zName t2 zExplain
- {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid>?)}
- nLoop 0 nVisit 0 nEst 2.0 zName t1 zExplain {SCAN TABLE t1}
+ {SEARCH t2 USING INTEGER PRIMARY KEY (rowid>?)}
+ nLoop 0 nVisit 0 nEst 2.0 zName t1 zExplain {SCAN t1}
}
#-------------------------------------------------------------------------
@@ -105,7 +105,7 @@ do_execsql_test 2.1 {
do_scanstatus_test 2.2 {
nLoop 1 nVisit 1 nEst 1.0 zName x1
- zExplain {SEARCH TABLE x1 USING INTEGER PRIMARY KEY (rowid=?)}
+ zExplain {SEARCH x1 USING INTEGER PRIMARY KEY (rowid=?)}
}
do_execsql_test 2.3.1 {
@@ -113,7 +113,7 @@ do_execsql_test 2.3.1 {
} {2 two}
do_scanstatus_test 2.3.2 {
nLoop 1 nVisit 1 nEst 10.0 zName x1j
- zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j=?)}
+ zExplain {SEARCH x1 USING COVERING INDEX x1j (j=?)}
}
do_execsql_test 2.4.1 {
@@ -121,7 +121,7 @@ do_execsql_test 2.4.1 {
} {4 four 1 one 3 three}
do_scanstatus_test 2.4.2 {
nLoop 1 nVisit 3 nEst 262144.0 zName x1j
- zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j<?)}
+ zExplain {SEARCH x1 USING COVERING INDEX x1j (j<?)}
}
do_execsql_test 2.5.1 {
@@ -129,7 +129,7 @@ do_execsql_test 2.5.1 {
} {2 two}
do_scanstatus_test 2.5.2 {
nLoop 1 nVisit 1 nEst 262144.0 zName x1j
- zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j>?)}
+ zExplain {SEARCH x1 USING COVERING INDEX x1j (j>?)}
}
do_execsql_test 2.6.1 {
@@ -137,7 +137,7 @@ do_execsql_test 2.6.1 {
} {3 three 2 two}
do_scanstatus_test 2.6.2 {
nLoop 1 nVisit 2 nEst 16384.0 zName x1j
- zExplain {SEARCH TABLE x1 USING COVERING INDEX x1j (j>? AND j<?)}
+ zExplain {SEARCH x1 USING COVERING INDEX x1j (j>? AND j<?)}
}
do_execsql_test 2.7.1 {
@@ -150,7 +150,7 @@ do_execsql_test 2.7.1 {
do_scanstatus_test 2.7.2 {
nLoop 1 nVisit 2 nEst 16384.0 zName x2j
- zExplain {SEARCH TABLE x2 USING INDEX x2j (j>? AND j<?)}
+ zExplain {SEARCH x2 USING INDEX x2j (j>? AND j<?)}
}
do_execsql_test 2.8.1 {
@@ -158,7 +158,7 @@ do_execsql_test 2.8.1 {
}
do_scanstatus_test 2.8.2 {
nLoop 1 nVisit 0 nEst 8.0 zName x2ij
- zExplain {SEARCH TABLE x2 USING INDEX x2ij (i=? AND j=?)}
+ zExplain {SEARCH x2 USING INDEX x2ij (i=? AND j=?)}
}
do_execsql_test 2.9.1 {
@@ -166,7 +166,7 @@ do_execsql_test 2.9.1 {
}
do_scanstatus_test 2.9.2 {
nLoop 1 nVisit 0 nEst 8.0 zName x2ij
- zExplain {SEARCH TABLE x2 USING INDEX x2ij (i=? AND j=?)}
+ zExplain {SEARCH x2 USING INDEX x2ij (i=? AND j=?)}
}
do_execsql_test 2.10.1 {
@@ -174,7 +174,7 @@ do_execsql_test 2.10.1 {
} {3 three {3 three}}
do_scanstatus_test 2.10.2 {
nLoop 1 nVisit 1 nEst 8.0 zName x2ij
- zExplain {SEARCH TABLE x2 USING INDEX x2ij (i=? AND j=?)}
+ zExplain {SEARCH x2 USING INDEX x2ij (i=? AND j=?)}
}
#-------------------------------------------------------------------------
@@ -194,9 +194,9 @@ do_execsql_test 3.2.1 {
} {4 13}
do_scanstatus_test 3.2.2 {
nLoop 1 nVisit 1 nEst 10.0 zName a1a
- zExplain {SEARCH TABLE a1 USING INDEX a1a (a=?)}
+ zExplain {SEARCH a1 USING INDEX a1a (a=?)}
nLoop 1 nVisit 1 nEst 10.0 zName a1bc
- zExplain {SEARCH TABLE a1 USING INDEX a1bc (b=?)}
+ zExplain {SEARCH a1 USING INDEX a1bc (b=?)}
}
do_execsql_test 3.2.1 {
@@ -204,9 +204,9 @@ do_execsql_test 3.2.1 {
} {30}
do_scanstatus_test 3.2.2 {
nLoop 1 nVisit 9 nEst 16384.0 zName a1a
- zExplain {SEARCH TABLE a1 USING INDEX a1a (a>? AND a<?)}
+ zExplain {SEARCH a1 USING INDEX a1a (a>? AND a<?)}
nLoop 1 nVisit 21 nEst 16384.0 zName a1bc
- zExplain {SEARCH TABLE a1 USING INDEX a1bc (b>? AND b<?)}
+ zExplain {SEARCH a1 USING INDEX a1bc (b>? AND b<?)}
}
do_execsql_test 3.3.1 {
@@ -215,9 +215,9 @@ do_execsql_test 3.3.1 {
} {90}
do_scanstatus_test 3.2.2 {
nLoop 1 nVisit 10 nEst 16384.0 zName a1bc
- zExplain {SEARCH TABLE a1 AS y USING COVERING INDEX a1bc (b>? AND b<?)}
+ zExplain {SEARCH y USING COVERING INDEX a1bc (b>? AND b<?)}
nLoop 10 nVisit 90 nEst 16384.0 zName a1a
- zExplain {SEARCH TABLE a1 AS x USING COVERING INDEX a1a (a>? AND a<?)}
+ zExplain {SEARCH x USING COVERING INDEX a1a (a>? AND a<?)}
}
do_execsql_test 3.4.1 {
@@ -225,7 +225,7 @@ do_execsql_test 3.4.1 {
} {4}
do_scanstatus_test 3.4.2 {
nLoop 1 nVisit 4 nEst 40.0 zName a1a
- zExplain {SEARCH TABLE a1 USING COVERING INDEX a1a (a=?)}
+ zExplain {SEARCH a1 USING COVERING INDEX a1a (a=?)}
}
do_execsql_test 3.4.1 {
@@ -233,7 +233,7 @@ do_execsql_test 3.4.1 {
} {4}
do_scanstatus_test 3.4.2 {
nLoop 1 nVisit 4 nEst 4.0 zName a1
- zExplain {SEARCH TABLE a1 USING INTEGER PRIMARY KEY (rowid=?)}
+ zExplain {SEARCH a1 USING INTEGER PRIMARY KEY (rowid=?)}
}
#-------------------------------------------------------------------------
@@ -266,9 +266,9 @@ do_execsql_test 4.2 {
do_execsql_test 4.2.1 { DELETE FROM p1 WHERE x=4 }
do_scanstatus_test 4.2.2 {
nLoop 1 nVisit 1 nEst 1.0 zName sqlite_autoindex_p1_1
- zExplain {SEARCH TABLE p1 USING INDEX sqlite_autoindex_p1_1 (x=?)}
+ zExplain {SEARCH p1 USING INDEX sqlite_autoindex_p1_1 (x=?)}
- nLoop 1 nVisit 3 nEst 262144.0 zName c1 zExplain {SCAN TABLE c1}
+ nLoop 1 nVisit 3 nEst 262144.0 zName c1 zExplain {SCAN c1}
}
#-------------------------------------------------------------------------
@@ -313,9 +313,9 @@ do_execsql_test 5.1.1 {
} {2}
do_scanstatus_test 5.1.2 {
nLoop 1 nVisit 10 nEst 10.0 zName t1bc
- zExplain {SCAN TABLE t1 AS ii USING COVERING INDEX t1bc}
+ zExplain {SCAN ii USING COVERING INDEX t1bc}
nLoop 1 nVisit 2 nEst 8.0 zName sqlite_autoindex_t1_1
- zExplain {SEARCH TABLE t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
+ zExplain {SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
}
do_execsql_test 5.2.1 {
@@ -323,51 +323,51 @@ do_execsql_test 5.2.1 {
} {2}
do_scanstatus_test 5.2.2 {
nLoop 1 nVisit 2 nEst 2.0 zName sqlite_autoindex_t1_1
- zExplain {SEARCH TABLE t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
+ zExplain {SEARCH t1 USING COVERING INDEX sqlite_autoindex_t1_1 (a=?)}
}
do_eqp_test 5.3.1 {
SELECT count(*) FROM t2 WHERE y = 'j';
-} {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
+} {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
do_execsql_test 5.3.2 {
SELECT count(*) FROM t2 WHERE y = 'j';
} {19}
do_scanstatus_test 5.3.3 {
nLoop 1 nVisit 19 nEst 56.0 zName t2xy zExplain
- {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
+ {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
}
do_eqp_test 5.4.1 {
SELECT count(*) FROM t1, t2 WHERE y = c;
} {
QUERY PLAN
- |--SCAN TABLE t1 USING COVERING INDEX t1bc
- `--SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)
+ |--SCAN t1 USING COVERING INDEX t1bc
+ `--SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)
}
do_execsql_test 5.4.2 {
SELECT count(*) FROM t1, t2 WHERE y = c;
} {200}
do_scanstatus_test 5.4.3 {
nLoop 1 nVisit 10 nEst 10.0 zName t1bc
- zExplain {SCAN TABLE t1 USING COVERING INDEX t1bc}
+ zExplain {SCAN t1 USING COVERING INDEX t1bc}
nLoop 10 nVisit 200 nEst 56.0 zName t2xy
- zExplain {SEARCH TABLE t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
+ zExplain {SEARCH t2 USING COVERING INDEX t2xy (ANY(x) AND y=?)}
}
do_eqp_test 5.5.1 {
SELECT count(*) FROM t1, t3 WHERE y = c;
} {
QUERY PLAN
- |--SCAN TABLE t3
- `--SEARCH TABLE t1 USING AUTOMATIC COVERING INDEX (c=?)
+ |--SCAN t3
+ `--SEARCH t1 USING AUTOMATIC COVERING INDEX (c=?)
}
do_execsql_test 5.5.2 {
SELECT count(*) FROM t1, t3 WHERE y = c;
} {200}
do_scanstatus_test 5.5.3 {
- nLoop 1 nVisit 501 nEst 480.0 zName t3 zExplain {SCAN TABLE t3}
+ nLoop 1 nVisit 501 nEst 480.0 zName t3 zExplain {SCAN t3}
nLoop 501 nVisit 200 nEst 20.0 zName auto-index zExplain
- {SEARCH TABLE t1 USING AUTOMATIC COVERING INDEX (c=?)}
+ {SEARCH t1 USING AUTOMATIC COVERING INDEX (c=?)}
}
#-------------------------------------------------------------------------
@@ -392,7 +392,7 @@ ifcapable fts3 {
} {6}
do_scanstatus_test 6.1.2 {
nLoop 1 nVisit 6 nEst 24.0 zName ft1 zExplain
- {SCAN TABLE ft1 VIRTUAL TABLE INDEX 3:}
+ {SCAN ft1 VIRTUAL TABLE INDEX 3:}
}
}
diff --git a/test/select9.test b/test/select9.test
index 4c42236dc..bbed8e18f 100644
--- a/test/select9.test
+++ b/test/select9.test
@@ -436,19 +436,19 @@ do_test select9-5.1 {
EXPLAIN QUERY PLAN
SELECT * FROM v5 WHERE x='12345' ORDER BY y;
}
-} {~/SCAN TABLE/} ;# Uses indices with "*"
+} {~/SCAN/} ;# Uses indices with "*"
do_test select9-5.2 {
db eval {
EXPLAIN QUERY PLAN
SELECT x, y FROM v5 WHERE x='12345' ORDER BY y;
}
-} {~/SCAN TABLE/} ;# Uses indices with "x, y"
+} {~/SCAN/} ;# Uses indices with "x, y"
do_test select9-5.3 {
db eval {
EXPLAIN QUERY PLAN
SELECT x, y FROM v5 WHERE +x='12345' ORDER BY y;
}
-} {/SCAN TABLE/} ;# Full table scan if the "+x" prevents index usage.
+} {/SCAN/} ;# Full table scan if the "+x" prevents index usage.
# 2013-07-09: Ticket [490a4b7235624298]:
# "WHERE 0" on the first element of a UNION causes an assertion fault
diff --git a/test/selectA.test b/test/selectA.test
index 7ca0096b1..aa4e2a798 100644
--- a/test/selectA.test
+++ b/test/selectA.test
@@ -1339,10 +1339,10 @@ do_eqp_test 4.1.2 {
QUERY PLAN
`--MERGE (UNION ALL)
|--LEFT
- | |--SCAN TABLE t5 USING INDEX i2
+ | |--SCAN t5 USING INDEX i2
| `--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
`--RIGHT
- |--SCAN TABLE t4 USING INDEX i1
+ |--SCAN t4 USING INDEX i1
`--USE TEMP B-TREE FOR RIGHT PART OF ORDER BY
}
diff --git a/test/selectD.test b/test/selectD.test
index 9c09b2cca..818d8ccc0 100644
--- a/test/selectD.test
+++ b/test/selectD.test
@@ -169,6 +169,6 @@ do_execsql_test selectD-4.1 {
WHERE x1.d>5
GROUP BY x1.d) AS x2
ON t41.b=x2.d;
-} {/*SEARCH SUBQUERY * AS x2 USING AUTOMATIC*/}
+} {/SEARCH x2 USING AUTOMATIC/}
finish_test
diff --git a/test/skipscan1.test b/test/skipscan1.test
index 367cd2a10..94062fb17 100644
--- a/test/skipscan1.test
+++ b/test/skipscan1.test
@@ -341,7 +341,7 @@ optimization_control db skip-scan 0
do_execsql_test skipscan1-9.3 {
EXPLAIN QUERY PLAN
SELECT * FROM t9a WHERE b IN (SELECT x FROM t9b WHERE y!=5);
-} {/{SCAN TABLE t9a}/}
+} {/{SCAN t9a}/}
optimization_control db skip-scan 1
do_execsql_test skipscan1-2.1 {
@@ -394,7 +394,7 @@ do_eqp_test skipscan1-3.2 {
FROM t1 WHERE t1.c3 = 1;
} {
QUERY PLAN
- |--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (ANY(c4) AND c3=?)
+ |--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (ANY(c4) AND c3=?)
`--USE TEMP B-TREE FOR DISTINCT
}
diff --git a/test/skipscan2.test b/test/skipscan2.test
index 6fa04d54c..47b2b3fff 100644
--- a/test/skipscan2.test
+++ b/test/skipscan2.test
@@ -199,7 +199,7 @@ do_test skipscan2-3.2 {
} {}
do_eqp_test skipscan2-3.3eqp {
SELECT * FROM t3 WHERE b=42;
-} {SEARCH TABLE t3 USING PRIMARY KEY (ANY(a) AND b=?)}
+} {SEARCH t3 USING PRIMARY KEY (ANY(a) AND b=?)}
diff --git a/test/skipscan5.test b/test/skipscan5.test
index c128e614c..026356e6c 100644
--- a/test/skipscan5.test
+++ b/test/skipscan5.test
@@ -41,20 +41,20 @@ do_test 1.2 {
foreach {tn q res} {
1 "b = 5" {/*ANY(a) AND b=?*/}
2 "b > 12 AND b < 16" {/*ANY(a) AND b>? AND b<?*/}
- 3 "b > 2 AND b < 16" {/*SCAN TABLE t1*/}
+ 3 "b > 2 AND b < 16" {/*SCAN t1*/}
4 "b > 18 AND b < 25" {/*ANY(a) AND b>? AND b<?*/}
5 "b > 16" {/*ANY(a) AND b>?*/}
- 6 "b > 5" {/*SCAN TABLE t1*/}
- 7 "b < 15" {/*SCAN TABLE t1*/}
+ 6 "b > 5" {/*SCAN t1*/}
+ 7 "b < 15" {/*SCAN t1*/}
8 "b < 5" {/*ANY(a) AND b<?*/}
9 "5 > b" {/*ANY(a) AND b<?*/}
10 "b = '5'" {/*ANY(a) AND b=?*/}
11 "b > '12' AND b < '16'" {/*ANY(a) AND b>? AND b<?*/}
- 12 "b > '2' AND b < '16'" {/*SCAN TABLE t1*/}
+ 12 "b > '2' AND b < '16'" {/*SCAN t1*/}
13 "b > '18' AND b < '25'" {/*ANY(a) AND b>? AND b<?*/}
14 "b > '16'" {/*ANY(a) AND b>?*/}
- 15 "b > '5'" {/*SCAN TABLE t1*/}
- 16 "b < '15'" {/*SCAN TABLE t1*/}
+ 15 "b > '5'" {/*SCAN t1*/}
+ 16 "b < '15'" {/*SCAN t1*/}
17 "b < '5'" {/*ANY(a) AND b<?*/}
18 "'5' > b" {/*ANY(a) AND b<?*/}
} {
@@ -104,10 +104,10 @@ foreach {tn dbenc coll} {
foreach {tn2 q res} {
1 { c BETWEEN 'd' AND 'e' } {/*ANY(a) AND ANY(b) AND c>? AND c<?*/}
- 2 { c BETWEEN 'b' AND 'r' } {/*SCAN TABLE t2*/}
+ 2 { c BETWEEN 'b' AND 'r' } {/*SCAN t2*/}
3 { c > 'q' } {/*ANY(a) AND ANY(b) AND c>?*/}
- 4 { c > 'e' } {/*SCAN TABLE t2*/}
- 5 { c < 'q' } {/*SCAN TABLE t2*/}
+ 4 { c > 'e' } {/*SCAN t2*/}
+ 5 { c < 'q' } {/*SCAN t2*/}
6 { c < 'b' } {/*ANY(a) AND ANY(b) AND c<?*/}
} {
set sql "EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE $q"
@@ -169,11 +169,11 @@ do_test 3.2 {
foreach {tn q res} {
1 "b BETWEEN -10000 AND -8000" {/*ANY(a) AND b>? AND b<?*/}
- 2 "b BETWEEN -10000 AND 'qqq'" {/*SCAN TABLE t3*/}
- 3 "b < X'5555'" {/*SCAN TABLE t3*/}
+ 2 "b BETWEEN -10000 AND 'qqq'" {/*SCAN t3*/}
+ 3 "b < X'5555'" {/*SCAN t3*/}
4 "b > X'5555'" {/*ANY(a) AND b>?*/}
5 "b > 'zzz'" {/*ANY(a) AND b>?*/}
- 6 "b < 'zzz'" {/*SCAN TABLE t3*/}
+ 6 "b < 'zzz'" {/*SCAN t3*/}
} {
set sql "EXPLAIN QUERY PLAN SELECT * FROM t3 WHERE $q"
do_execsql_test 3.3.$tn $sql $res
diff --git a/test/skipscan6.test b/test/skipscan6.test
index a53be1d95..4f592bc0e 100644
--- a/test/skipscan6.test
+++ b/test/skipscan6.test
@@ -179,13 +179,13 @@ do_execsql_test 3.0 {
#
do_eqp_test 3.1 {
SELECT * FROM t3 WHERE a = ? AND c = ?
-} {SEARCH TABLE t3 USING INDEX t3_a (a=?)}
+} {SEARCH t3 USING INDEX t3_a (a=?)}
# The same query on table t2. This should use index "t2_a", for the
# same reason. At one point though, it was mistakenly using a skip-scan.
#
do_eqp_test 3.2 {
SELECT * FROM t2 WHERE a = ? AND c = ?
-} {SEARCH TABLE t2 USING INDEX t2_a (a=?)}
+} {SEARCH t2 USING INDEX t2_a (a=?)}
finish_test
diff --git a/test/tkt-385a5b56b9.test b/test/tkt-385a5b56b9.test
index 22a9b38da..4451389b1 100644
--- a/test/tkt-385a5b56b9.test
+++ b/test/tkt-385a5b56b9.test
@@ -35,16 +35,16 @@ do_execsql_test 2.0 {
}
do_eqp_test 2.1 { SELECT DISTINCT x FROM t2 } \
- {SCAN TABLE t2 USING COVERING INDEX t2x}
+ {SCAN t2 USING COVERING INDEX t2x}
do_eqp_test 2.2 { SELECT DISTINCT y FROM t2 } \
- {SCAN TABLE t2 USING COVERING INDEX t2y}
+ {SCAN t2 USING COVERING INDEX t2y}
do_eqp_test 2.3 { SELECT DISTINCT x, y FROM t2 WHERE y=10 } \
- {SEARCH TABLE t2 USING INDEX t2y (y=?)}
+ {SEARCH t2 USING INDEX t2y (y=?)}
do_eqp_test 2.4 { SELECT DISTINCT x, y FROM t2 WHERE x=10 } \
- {SEARCH TABLE t2 USING INDEX t2x (x=?)}
+ {SEARCH t2 USING INDEX t2x (x=?)}
finish_test
diff --git a/test/tkt-78e04e52ea.test b/test/tkt-78e04e52ea.test
index a432e6c22..1b49f5d6d 100644
--- a/test/tkt-78e04e52ea.test
+++ b/test/tkt-78e04e52ea.test
@@ -42,7 +42,7 @@ do_test tkt-78e04-1.3 {
} {}
do_test tkt-78e04-1.4 {
db eval {EXPLAIN QUERY PLAN SELECT "" FROM "" WHERE "" LIKE '1e5%';}
-} {/*SCAN TABLE USING COVERING INDEX i1*/}
+} {/*SCAN USING COVERING INDEX i1*/}
do_test tkt-78e04-1.5 {
execsql {
DROP TABLE "";
@@ -55,12 +55,12 @@ do_test tkt-78e04-2.1 {
CREATE INDEX "" ON t2(x);
EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE x=5;
}
-} {/*SEARCH TABLE t2 USING COVERING INDEX (x=?)*/}
+} {/*SEARCH t2 USING COVERING INDEX (x=?)*/}
do_test tkt-78e04-2.2 {
execsql {
DROP INDEX "";
EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE x=2;
}
-} {/*SCAN TABLE t2*/}
+} {/*SCAN t2*/}
finish_test
diff --git a/test/tkt-b75a9ca6b0.test b/test/tkt-b75a9ca6b0.test
index f5ae10eec..f5c880449 100644
--- a/test/tkt-b75a9ca6b0.test
+++ b/test/tkt-b75a9ca6b0.test
@@ -32,8 +32,8 @@ do_execsql_test 1.1 {
CREATE INDEX i1 ON t1(x, y);
}
-set idxscan {SCAN TABLE t1 USING COVERING INDEX i1}
-set tblscan {SCAN TABLE t1}
+set idxscan {SCAN t1 USING COVERING INDEX i1}
+set tblscan {SCAN t1}
set grpsort {USE TEMP B-TREE FOR GROUP BY}
set sort {USE TEMP B-TREE FOR ORDER BY}
diff --git a/test/tkt3442.test b/test/tkt3442.test
index 98a5e371c..13d29a1b0 100644
--- a/test/tkt3442.test
+++ b/test/tkt3442.test
@@ -40,17 +40,17 @@ do_test tkt3442-1.1 {
#
do_eqp_test tkt3442-1.2 {
SELECT node FROM listhash WHERE id='5000' LIMIT 1;
-} {SEARCH TABLE listhash USING INDEX ididx (id=?)}
+} {SEARCH listhash USING INDEX ididx (id=?)}
do_eqp_test tkt3442-1.3 {
SELECT node FROM listhash WHERE id="5000" LIMIT 1;
-} {SEARCH TABLE listhash USING INDEX ididx (id=?)}
+} {SEARCH listhash USING INDEX ididx (id=?)}
# Some extra tests testing other permutations of 5000.
#
do_eqp_test tkt3442-1.4 {
SELECT node FROM listhash WHERE id=5000 LIMIT 1;
-} {SEARCH TABLE listhash USING INDEX ididx (id=?)}
+} {SEARCH listhash USING INDEX ididx (id=?)}
do_test tkt3442-1.5 {
catchsql {
diff --git a/test/tpch01.test b/test/tpch01.test
index 0e51b82b0..338ac48a0 100644
--- a/test/tpch01.test
+++ b/test/tpch01.test
@@ -165,13 +165,13 @@ do_test tpch01-1.1 {
order by
o_year;}]
set ::eqpres
-} {/*SEARCH TABLE part USING INDEX bootleg_pti *SEARCH TABLE lineitem USING INDEX lpki2*/}
+} {/*SEARCH part USING INDEX bootleg_pti *SEARCH lineitem USING INDEX lpki2*/}
do_test tpch01-1.1b {
set ::eqpres
-} {/.* customer .* nation AS n1 .*/}
+} {/.* customer .* n1 .*/}
do_test tpch01-1.1c {
set ::eqpres
-} {/.* supplier .* nation AS n2 .*/}
+} {/.* supplier .* n2 .*/}
do_eqp_test tpch01-1.2 {
select
@@ -189,10 +189,10 @@ order by
revenue desc;
} {
QUERY PLAN
- |--SEARCH TABLE orders USING INDEX odi (O_ORDERDATE>? AND O_ORDERDATE<?)
- |--SEARCH TABLE customer USING INDEX cpki (C_CUSTKEY=?)
- |--SEARCH TABLE nation USING INDEX npki (N_NATIONKEY=?)
- |--SEARCH TABLE lineitem USING INDEX lpki (L_ORDERKEY=?)
+ |--SEARCH orders USING INDEX odi (O_ORDERDATE>? AND O_ORDERDATE<?)
+ |--SEARCH customer USING INDEX cpki (C_CUSTKEY=?)
+ |--SEARCH nation USING INDEX npki (N_NATIONKEY=?)
+ |--SEARCH lineitem USING INDEX lpki (L_ORDERKEY=?)
|--USE TEMP B-TREE FOR GROUP BY
`--USE TEMP B-TREE FOR ORDER BY
}
diff --git a/test/transitive1.test b/test/transitive1.test
index 97dc5a71a..951092009 100644
--- a/test/transitive1.test
+++ b/test/transitive1.test
@@ -344,13 +344,13 @@ do_execsql_test transitive1-560 {
do_execsql_test transitive1-560eqp {
EXPLAIN QUERY PLAN
SELECT * FROM c1 WHERE x=y AND y=z AND z='abc';
-} {/SCAN TABLE c1/}
+} {/SCAN c1/}
do_execsql_test transitive1-570 {
SELECT * FROM c1 WHERE x=y AND z=y AND z='abc';
} {}
do_execsql_test transitive1-570eqp {
EXPLAIN QUERY PLAN
SELECT * FROM c1 WHERE x=y AND z=y AND z='abc';
-} {/SEARCH TABLE c1 USING INDEX c1x/}
+} {/SEARCH c1 USING INDEX c1x/}
finish_test
diff --git a/test/triggerupfrom.test b/test/triggerupfrom.test
index 9bfacb843..a731045c4 100644
--- a/test/triggerupfrom.test
+++ b/test/triggerupfrom.test
@@ -171,4 +171,3 @@ do_execsql_test 4.3 {
finish_test
-
diff --git a/test/unordered.test b/test/unordered.test
index cdbbabeb3..80595d95f 100644
--- a/test/unordered.test
+++ b/test/unordered.test
@@ -40,27 +40,27 @@ foreach idxmode {ordered unordered} {
sqlite3 db test.db
foreach {tn sql r(ordered) r(unordered)} {
1 "SELECT * FROM t1 ORDER BY a"
- {SCAN TABLE t1 USING INDEX i1}
- {SCAN TABLE t1*USE TEMP B-TREE FOR ORDER BY}
+ {SCAN t1 USING INDEX i1}
+ {SCAN t1*USE TEMP B-TREE FOR ORDER BY}
2 "SELECT * FROM t1 WHERE a > 100"
- {SEARCH TABLE t1 USING INDEX i1 (a>?)}
- {SCAN TABLE t1}
+ {SEARCH t1 USING INDEX i1 (a>?)}
+ {SCAN t1}
3 "SELECT * FROM t1 WHERE a = ? ORDER BY rowid"
- {SEARCH TABLE t1 USING INDEX i1 (a=?)}
- {SEARCH TABLE t1 USING INDEX i1 (a=?)*USE TEMP B-TREE FOR ORDER BY}
+ {SEARCH t1 USING INDEX i1 (a=?)}
+ {SEARCH t1 USING INDEX i1 (a=?)*USE TEMP B-TREE FOR ORDER BY}
4 "SELECT max(a) FROM t1"
- {SEARCH TABLE t1 USING COVERING INDEX i1}
- {SEARCH TABLE t1}
+ {SEARCH t1 USING COVERING INDEX i1}
+ {SEARCH t1}
5 "SELECT group_concat(b) FROM t1 GROUP BY a"
- {SCAN TABLE t1 USING INDEX i1}
- {SCAN TABLE t1*USE TEMP B-TREE FOR GROUP BY}
+ {SCAN t1 USING INDEX i1}
+ {SCAN t1*USE TEMP B-TREE FOR GROUP BY}
6 "SELECT * FROM t1 WHERE a = ?"
- {SEARCH TABLE t1 USING INDEX i1 (a=?)}
- {SEARCH TABLE t1 USING INDEX i1 (a=?)}
+ {SEARCH t1 USING INDEX i1 (a=?)}
+ {SEARCH t1 USING INDEX i1 (a=?)}
7 "SELECT count(*) FROM t1"
- {SCAN TABLE t1 USING COVERING INDEX i1}
- {SCAN TABLE t1}
+ {SCAN t1 USING COVERING INDEX i1}
+ {SCAN t1}
} {
do_eqp_test 1.$idxmode.$tn $sql $r($idxmode)
}
diff --git a/test/upfrom2.test b/test/upfrom2.test
index f903c1f4f..81c847a60 100644
--- a/test/upfrom2.test
+++ b/test/upfrom2.test
@@ -367,5 +367,3 @@ foreach {tn update nm} {
finish_test
-
-
diff --git a/test/upfrom3.test b/test/upfrom3.test
index d30b3fa28..9936716b5 100644
--- a/test/upfrom3.test
+++ b/test/upfrom3.test
@@ -259,4 +259,3 @@ foreach {tn wo} {
}
finish_test
-
diff --git a/test/upfromfault.test b/test/upfromfault.test
index fcb595608..e876c071c 100644
--- a/test/upfromfault.test
+++ b/test/upfromfault.test
@@ -137,4 +137,3 @@ do_faultsim_test 2.3 -prep {
finish_test
-
diff --git a/test/upsert5.test b/test/upsert5.test
index c4747ddf1..3161abf15 100644
--- a/test/upsert5.test
+++ b/test/upsert5.test
@@ -394,4 +394,18 @@ foreach {tn sql} {
}
+#--------------------------------------------------------------------------
+reset_db
+do_execsql_test 2.0 {
+ CREATE TABLE t2(a, b, c REAL, d, e, PRIMARY KEY(a,b)) WITHOUT ROWID;
+ CREATE UNIQUE INDEX t2c ON t2(c);
+}
+
+do_catchsql_test 2.1 {
+ INSERT INTO t2(a,b,c,e,d) VALUES(1,2,3,4,5)
+ ON CONFLICT(c) DO UPDATE SET b=''
+ ON CONFLICT((SELECT t2 FROM nosuchtable)) DO NOTHING;
+
+} {1 {no such table: nosuchtable}}
+
finish_test
diff --git a/test/walsetlk.test b/test/walsetlk.test
index 66513ad2d..8c0a9659f 100644
--- a/test/walsetlk.test
+++ b/test/walsetlk.test
@@ -195,4 +195,3 @@ do_test 3.1 {
} {1 {database is locked}}
finish_test
-
diff --git a/test/where.test b/test/where.test
index fa3bcd836..298248a6e 100644
--- a/test/where.test
+++ b/test/where.test
@@ -70,10 +70,10 @@ do_test where-1.1.1b {
} {3 121 10 3}
do_eqp_test where-1.1.2 {
SELECT x, y, w FROM t1 WHERE w=10
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_eqp_test where-1.1.2b {
SELECT x, y, w FROM t1 WHERE w IS 10
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_test where-1.1.3 {
db status step
} {0}
@@ -85,13 +85,13 @@ do_test where-1.1.5 {
} {99}
do_eqp_test where-1.1.6 {
SELECT x, y, w FROM t1 WHERE +w=10
-} {*SCAN TABLE t1*}
+} {*SCAN t1*}
do_test where-1.1.7 {
count {SELECT x, y, w AS abc FROM t1 WHERE abc=10}
} {3 121 10 3}
do_eqp_test where-1.1.8 {
SELECT x, y, w AS abc FROM t1 WHERE abc=10
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_test where-1.1.9 {
db status step
} {0}
@@ -118,22 +118,22 @@ do_test where-1.4.1b {
} {11 3 144 3}
do_eqp_test where-1.4.2 {
SELECT w, x, y FROM t1 WHERE 11=w AND x>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_eqp_test where-1.4.2b {
SELECT w, x, y FROM t1 WHERE 11 IS w AND x>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_test where-1.4.3 {
count {SELECT w AS a, x AS b, y FROM t1 WHERE 11=a AND b>2}
} {11 3 144 3}
do_eqp_test where-1.4.4 {
SELECT w AS a, x AS b, y FROM t1 WHERE 11=a AND b>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_test where-1.5 {
count {SELECT x, y FROM t1 WHERE y<200 AND w=11 AND x>2}
} {3 144 3}
do_eqp_test where-1.5.2 {
SELECT x, y FROM t1 WHERE y<200 AND w=11 AND x>2
-} {*SEARCH TABLE t1 USING INDEX i1w (w=?)*}
+} {*SEARCH t1 USING INDEX i1w (w=?)*}
do_test where-1.6 {
count {SELECT x, y FROM t1 WHERE y<200 AND x>2 AND w=11}
} {3 144 3}
@@ -145,10 +145,10 @@ do_test where-1.8 {
} {3 144 3}
do_eqp_test where-1.8.2 {
SELECT x, y FROM t1 WHERE w>10 AND y=144 AND x=3
-} {*SEARCH TABLE t1 USING INDEX i1xy (x=? AND y=?)*}
+} {*SEARCH t1 USING INDEX i1xy (x=? AND y=?)*}
do_eqp_test where-1.8.3 {
SELECT x, y FROM t1 WHERE y=144 AND x=3
-} {*SEARCH TABLE t1 USING COVERING INDEX i1xy (x=? AND y=?)*}
+} {*SEARCH t1 USING COVERING INDEX i1xy (x=? AND y=?)*}
do_test where-1.9 {
count {SELECT x, y FROM t1 WHERE y=144 AND w>10 AND x=3}
} {3 144 3}
diff --git a/test/where2.test b/test/where2.test
index 0a0533506..7a7e9b92e 100644
--- a/test/where2.test
+++ b/test/where2.test
@@ -76,10 +76,12 @@ proc queryplan {sql} {
set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
# puts eqp=$eqp
foreach {a b c x} $eqp {
- if {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
- $x all as tab idx]} {
+ if {[regexp {SCAN CONSTANT} $x]} {
+ # noop
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+ $x all ss as tab idx]} {
lappend data $tab $idx
- } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
lappend data $tab *
}
}
@@ -753,7 +755,7 @@ do_execsql_test where2-12.1 {
SELECT a.x, b.x
FROM t12 AS a JOIN t12 AS b ON a.y=b.x
WHERE (b.x=$abc OR b.y=$abc);
-} {/.*SEARCH TABLE t12 AS b .*SEARCH TABLE t12 AS b .*/}
+} {/SEARCH b .*SEARCH b /}
}
# Verify that all necessary OP_OpenRead opcodes occur in the OR optimization.
diff --git a/test/where3.test b/test/where3.test
index 4d4ea3ee6..20af995cf 100644
--- a/test/where3.test
+++ b/test/where3.test
@@ -111,10 +111,12 @@ proc queryplan {sql} {
set eqp [execsql "EXPLAIN QUERY PLAN $sql"]
# puts eqp=$eqp
foreach {a b c x} $eqp {
- if {[regexp { TABLE (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
- $x all as tab idx]} {
+ if {[regexp {SCAN CONSTANT} $x]} {
+ # noop
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+) USING.* INDEX (\w+)\y} \
+ $x all ss as tab idx]} {
lappend data $tab $idx
- } elseif {[regexp { TABLE (\w+ AS )?(\w+)\y} $x all as tab]} {
+ } elseif {[regexp {(SCAN|SEARCH) (\w+ AS )?(\w+)\y} $x all ss as tab]} {
lappend data $tab *
}
}
@@ -240,15 +242,15 @@ do_eqp_test where3-3.0a {
SELECT * FROM t302, t301 WHERE t302.x=5 AND t301.a=t302.y;
} {
QUERY PLAN
- |--SCAN TABLE t302
- `--SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t302
+ `--SEARCH t301 USING INTEGER PRIMARY KEY (rowid=?)
}
do_eqp_test where3-3.1 {
SELECT * FROM t301, t302 WHERE t302.x=5 AND t301.a=t302.y;
} {
QUERY PLAN
- |--SCAN TABLE t302
- `--SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SCAN t302
+ `--SEARCH t301 USING INTEGER PRIMARY KEY (rowid=?)
}
do_execsql_test where3-3.2 {
SELECT * FROM t301 WHERE c=3 AND a IS NULL;
@@ -269,25 +271,25 @@ do_execsql_test where3-4.0 {
EXPLAIN QUERY PLAN
SELECT * FROM t400, t401, t402 WHERE t402.z GLOB 'abc*';
} {
- 0 0 2 {SCAN TABLE t402}
- 0 1 0 {SCAN TABLE t400}
- 0 2 1 {SCAN TABLE t401}
+ 0 0 2 {SCAN t402}
+ 0 1 0 {SCAN t400}
+ 0 2 1 {SCAN t401}
}
do_execsql_test where3-4.1 {
EXPLAIN QUERY PLAN
SELECT * FROM t400, t401, t402 WHERE t401.r GLOB 'abc*';
} {
- 0 0 1 {SCAN TABLE t401}
- 0 1 0 {SCAN TABLE t400}
- 0 2 2 {SCAN TABLE t402}
+ 0 0 1 {SCAN t401}
+ 0 1 0 {SCAN t400}
+ 0 2 2 {SCAN t402}
}
do_execsql_test where3-4.2 {
EXPLAIN QUERY PLAN
SELECT * FROM t400, t401, t402 WHERE t400.c GLOB 'abc*';
} {
- 0 0 0 {SCAN TABLE t400}
- 0 1 1 {SCAN TABLE t401}
- 0 2 2 {SCAN TABLE t402}
+ 0 0 0 {SCAN t400}
+ 0 1 1 {SCAN t401}
+ 0 2 2 {SCAN t402}
}
} ;# endif
@@ -321,8 +323,8 @@ do_eqp_test where3-5.0a {
ORDER BY bbb.title COLLATE NOCASE ASC;
} {
QUERY PLAN
- |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
- |--SEARCH TABLE bbb USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+ |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test where3-5.1 {
@@ -334,8 +336,8 @@ do_eqp_test where3-5.1 {
ORDER BY bbb.title COLLATE NOCASE ASC;
} {
QUERY PLAN
- |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
- |--SEARCH TABLE aaa AS bbb USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+ |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test where3-5.2 {
@@ -347,8 +349,8 @@ do_eqp_test where3-5.2 {
ORDER BY bbb.title COLLATE NOCASE ASC;
} {
QUERY PLAN
- |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
- |--SEARCH TABLE bbb USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+ |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
`--USE TEMP B-TREE FOR ORDER BY
}
do_eqp_test where3-5.3 {
@@ -360,8 +362,8 @@ do_eqp_test where3-5.3 {
ORDER BY bbb.title COLLATE NOCASE ASC;
} {
QUERY PLAN
- |--SEARCH TABLE aaa USING INDEX aaa_333 (fk=?)
- |--SEARCH TABLE aaa AS bbb USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH aaa USING INDEX aaa_333 (fk=?)
+ |--SEARCH bbb USING INTEGER PRIMARY KEY (rowid=?)
`--USE TEMP B-TREE FOR ORDER BY
}
diff --git a/test/where7.test b/test/where7.test
index 81111a9de..830530634 100644
--- a/test/where7.test
+++ b/test/where7.test
@@ -23354,10 +23354,10 @@ do_eqp_test where7-3.2 {
QUERY PLAN
|--MULTI-INDEX OR
| |--INDEX 1
- | | `--SEARCH TABLE t301 USING COVERING INDEX t301_c4 (c4=?)
+ | | `--SEARCH t301 USING COVERING INDEX t301_c4 (c4=?)
| `--INDEX 2
- | `--SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?)
- |--SEARCH TABLE t302 USING INDEX t302_c8_c3 (c8=? AND c3>?)
+ | `--SEARCH t301 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH t302 USING INDEX t302_c8_c3 (c8=? AND c3>?)
`--USE TEMP B-TREE FOR ORDER BY
}
diff --git a/test/where9.test b/test/where9.test
index 0f770dfee..cb52b2b37 100644
--- a/test/where9.test
+++ b/test/where9.test
@@ -362,12 +362,12 @@ ifcapable explain {
WHERE t1.a=80 AND ((t1.c=t2.c AND t1.d=t2.d) OR t1.f=t2.f)
} [string map {"\n " \n} {
QUERY PLAN
- |--SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t2 USING INDEX t2d (d=?)
+ | `--SEARCH t2 USING INDEX t2d (d=?)
`--INDEX 3
- `--SEARCH TABLE t2 USING COVERING INDEX t2f (f=?)
+ `--SEARCH t2 USING COVERING INDEX t2f (f=?)
}]
do_eqp_test where9-3.2 {
SELECT coalesce(t2.a,9999)
@@ -375,12 +375,12 @@ ifcapable explain {
WHERE t1.a=80
} [string map {"\n " \n} {
QUERY PLAN
- |--SEARCH TABLE t1 USING INTEGER PRIMARY KEY (rowid=?)
+ |--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t2 USING INDEX t2d (d=?)
+ | `--SEARCH t2 USING INDEX t2d (d=?)
`--INDEX 2
- `--SEARCH TABLE t2 USING COVERING INDEX t2f (f=?)
+ `--SEARCH t2 USING COVERING INDEX t2f (f=?)
}]
}
@@ -461,23 +461,23 @@ do_eqp_test where9-5.1 {
QUERY PLAN
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t1 USING INDEX t1c (c=?)
+ | `--SEARCH t1 USING INDEX t1c (c=?)
`--INDEX 2
- `--SEARCH TABLE t1 USING INDEX t1d (d=?)
+ `--SEARCH t1 USING INDEX t1d (d=?)
}
# In contrast, b=1000 is preferred over any OR-clause.
#
do_eqp_test where9-5.2 {
SELECT a FROM t1 WHERE b=1000 AND (c=31031 OR d IS NULL)
-} {SEARCH TABLE t1 USING INDEX t1b (b=?)}
+} {SEARCH t1 USING INDEX t1b (b=?)}
# Likewise, inequalities in an AND are preferred over inequalities in
# an OR.
#
do_eqp_test where9-5.3 {
SELECT a FROM t1 WHERE b>1000 AND (c>=31031 OR d IS NULL)
-} {SEARCH TABLE t1 USING INDEX t1b (b>?)}
+} {SEARCH t1 USING INDEX t1b (b>?)}
############################################################################
# Make sure OR-clauses work correctly on UPDATE and DELETE statements.
diff --git a/test/whereE.test b/test/whereE.test
index a6b8f481b..31086b249 100644
--- a/test/whereE.test
+++ b/test/whereE.test
@@ -47,16 +47,16 @@ do_execsql_test 1.1 {
CREATE UNIQUE INDEX t2zx ON t2(z,x);
EXPLAIN QUERY PLAN SELECT x FROM t1, t2 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
do_execsql_test 1.2 {
EXPLAIN QUERY PLAN SELECT x FROM t2, t1 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
do_execsql_test 1.3 {
ANALYZE;
EXPLAIN QUERY PLAN SELECT x FROM t1, t2 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
do_execsql_test 1.4 {
EXPLAIN QUERY PLAN SELECT x FROM t2, t1 WHERE a=z AND c=x;
-} {/.*SCAN TABLE t1.*SEARCH TABLE t2.*/}
+} {/.*SCAN t1.*SEARCH t2.*/}
finish_test
diff --git a/test/whereF.test b/test/whereF.test
index 121cc3cf2..ac7fd807b 100644
--- a/test/whereF.test
+++ b/test/whereF.test
@@ -63,7 +63,7 @@ foreach {tn sql} {
} {
do_test 1.$tn {
db eval "EXPLAIN QUERY PLAN $sql"
- } {/.*SCAN TABLE t2\y.*SEARCH TABLE t1\y.*/}
+ } {/.*SCAN t2\y.*SEARCH t1\y.*/}
}
do_execsql_test 2.0 {
@@ -84,7 +84,7 @@ foreach {tn sql} {
} {
do_test 2.$tn {
db eval "EXPLAIN QUERY PLAN $sql"
- } {/.*SCAN TABLE t2\y.*SEARCH TABLE t1\y.*/}
+ } {/.*SCAN t2\y.*SEARCH t1\y.*/}
}
do_execsql_test 3.0 {
@@ -109,7 +109,7 @@ foreach {tn sql} {
} {
do_test 3.$tn {
db eval "EXPLAIN QUERY PLAN $sql"
- } {/.*SCAN TABLE t2\y.*SEARCH TABLE t1\y.*/}
+ } {/.*SCAN t2\y.*SEARCH t1\y.*/}
}
do_execsql_test 4.0 {
diff --git a/test/whereG.test b/test/whereG.test
index abff2270b..5096f06a9 100644
--- a/test/whereG.test
+++ b/test/whereG.test
@@ -156,16 +156,16 @@ do_execsql_test whereG-3.0 {
} {}
do_eqp_test whereG-3.1 {
SELECT * FROM a, b WHERE b1=a1 AND a2=5;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
do_eqp_test whereG-3.2 {
SELECT * FROM a, b WHERE a1=b1 AND a2=5;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
do_eqp_test whereG-3.3 {
SELECT * FROM a, b WHERE a2=5 AND b1=a1;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
do_eqp_test whereG-3.4 {
SELECT * FROM a, b WHERE a2=5 AND a1=b1;
-} {/.*SCAN TABLE a.*SEARCH TABLE b USING INDEX .*b_1 .b1=..*/}
+} {/.*SCAN a.*SEARCH b USING INDEX .*b_1 .b1=..*/}
# Ticket [1e64dd782a126f48d78c43a664844a41d0e6334e]:
# Incorrect result in a nested GROUP BY/DISTINCT due to the use of an OP_SCopy
@@ -195,13 +195,13 @@ do_execsql_test 5.1 {
}
do_eqp_test 5.1.2 {
SELECT * FROM t1 WHERE a>?
-} {SEARCH TABLE t1 USING INDEX i1 (a>?)}
+} {SEARCH t1 USING INDEX i1 (a>?)}
do_eqp_test 5.1.3 {
SELECT * FROM t1 WHERE likelihood(a>?, 0.9)
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test 5.1.4 {
SELECT * FROM t1 WHERE likely(a>?)
-} {SCAN TABLE t1}
+} {SCAN t1}
do_test 5.2 {
for {set i 0} {$i < 100} {incr i} {
@@ -212,29 +212,29 @@ do_test 5.2 {
} {}
do_eqp_test 5.2.2 {
SELECT * FROM t1 WHERE likelihood(b>?, 0.01)
-} {SEARCH TABLE t1 USING INDEX i1 (ANY(a) AND b>?)}
+} {SEARCH t1 USING INDEX i1 (ANY(a) AND b>?)}
do_eqp_test 5.2.3 {
SELECT * FROM t1 WHERE likelihood(b>?, 0.9)
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test 5.2.4 {
SELECT * FROM t1 WHERE likely(b>?)
-} {SCAN TABLE t1}
+} {SCAN t1}
ifcapable stat4 {
do_eqp_test 5.3.1.stat4 {
SELECT * FROM t1 WHERE a=?
- } {SCAN TABLE t1}
+ } {SCAN t1}
} else {
do_eqp_test 5.3.1 {
SELECT * FROM t1 WHERE a=?
- } {SEARCH TABLE t1 USING INDEX i1}
+ } {SEARCH t1 USING INDEX i1}
}
do_eqp_test 5.3.2 {
SELECT * FROM t1 WHERE likelihood(a=?, 0.9)
-} {SCAN TABLE t1}
+} {SCAN t1}
do_eqp_test 5.3.3 {
SELECT * FROM t1 WHERE likely(a=?)
-} {SCAN TABLE t1}
+} {SCAN t1}
# 2015-06-18
# Ticket [https://www.sqlite.org/see/tktview/472f0742a1868fb58862bc588ed70]
diff --git a/test/whereI.test b/test/whereI.test
index 7bb4ba39d..38e014884 100644
--- a/test/whereI.test
+++ b/test/whereI.test
@@ -32,9 +32,9 @@ do_eqp_test 1.1 {
QUERY PLAN
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t1 USING INDEX i1 (b=?)
+ | `--SEARCH t1 USING INDEX i1 (b=?)
`--INDEX 2
- `--SEARCH TABLE t1 USING INDEX i2 (c=?)
+ `--SEARCH t1 USING INDEX i2 (c=?)
}
do_execsql_test 1.2 {
@@ -64,9 +64,9 @@ do_eqp_test 2.1 {
QUERY PLAN
`--MULTI-INDEX OR
|--INDEX 1
- | `--SEARCH TABLE t2 USING INDEX i3 (b=?)
+ | `--SEARCH t2 USING INDEX i3 (b=?)
`--INDEX 2
- `--SEARCH TABLE t2 USING INDEX i4 (c=?)
+ `--SEARCH t2 USING INDEX i4 (c=?)
}
do_execsql_test 2.2 {
diff --git a/test/whereJ.test b/test/whereJ.test
index af6ffafb3..c31ab8c37 100644
--- a/test/whereJ.test
+++ b/test/whereJ.test
@@ -402,7 +402,7 @@ do_eqp_test 3.4 {
a = 4 AND b BETWEEN 20 AND 80 -- Matches 80 rows
AND
c BETWEEN 150 AND 160 -- Matches 10 rows
-} {SEARCH TABLE t1 USING INDEX idx_c (c>? AND c<?)}
+} {SEARCH t1 USING INDEX idx_c (c>? AND c<?)}
# This one should use index "idx_ab".
do_eqp_test 3.5 {
@@ -410,7 +410,7 @@ do_eqp_test 3.5 {
a = 5 AND b BETWEEN 20 AND 80 -- Matches 1 row
AND
c BETWEEN 150 AND 160 -- Matches 10 rows
-} {SEARCH TABLE t1 USING INDEX idx_ab (a=? AND b>? AND b<?)}
+} {SEARCH t1 USING INDEX idx_ab (a=? AND b>? AND b<?)}
###########################################################################################
@@ -633,7 +633,7 @@ do_execsql_test 4.2 {
AND px.cx_id = cx.cx_id
AND px.px_tid = 0
AND px.le_id = le.le_id;
-} {/.*SCAN TABLE cx.*SEARCH TABLE px.*SEARCH TABLE le.*/}
+} {/.*SCAN cx.*SEARCH px.*SEARCH le.*/}
# The following test is derived from a performance problem reported from
diff --git a/test/whereK.test b/test/whereK.test
index 13c86508f..060d470ff 100644
--- a/test/whereK.test
+++ b/test/whereK.test
@@ -33,7 +33,7 @@ do_execsql_test 1.1 {
do_execsql_test 1.1eqp {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE b>9 OR b=9 ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
do_execsql_test 1.2 {
SELECT a FROM t1 WHERE b>8 OR (b=8 AND c>7) ORDER BY +a;
@@ -41,7 +41,7 @@ do_execsql_test 1.2 {
do_execsql_test 1.2eqp {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE b>8 OR (b=8 AND c>7) ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
do_execsql_test 1.3 {
SELECT a FROM t1 WHERE (b=8 AND c>7) OR b>8 ORDER BY +a;
@@ -49,7 +49,7 @@ do_execsql_test 1.3 {
do_execsql_test 1.3eqp {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE (b=8 AND c>7) OR b>8 ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
do_execsql_test 1.4 {
SELECT a FROM t1 WHERE (b=8 AND c>7) OR 8<b ORDER BY +a;
@@ -57,7 +57,7 @@ do_execsql_test 1.4 {
do_execsql_test 1.4eqp {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE (b=8 AND c>7) OR 8<b ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
do_execsql_test 1.5 {
SELECT a FROM t1 WHERE (b=8 AND c>7) OR (b>8 AND c NOT IN (4,5,6))
@@ -67,6 +67,6 @@ do_execsql_test 1.5eqp {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE (b=8 AND c>7) OR (b>8 AND c NOT IN (4,5,6))
ORDER BY +a;
-} {/SEARCH TABLE t1 USING INDEX t1bc/}
+} {/SEARCH t1 USING INDEX t1bc/}
finish_test
diff --git a/test/whereL.test b/test/whereL.test
index c78ae160b..5422ac531 100644
--- a/test/whereL.test
+++ b/test/whereL.test
@@ -28,11 +28,11 @@ do_eqp_test 110 {
QUERY PLAN
`--COMPOUND QUERY
|--LEFT-MOST SUBQUERY
- | |--SEARCH TABLE t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
- | `--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
+ | |--SEARCH t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
+ | `--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
`--UNION ALL
- |--SEARCH TABLE t3 USING INDEX sqlite_autoindex_t3_1 (a=?)
- `--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
+ |--SEARCH t3 USING INDEX sqlite_autoindex_t3_1 (a=?)
+ `--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
}
# The scan of the t1 table goes first since that enables the ORDER BY
@@ -45,9 +45,9 @@ do_eqp_test 120 {
ORDER BY t1.a;
} {
QUERY PLAN
- |--SEARCH TABLE t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
- |--SEARCH TABLE t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
- `--SCAN TABLE t3
+ |--SEARCH t1 USING INDEX sqlite_autoindex_t1_1 (a=?)
+ |--SEARCH t2 USING INDEX sqlite_autoindex_t2_1 (a=?)
+ `--SCAN t3
}
# Constant propagation in the face of collating sequences:
diff --git a/test/windowpushd.test b/test/windowpushd.test
index 4462a0b4b..f2e04d72f 100644
--- a/test/windowpushd.test
+++ b/test/windowpushd.test
@@ -51,7 +51,7 @@ do_execsql_test 1.3 {
do_eqp_test 1.4 {
SELECT * FROM lll WHERE grp_id=2
-} {SEARCH TABLE t1 USING COVERING INDEX i1 (grp_id=?)}
+} {SEARCH t1 USING COVERING INDEX i1 (grp_id=?)}
#-------------------------------------------------------------------------
reset_db
@@ -158,10 +158,10 @@ foreach tn {0 1} {
if {$tn==1} {
do_eqp_test 2.$tn.3.3 {
SELECT * FROM v3 WHERE b='E'
- } {SEARCH TABLE t1 USING INDEX i2 (b=?)}
+ } {SEARCH t1 USING INDEX i2 (b=?)}
do_eqp_test 2.$tn.3.4 {
SELECT * FROM v3 WHERE b>'C'
- } {SEARCH TABLE t1 USING INDEX i2 (b>?)}
+ } {SEARCH t1 USING INDEX i2 (b>?)}
}
do_execsql_test 2.$tn.3.5 { SELECT * FROM v3 WHERE d<0.55; } {
@@ -172,7 +172,7 @@ foreach tn {0 1} {
if {$tn==1} {
do_eqp_test 2.$tn.3.6 {
SELECT * FROM v3 WHERE d<0.55
- } {SCAN TABLE t1 USING INDEX i2}
+ } {SCAN t1 USING INDEX i2}
}
do_execsql_test 2.$tn.4.1 {
@@ -234,4 +234,3 @@ foreach tn {0 1} {
finish_test
-
diff --git a/test/with1.test b/test/with1.test
index 74997c1db..08ef8919a 100644
--- a/test/with1.test
+++ b/test/with1.test
@@ -1025,10 +1025,10 @@ do_eqp_test 19.1b {
SELECT * FROM t1;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE x1
| `--SCAN CONSTANT ROW
- |--SCAN SUBQUERY xxxxxx
- `--SCAN SUBQUERY xxxxxx
+ |--SCAN x1
+ `--SCAN x1
}
# 2017-10-28.
diff --git a/test/with2.test b/test/with2.test
index 004ec94b9..1051c6fb1 100644
--- a/test/with2.test
+++ b/test/with2.test
@@ -414,5 +414,139 @@ do_execsql_test 8.3 {
SELECT * FROM q;
} {1 2 3 4 5}
+# 2021-03-18
+# Ticket bb8a9fd4a9b7fce5
+reset_db
+do_execsql_test 9.1 {
+ WITH xyz(a) AS (
+ WITH abc AS ( SELECT 1234 ) SELECT * FROM abc
+ )
+ SELECT * FROM xyz AS one, xyz AS two, (
+ SELECT * FROM xyz UNION ALL SELECT * FROM xyz
+ );
+} {1234 1234 1234 1234 1234 1234}
+ifcapable vtab {
+load_static_extension db series
+do_execsql_test 9.2 {
+ WITH
+ cst(rsx, rsy) AS (
+ SELECT 100, 100
+ ),
+ cst2(minx, maxx, stepx, miny, maxy, stepy, qualitativex, qualitativey) AS (
+ SELECT NULL, NULL, NULL, NULL, NULL, NULL, 0, 0
+ ),
+ ds0(m, n, x, y, x2, y2, title, size, mark, label, markmode) AS (
+ SELECT 1, 2, 3, 4, 5, 6, 7 , 8, 9, 10, 11
+ ),
+ ds(m, n, x, y, x2, y2, title, size, mark, label, markmode) AS (
+ SELECT m, n, x,
+ y, x2,
+ y2,
+ title, size, mark, label, markmode
+ FROM ds0
+ WINDOW w AS (PARTITION BY m, x ORDER BY n)
+ ),
+ d(m, n, x, y, x2, y2, labelx,labely,title,size,mark,label,markmode) AS (
+ SELECT m, n, x, y, x2, y2, x, y, title, size, mark, label, markmode
+ FROM ds, cst2
+ ),
+ ylabels(y, label) AS (
+ SELECT y, MIN(labely) FROM d GROUP BY y
+ ),
+ yaxis(maxy, miny, stepy , minstepy) AS (
+ WITH
+ xt0(minx, maxx) AS (
+ SELECT coalesce(miny, min(min(y2),
+ min(y))), coalesce(maxy, max(max(y2),
+ max(y))) + qualitativey
+ FROM d, cst2
+ ),
+ xt1(mx, mn) AS (SELECT maxx, minx FROM xt0),
+ xt2(mx, mn, step) AS (SELECT mx, mn, (mx-mn) FROM xt1),
+
+ xt3(mx, mn, ms) AS (
+ SELECT mx, mn, first_value(rs) OVER (order by x desc) AS ms
+ FROM (SELECT mx, mn, step, f,(mx-mn) as rng,
+ 1.0*step/f as rs, 1.0*(mx-mn)/(step/f) AS x
+ FROM xt2, (SELECT 1 AS f UNION ALL SELECT 2
+ UNION ALL SELECT 4
+ UNION ALL SELECT 5)) AS src
+ WHERE x < 10 limit 1),
+ xt4(minstepy) AS (
+ SELECT MIN(abs(y2-y)) FROM d WHERE y2 != y
+ )
+ SELECT (mx/ms)*ms, (mn/ms)*ms, coalesce(stepy, ms),
+ coalesce(minstepy, ms, stepy) FROM xt3, cst2,xt4
+ ),
+ distinct_mark_n_m(mark, ze, zem, title) AS (
+ SELECT DISTINCT mark, n AS ze, m AS zem, title FROM ds0
+ ),
+ facet0(m, mi, title, radial) AS (
+ SELECT md, row_number() OVER () - 1, title, 'radial'
+ IN (SELECT mark FROM distinct_mark_n_m WHERE zem = md)
+ FROM (SELECT DISTINCT zem AS md, title AS title
+ FROM distinct_mark_n_m ORDER BY 2, 1)
+ ),
+ facet(m, mi, xorigin, yorigin, title, radial) AS (
+ SELECT m, mi,
+ rsx * 1.2 * IFNULL(CASE WHEN (
+ 0
+ ) > 0 THEN mi / (
+ 0
+ ) ELSE mi % (
+ 2
+ ) END, mi),
+ rsy * 1.2 * IFNULL(CASE WHEN (
+ 2
+ ) > 0 THEN mi / (
+ 2
+ ) ELSE mi / (
+ 0
+ ) END, 0),
+ title, radial FROM facet0, cst
+ ),
+ radygrid(m, mi, tty, wty, ttx, ttx2, xorigin, yorigin) AS (
+ SELECT m, mi, rsy / 2 / ((maxy-miny)/stepy) * (value-1) AS tty,
+ coalesce(NULL, miny + stepy * (value-1)) AS wty,
+ xorigin, xorigin+rsx, xorigin + rsx / 2,
+ yorigin + rsy / 2
+ FROM generate_series(1), yaxis, cst,
+ facet LEFT JOIN ylabels ON ylabels.y = (miny + (value-1) * stepy)
+ WHERE radial AND stop = 1+1.0*(maxy-miny)/stepy
+ ),
+ ypos(m, mi, pcx, pcy, radial) AS (
+ SELECT m, mi, xorigin, yorigin + CASE
+ WHEN 0 BETWEEN miny AND maxy THEN
+ rsy - (0 - miny) * rsy / (maxy-miny)
+ WHEN 0 >= maxy THEN 0
+ ELSE rsy
+ END, radial FROM yaxis, cst, facet WHERE NOT radial
+ UNION ALL
+ SELECT m, mi, xorigin + rsx / 2, yorigin + (CASE
+ WHEN 0 BETWEEN miny AND maxy THEN
+ rsy - (0 - miny) * rsy / 2 / (maxy-miny)
+ WHEN 0 >= maxy THEN 0
+ ELSE rsy
+ END ) / 2, radial FROM yaxis, cst, facet WHERE radial
+ )
+ SELECT * FROM radygrid , ypos;
+} {}
+} ;# end ifcapable vtab
+
+# 2021-03-19
+# dbsqlfuzz 01b8355086998f0a452cb31208e80b9d29ca739a
+#
+# Correlated CTEs should not be materialized.
+#
+reset_db
+do_execsql_test 10.1 {
+ SELECT 1 AS c WHERE (
+ SELECT (
+ WITH t1(a) AS (VALUES( c ))
+ SELECT ( SELECT t1a.a FROM t1 AS t1a, t1 AS t1x )
+ FROM t1 AS xyz GROUP BY 1
+ )
+ )
+} {1}
finish_test
diff --git a/test/with3.test b/test/with3.test
index 3325ecc93..8e8eba89f 100644
--- a/test/with3.test
+++ b/test/with3.test
@@ -89,13 +89,13 @@ ifcapable analyze {
SELECT * FROM cnt, y1 WHERE i=a
} [string map {"\n " \n} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE cnt
| |--SETUP
| | `--SCAN CONSTANT ROW
| `--RECURSIVE STEP
- | `--SCAN TABLE cnt
- |--SCAN SUBQUERY xxxxxx
- `--SEARCH TABLE y1 USING INDEX y1a (a=?)
+ | `--SCAN cnt
+ |--SCAN cnt
+ `--SEARCH y1 USING INDEX y1a (a=?)
}]
do_eqp_test 3.1.3 {
@@ -103,13 +103,13 @@ ifcapable analyze {
SELECT * FROM cnt, y1 WHERE i=a
} [string map {"\n " \n} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE cnt
| |--SETUP
| | `--SCAN CONSTANT ROW
| `--RECURSIVE STEP
- | `--SCAN TABLE cnt
- |--SCAN TABLE y1
- `--SEARCH SUBQUERY xxxxxx USING AUTOMATIC COVERING INDEX (i=?)
+ | `--SCAN cnt
+ |--SCAN y1
+ `--SEARCH cnt USING AUTOMATIC COVERING INDEX (i=?)
}]
}
@@ -125,17 +125,17 @@ do_eqp_test 3.2.2 {
WHERE c.id=w2.pk AND c.id=w1.pk;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c
| |--SETUP
| | |--SCAN CONSTANT ROW
| | `--SCALAR SUBQUERY xxxxxx
- | | `--SCAN TABLE w2
+ | | `--SCAN w2
| `--RECURSIVE STEP
- | |--SCAN TABLE w1
- | `--SCAN TABLE c
- |--SCAN SUBQUERY xxxxxx
- |--SEARCH TABLE w2 USING INTEGER PRIMARY KEY (rowid=?)
- `--SEARCH TABLE w1 USING INTEGER PRIMARY KEY (rowid=?)
+ | |--SCAN w1
+ | `--SCAN c
+ |--SCAN c
+ |--SEARCH w2 USING INTEGER PRIMARY KEY (rowid=?)
+ `--SEARCH w1 USING INTEGER PRIMARY KEY (rowid=?)
}
do_execsql_test 4.0 {
@@ -207,15 +207,15 @@ do_eqp_test 5.1 {
ORDER BY 1;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c
| |--SETUP
| | `--SCAN CONSTANT ROW
| `--RECURSIVE STEP
- | `--SCAN TABLE c
- |--SCAN SUBQUERY xxxxxx AS x1
- |--SCAN SUBQUERY xxxxxx AS x2
- |--SCAN SUBQUERY xxxxxx AS x3
- |--SCAN SUBQUERY xxxxxx AS x4
+ | `--SCAN c
+ |--SCAN x1
+ |--SCAN x2
+ |--SCAN x3
+ |--SCAN x4
`--USE TEMP B-TREE FOR ORDER BY
}
do_execsql_test 5.2 {
@@ -224,6 +224,23 @@ do_execsql_test 5.2 {
ORDER BY 1;
} {0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111}
+#-------------------------------------------------------------------------
+# At one point this would incorrectly report "circular reference: cte1"
+#
+do_catchsql_test 6.0 {
+ with
+ cte1(x, y) AS ( select 1, 2, 3 ),
+ cte2(z) as ( select 1 from cte1 )
+ select * from cte2, cte1;
+} {1 {table cte1 has 3 values for 2 columns}}
+
+do_catchsql_test 6.1 {
+ with
+ cte1(x, y) AS ( select 1, 2, 3 ),
+ cte2(z) as ( select 1 from cte1 UNION ALL SELECT z+1 FROM cte2 WHERE z<5)
+ select * from cte2, cte1;
+} {1 {table cte1 has 3 values for 2 columns}}
+
diff --git a/test/with6.test b/test/with6.test
index ef63ec8be..333147d8b 100644
--- a/test/with6.test
+++ b/test/with6.test
@@ -30,11 +30,11 @@ do_eqp_test 101 {
SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c
| `--SCAN 2 CONSTANT ROWS
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- `--SCAN SUBQUERY xxxxxx AS c3
+ |--SCAN c1
+ |--SCAN c2
+ `--SCAN c3
}
do_execsql_test 110 {
@@ -46,11 +46,11 @@ do_eqp_test 111 {
SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c
| `--SCAN 2 CONSTANT ROWS
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- `--SCAN SUBQUERY xxxxxx AS c3
+ |--SCAN c1
+ |--SCAN c2
+ `--SCAN c3
}
# Even though the CTE is not materialized, the self-join optimization
@@ -65,11 +65,11 @@ do_eqp_test 121 {
SELECT c1.x||c2.x||c3.x FROM c c1, c c2, c c3;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c
| `--SCAN 2 CONSTANT ROWS
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- `--SCAN SUBQUERY xxxxxx AS c3
+ |--SCAN c1
+ |--SCAN c2
+ `--SCAN c3
}
do_execsql_test 130 {
@@ -87,21 +87,21 @@ do_eqp_test 131 {
(SELECT x FROM c LIMIT 5) AS c3;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--CO-ROUTINE xxxxxx
+ |--MATERIALIZE c1
+ | |--CO-ROUTINE c
| | `--SCAN 2 CONSTANT ROWS
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | |--CO-ROUTINE xxxxxx
+ | `--SCAN c
+ |--MATERIALIZE c2
+ | |--CO-ROUTINE c
| | `--SCAN 2 CONSTANT ROWS
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | |--CO-ROUTINE xxxxxx
+ | `--SCAN c
+ |--MATERIALIZE c3
+ | |--CO-ROUTINE c
| | `--SCAN 2 CONSTANT ROWS
- | `--SCAN SUBQUERY xxxxxx
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- `--SCAN SUBQUERY xxxxxx AS c3
+ | `--SCAN c
+ |--SCAN c1
+ |--SCAN c2
+ `--SCAN c3
}
# The (SELECT x FROM c LIMIT N) subqueries get materialized once each.
@@ -123,17 +123,17 @@ do_eqp_test 141 {
(SELECT x FROM c LIMIT 7) AS c3;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c1
+ | |--MATERIALIZE c
| | `--SCAN 2 CONSTANT ROWS
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | `--SCAN SUBQUERY xxxxxx
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- `--SCAN SUBQUERY xxxxxx AS c3
+ | `--SCAN c
+ |--MATERIALIZE c2
+ | `--SCAN c
+ |--MATERIALIZE c3
+ | `--SCAN c
+ |--SCAN c1
+ |--SCAN c2
+ `--SCAN c3
}
do_execsql_test 150 {
@@ -151,17 +151,17 @@ do_eqp_test 151 {
(SELECT x FROM c LIMIT 7) AS c3;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c1
+ | |--MATERIALIZE c
| | `--SCAN 2 CONSTANT ROWS
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | `--SCAN SUBQUERY xxxxxx
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- `--SCAN SUBQUERY xxxxxx AS c3
+ | `--SCAN c
+ |--MATERIALIZE c2
+ | `--SCAN c
+ |--MATERIALIZE c3
+ | `--SCAN c
+ |--SCAN c1
+ |--SCAN c2
+ `--SCAN c3
}
do_execsql_test 160 {
@@ -175,11 +175,11 @@ do_eqp_test 161 {
FROM c AS c2 WHERE c2.x<10;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c
| `--SCAN 2 CONSTANT ROWS
- |--SCAN SUBQUERY xxxxxx AS c2
+ |--SCAN c2
`--CORRELATED SCALAR SUBQUERY xxxxxx
- `--SCAN SUBQUERY xxxxxx
+ `--SCAN c
}
do_execsql_test 170 {
@@ -193,13 +193,13 @@ do_eqp_test 171 {
FROM c AS c2 WHERE c2.x<10;
} {
QUERY PLAN
- |--CO-ROUTINE xxxxxx
+ |--CO-ROUTINE c
| `--SCAN 2 CONSTANT ROWS
- |--SCAN SUBQUERY xxxxxx AS c2
+ |--SCAN c2
`--CORRELATED SCALAR SUBQUERY xxxxxx
- |--CO-ROUTINE xxxxxx
+ |--CO-ROUTINE c
| `--SCAN 2 CONSTANT ROWS
- `--SCAN SUBQUERY xxxxxx
+ `--SCAN c
}
@@ -228,15 +228,15 @@ do_eqp_test 211 {
SELECT y FROM t2 ORDER BY y;
} {
QUERY PLAN
- |--MATERIALIZE xxxxxx
- | |--MATERIALIZE xxxxxx
+ |--MATERIALIZE c1
+ | |--MATERIALIZE c
| | `--SCAN 3 CONSTANT ROWS
- | `--SCAN SUBQUERY xxxxxx
- |--MATERIALIZE xxxxxx
- | `--SCAN SUBQUERY xxxxxx
- |--SCAN SUBQUERY xxxxxx AS c1
- |--SCAN SUBQUERY xxxxxx AS c2
- |--SCAN TABLE t1
+ | `--SCAN c
+ |--MATERIALIZE c2
+ | `--SCAN c
+ |--SCAN c1
+ |--SCAN c2
+ |--SCAN t1
`--USE TEMP B-TREE FOR ORDER BY
}
do_execsql_test 220 {
diff --git a/test/without_rowid6.test b/test/without_rowid6.test
index 567acfaed..06fc7435b 100644
--- a/test/without_rowid6.test
+++ b/test/without_rowid6.test
@@ -64,7 +64,7 @@ do_execsql_test_if_vtab without_rowid6-201 {
do_execsql_test without_rowid6-210 {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
do_execsql_test without_rowid6-220 {
PRAGMA index_list(t1);
} {/sqlite_autoindex_t1_2 1 pk/}
@@ -83,7 +83,7 @@ do_execsql_test without_rowid6-300 {
do_execsql_test without_rowid6-310 {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
do_execsql_test without_rowid6-320 {
PRAGMA index_list(t1);
} {/sqlite_autoindex_t1_2 1 pk/}
@@ -101,7 +101,7 @@ do_execsql_test without_rowid6-400 {
do_execsql_test without_rowid6-410 {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
do_execsql_test without_rowid6-420 {
PRAGMA index_list(t1);
} {/sqlite_autoindex_t1_2 1 pk/}
@@ -121,7 +121,7 @@ do_execsql_test_if_vtab without_rowid6-501 {
do_execsql_test without_rowid6-510 {
EXPLAIN QUERY PLAN
SELECT a FROM t1 WHERE b>3 ORDER BY b;
-} {/SEARCH TABLE t1 USING PRIMARY KEY .b>../}
+} {/SEARCH t1 USING PRIMARY KEY .b>../}
do_execsql_test without_rowid6-520 {
PRAGMA index_list(t1);
} {/sqlite_autoindex_t1_1 1 pk/}
diff --git a/tool/sqldiff.c b/tool/sqldiff.c
index 123d5b49b..9844cbadf 100644
--- a/tool/sqldiff.c
+++ b/tool/sqldiff.c
@@ -1713,19 +1713,27 @@ end_changeset_one_table:
}
/*
+** Return true if the ascii character passed as the only argument is a
+** whitespace character. Otherwise return false.
+*/
+static int is_whitespace(char x){
+ return (x==' ' || x=='\t' || x=='\n' || x=='\r');
+}
+
+/*
** Extract the next SQL keyword or quoted string from buffer zIn and copy it
** (or a prefix of it if it will not fit) into buffer zBuf, size nBuf bytes.
** Return a pointer to the character within zIn immediately following
** the token or quoted string just extracted.
*/
-const char *gobble_token(const char *zIn, char *zBuf, int nBuf){
+static const char *gobble_token(const char *zIn, char *zBuf, int nBuf){
const char *p = zIn;
char *pOut = zBuf;
char *pEnd = &pOut[nBuf-1];
char q = 0; /* quote character, if any */
if( p==0 ) return 0;
- while( *p==' ' ) p++;
+ while( is_whitespace(*p) ) p++;
switch( *p ){
case '"': q = '"'; break;
case '\'': q = '\''; break;
@@ -1744,7 +1752,7 @@ const char *gobble_token(const char *zIn, char *zBuf, int nBuf){
p++;
}
}else{
- while( *p && *p!=' ' && *p!='(' ){
+ while( *p && !is_whitespace(*p) && *p!='(' ){
if( pOut<pEnd ) *pOut++ = *p;
p++;
}