Re: [sqlite] A hang in Sqlite

2020-01-05 Thread Dan Kennedy
On 6/1/63 13:44, Yongheng Chen wrote: Hi, We found a test case that hangs Sqlite: — CREATE TEMPORARY TABLE v0 ( v1 INT UNIQUE ) ; WITH RECURSIVE v0 ( v1 ) AS ( SELECT -128 UNION SELECT v1 + 33 FROM v0 ) SELECT 'x' from v0; — This seems triggering a dead loop. However, since v0 is empty, it

[sqlite] A hang in Sqlite

2020-01-05 Thread Yongheng Chen
Hi, We found a test case that hangs Sqlite: — CREATE TEMPORARY TABLE v0 ( v1 INT UNIQUE ) ; WITH RECURSIVE v0 ( v1 ) AS ( SELECT -128 UNION SELECT v1 + 33 FROM v0 ) SELECT 'x' from v0; — This seems triggering a dead loop. However, since v0 is empty, it might not enter a dead loop I think ? We

[sqlite] Root cause of an assertion failed.

2020-01-05 Thread Yongheng Chen
Hi, We noticed that an assertion is converted back to a conditional in this check in(https://www.sqlite.org/src/info/4d0b9109f7a5312d4e136395e08b11dad64d746bc106ad44d47675e5b1dcb4ef ). We are

Re: [sqlite] Performance regression since 3.19.0

2020-01-05 Thread Richard Hipp
How does the performance compare with this: CREATE TABLE t1 (a TEXT, b TEXT); CREATE TABLE t2 (a TEXT, b TEXT); CREATE INDEX t1_a ON t1 (a,b); CREATE INDEX t2_a ON t2 (a,b); SELECT * FROM t1 LEFT JOIN t2 ON (t1.b=t2.b AND t2.a='123') WHERE t1.a='123'; On 1/5/20, Peter Inglesby wrote: > Is

Re: [sqlite] Update SQLITE

2020-01-05 Thread Keith Medcalf
On Sunday, 5 January, 2020 16:39, gideo...@lutzvillevineyards.com wrote: >I have the following SQLITE query : > >SELECT BlokkeklaarAliasnaam, BlokkeklaarKultivar, sum(BlokkeklaarSkatting) >FROM Blokkeklaar >GROUP BY BlokkeklaarAliasnaam, BlokkeklaarKultivar; >

[sqlite] Performance regression since 3.19.0

2020-01-05 Thread Peter Inglesby
Hi, I've encountered a performance regression that was introduced in 41c27bc0ff1d3135 (3.19.0 2017-04-18 11:20:19). Following the guidance in "How To Report Bugs Against SQLite" on the wiki, I'm reporting it here. With these tables and indexes: CREATE TABLE t1 (a TEXT, b TEXT); CREATE TABLE t2

[sqlite] Update SQLITE

2020-01-05 Thread gideon.e
I have the following SQLITE query : SELECT BlokkeklaarAliasnaam, BlokkeklaarKultivar, sum(BlokkeklaarSkatting) FROM Blokkeklaar GROUP BY BlokkeklaarAliasnaam, BlokkeklaarKultivar; I cannot

Re: [sqlite] Bug? SQLite command-line result is different from Perl DBI::Sqlite result

2020-01-05 Thread Keith Medcalf
On Sunday, 5 January, 2020 04:42, Richard Hipp wrote: >On 1/5/20, Keith Medcalf wrote: >> Hrm. Inconsistent/incorrect results. Consider: >> create table a(id integer primary key, a); >> insert into a values (1,1), (2,1), (3,1); >> create table b(id integer primary key, b); >> insert into b

Re: [sqlite] SQLite command-line result is different from Perl DBI::Sqlite result (Keith Medcalf)

2020-01-05 Thread Simon Slavin
On 5 Jan 2020, at 5:01pm, Amer Neely wrote: > But the question still remains, why the different results? The optimizer gets improved from time to time in SQLite versions. SQLite solved the problem faster by breaking down your query differently: deciding whether to do one scan or use two

Re: [sqlite] Bug? SQLite command-line result is different from Perl DBI::Sqlite result

2020-01-05 Thread Amer Neely
> On 1/5/20, Keith Medcalf wrote: >> >> Hrm. Inconsistent/incorrect results. Consider: >> >> create table a(id integer primary key, a); >> insert into a values (1,1), (2,1), (3,1); >> create table b(id integer primary key, b); >> insert into b values (1,2), (3,2), (4,2); >> create table c(id

Re: [sqlite] SQLite command-line result is different from Perl DBI::Sqlite result (Keith Medcalf)

2020-01-05 Thread Amer Neely
> On Saturday, 4 January, 2020 18:31, Amer Neely > wrote: > >> I'm fairly new to SQLite, but have been using MySQL / mariadb in a local >> and web-based environment for several years. So far I'm happy and >> impressed with SQLite, but I recently noticed some odd behaviour with >> one of my

Re: [sqlite] SQLite command-line result is different from Perl DBI::Sqlite result (Igor Korot)

2020-01-05 Thread Amer Neely
-- > What is your version of Perl and the SQLite module? This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) Copyright 1987-2013, Larry Wall SQLite version 3.30.1 2019-10-10 20:19:45 Enter ".help" for

Re: [sqlite] Bug? SQLite command-line result is different from Perl DBI::Sqlite result

2020-01-05 Thread Richard Hipp
On 1/5/20, Richard Hipp wrote: > > Note that both MySQL and SQLite do allow you to use parentheses, as > shown in my examples, to define the order of evaluation. PostgreSQL > does not, sadly. > Apparently, in PostgreSQL you have to say: SELECT * FROM (SELECT * FROM a, b) AS x JOIN c

Re: [sqlite] Bug? SQLite command-line result is different from Perl DBI::Sqlite result

2020-01-05 Thread Richard Hipp
On 1/5/20, Keith Medcalf wrote: > > Hrm. Inconsistent/incorrect results. Consider: > > create table a(id integer primary key, a); > insert into a values (1,1), (2,1), (3,1); > create table b(id integer primary key, b); > insert into b values (1,2), (3,2), (4,2); > create table c(id integer