mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Have the xBestIndex method of the generate_series virtual table ignore contraints on the "value" column with usable=0.
FossilOrigin-Name: f5113a2ef84831ad2da723fa7e29e0d575e74e10585741ff51db8c2e37332cd2
This commit is contained in:
@ -348,6 +348,29 @@ do_execsql_test tabfunc01-920 {
|
||||
) LIMIT -1 OFFSET 0;
|
||||
} {1 2 3 4 5 6 7 8 9 10 101 102 103 104}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Forum post https://sqlite.org/forum/forumpost/e7c3ae1215
|
||||
#
|
||||
foreach {tn where res} {
|
||||
1000 "where value = 2" 2
|
||||
1010 "where value in (2)" 2
|
||||
1020 "where value in (select 2)" 2
|
||||
1030 "where value = 2 OR value = 4" {2 4}
|
||||
1040 "where value in (2, 4)" {2 4}
|
||||
} {
|
||||
do_execsql_test $tn "
|
||||
SELECT value FROM generate_series(1, 5) $where
|
||||
" $res
|
||||
}
|
||||
|
||||
do_execsql_test 1100 {
|
||||
select 1 as c_0
|
||||
from
|
||||
generate_series(1, 1) as ref_3
|
||||
where (ref_3.value) in (select 1);
|
||||
} {1}
|
||||
|
||||
|
||||
|
||||
# Free up memory allocations
|
||||
intarray_addr
|
||||
|
Reference in New Issue
Block a user