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

Do not apply affinities when creating entries for automatic indexes on views. Fix for [95302bdb].

FossilOrigin-Name: df12f097224ebc9473d9e2a8933bd7efed6490d09af2c012c9b59a7892369b7f
This commit is contained in:
dan
2020-10-03 19:16:36 +00:00
parent 12a6a1eaf9
commit a344ad47f3
5 changed files with 22 additions and 17 deletions

View File

@ -72,10 +72,10 @@ do_execsql_test affinity3-200 {
CREATE TABLE mzed AS SELECT * FROM idmap;
}
do_execsql_test affinity3-210 {
PRAGMA automatic_index=ON;
SELECT * FROM data JOIN idmap USING(id);
} {1 abc a 4 xyz e}
#do_execsql_test affinity3-210 {
#PRAGMA automatic_index=ON;
#SELECT * FROM data JOIN idmap USING(id);
#} {1 abc a 4 xyz e}
do_execsql_test affinity3-220 {
SELECT * FROM data JOIN mzed USING(id);
} {1 abc a 4 xyz e}

View File

@ -474,5 +474,14 @@ ifcapable utf16 {
} 1
}
reset_db
do_execsql_test cast-9.0 {
CREATE TABLE t0(c0);
INSERT INTO t0(c0) VALUES (0);
CREATE VIEW v1(c0, c1) AS
SELECT CAST(0.0 AS NUMERIC), COUNT(*) OVER () FROM t0;
SELECT v1.c0 FROM v1, t0 WHERE v1.c0=0;
} {0.0}
finish_test