Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Petite Abeille
On Feb 20, 2013, at 9:35 PM, "Jay A. Kreibich" wrote: > Not covert... works as documented: "Let us be charitable, and call it a misleading feature" -- Larry Wall > Not random either... at least, not any more random than any other > query. Result order is never meaningful

Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Petite Abeille
On Feb 20, 2013, at 9:29 PM, Richard Hipp wrote: > On Wed, Feb 20, 2013 at 3:25 PM, Petite Abeille > wrote: > >> >> On Feb 20, 2013, at 2:15 PM, Richard Hipp wrote: >> >>> SQLite automatically adds a LIMIT 1 to a scalar subquery.

Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Jay A. Kreibich
On Wed, Feb 20, 2013 at 09:25:54PM +0100, Petite Abeille scratched on the wall: > On Feb 20, 2013, at 2:15 PM, Richard Hipp wrote: > > > SQLite automatically adds a LIMIT 1 to a scalar subquery. > > Yeah? that's a bit of a death trap though? would be much more productive > if

Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Richard Hipp
On Wed, Feb 20, 2013 at 3:25 PM, Petite Abeille wrote: > > On Feb 20, 2013, at 2:15 PM, Richard Hipp wrote: > > > SQLite automatically adds a LIMIT 1 to a scalar subquery. > > Yeah… that's a bit of a death trap though… would be much more productive > if

Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Petite Abeille
On Feb 20, 2013, at 2:15 PM, Richard Hipp wrote: > SQLite automatically adds a LIMIT 1 to a scalar subquery. Yeah… that's a bit of a death trap though… would be much more productive if SQLite would raise an exception instead of doing something covert and random...

Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Simon Slavin
On 20 Feb 2013, at 12:17pm, Marcin Kałuża wrote: > sqlite> select * from t where v = (select v from t); > 1 There is no definition for what this means under SQL. Any SQL implementation might consider it an error, or always evaluate (item = list) as false, or do

Re: [sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Richard Hipp
On Wed, Feb 20, 2013 at 7:17 AM, Marcin Kałuża wrote: > We've encountered strange sqlite behavior: > > SQLite version 3.7.15.2 2013-01-09 11:53:05 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> create table t(v int4); > sqlite>

[sqlite] BUG? sqlite not reporting error like "more than one row returned by a subquery used as an expression"

2013-02-20 Thread Marcin Kałuża
We've encountered strange sqlite behavior: SQLite version 3.7.15.2 2013-01-09 11:53:05 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> create table t(v int4); sqlite> insert into t values (1),(2),(3); sqlite> select * from t where v = (select v from t); 1