Re: [sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-02 Thread Hick Gunter
parser should trigger an error if a subquery selects unknown columns from table I ran into a similar issue: DELETE FROM ATable WHERE EXISTS(SELECT 1 FROM TMPTable AS t WHERE id = t.id) ; Syntactically I was expecting id to be the ATable.id as I had aliased the TMPTable with t. But the result

Re: [sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-02 Thread Thomas Krueger
I ran into a similar issue: DELETE FROM ATable WHERE EXISTS(SELECT 1 FROM TMPTable AS t WHERE id = t.id) ; Syntactically I was expecting id to be the ATable.id as I had aliased the TMPTable with t. But the result was a non-correlated subquery, id = t.id was always true. The fix is clear, yet

Re: [sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-01 Thread Richard Hipp
On Wed, May 1, 2013 at 3:23 PM, Anderson Medeiros Gomes wrote: > Hi. I think I found a bug in SQLite, so I'm reporting it in this message. > > The print screen I have attached shows a query that SQLite executes and > brings no results. I believe SQLite should trigger an error

Re: [sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-01 Thread Nico Williams
On Wed, May 1, 2013 at 2:23 PM, Anderson Medeiros Gomes wrote: > Hi. I think I found a bug in SQLite, so I'm reporting it in this message. I do't think it's a bug. Correlated sub-queries can refer to columns from table sources outside them. Your example query is silly, no

[sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-01 Thread Anderson Medeiros Gomes
Hi. I think I found a bug in SQLite, so I'm reporting it in this message. The print screen I have attached shows a query that SQLite executes and brings no results. I believe SQLite should trigger an error while parsing my input, because I used an unknown column in the subquery. This is the