Re: [sqlite] Result set column names

2019-12-08 Thread Graham Holden
Monday, December 09, 2019, 7:25:25 AM, Clemens Ladisch wrote: > The SQL-92 standard actually says: > > |Syntax Rules > | > |9) Case: > | > | b) If the i-th in the does not > | specify an and the of that > | is a single , then the > | of the i-th

Re: [sqlite] Result set column names

2019-12-08 Thread Clemens Ladisch
Keith Medcalf wrote: > If you do not provide as AS clause to give a result column a name, then > each implementation is free to provide whatever names it feels like (so > sayeth the standard). The SQL-92 standard actually says: |6.4 | | ::= [ ] | |7.9 | | ::= |

Re: [sqlite] wal mode

2019-12-08 Thread Barry
Even in rollback journal mode, it is not universally safe to use normal file operations on a SQLite database. See section 1.3 and 1.4 of https://www.sqlite.org/howtocorrupt.html If you want to use normal file system operations (or any type of manipulation not using the SQLite library) on an

Re: [sqlite] Crash Bug Report

2019-12-08 Thread D Burgess
3.30.1 x86_64 Linux Same problem here. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Tim Streater
On 08 Dec 2019, at 21:55, Simon Slavin wrote: > On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > >> The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. > > SQLite version 3.28.0 2019-04-15 14:49:49 > Enter ".help" for usage hints. > Connected to a transient in-memory

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Simon Slavin
simon@178 sqlite-tools-osx-x86-3300100 % ./sqlite3 SQLite version 3.30.1 2019-10-10 20:19:45 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE v0 ( v1 ) ; sqlite> CREATE TABLE v2 ( v3 ) ;

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Jose Isaias Cabrera
Yongheng Chen, on Sunday, December 8, 2019 02:51 PM, wrote... > > Hi, > > We found one crash bug in sqlite, which causes a dead loop and then OOM. > > CREATE TABLE v0 ( v1 ) ; > CREATE TABLE v2 ( v3 ) ; > CREATE VIEW v4 AS WITH x AS ( SELECT x () OVER( ) FROM v4 ) SELECT v3 AS x > FROM v2 ;

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Yongheng Chen
I haven’t tested many versions. But the most up-to-date master branch and the release version has this bug. > On Dec 8, 2019, at 4:55 PM, Simon Slavin wrote: > > On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > >> The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. >

Re: [sqlite] Crash Bug Report

2019-12-08 Thread Simon Slavin
On 8 Dec 2019, at 7:51pm, Yongheng Chen wrote: > The bug exists in "SQLite version 3.31.0 2019-12-08 00:06:39” and before. SQLite version 3.28.0 2019-04-15 14:49:49 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent

[sqlite] Crash Bug Report

2019-12-08 Thread Yongheng Chen
Hi, We found one crash bug in sqlite, which causes a dead loop and then OOM. CREATE TABLE v0 ( v1 ) ; CREATE TABLE v2 ( v3 ) ; CREATE VIEW v4 AS WITH x AS ( SELECT x () OVER( ) FROM v4 ) SELECT v3 AS x FROM v2 ; DROP TRIGGER IF EXISTS x ; ALTER TABLE v2 RENAME TO t3; The bug exists

Re: [sqlite] SLOW execution: Simple Query Uses More than 1 min

2019-12-08 Thread James K. Lowden
On Sat, 7 Dec 2019 05:23:15 + Simon Slavin wrote: > (Your operating system is allowed to do this. Checking how much > memory is available for every malloc takes too much time.) Not really. Consider that many (all?) operating systems before Linux that supported dynamic memory returned an

[sqlite] Expand a single Tcl variable into several SQL variables

2019-12-08 Thread Ramarro Marrone
I have these variables in Tcl. set insert {1 2 3 4 5} set select {3 5} I want SQL like this to be executed in SQLite. insert into tab (col) values (1), (2), (3), (4), (5); select * from tab where col in (3, 5); How should change the statements in the below group so they can

Re: [sqlite] Result set column names

2019-12-08 Thread Keith Medcalf
On Saturday, 7 December, 2019 16:05, Tim Streater wrote: >At various times in various threads on this list it has been stated that >the column name in a result set is not guaranteed unless one uses AS. >IOW, one should say > > select abc as abc from mytable where i=23; > >rather than just: > >