Skip to content

Compound select statements ending in a VALUES-clause do not work properly. #2316

@cubinator

Description

@cubinator

Executing a compound select statement of the form

[select-core] [set-operator] [values-clause]
-- e.g. select * from table intersect values (...), ..., (...)
-    or values (...), ..., (...) intersect values (...), ..., (...)

results in a table that has the same shape as the actual result, but every cell is shaded red and contains loading... in italic. Currently, I can work around this by swapping the operands of the [set-operator] (unless it is except or both operands are values clauses), or by wrapping the values clause or the entire compound select statement in a with clause and selecting from it, i.e.

[values-clause] [set-operator] [select-core]

-- OR

with tmp as ( [values-clause] )
[select-core] [set-operator] select * from tmp

-- OR

with tmp as ( [select-core] [set-operator] [values-clause] )
select * from tmp

DB4S v3.11.2 [built for x86_64-little_endian-llp64] on Windows 10 (10.0) (winnt/10.0.18362) [x86_64]
using SQLite Version 3.27.2
and Qt 5.11.3

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions