[sqlite] -shm and -wal files left after trivially simple select statement from command line

2017-05-15 Thread Rob Willett
Hi, We've encountered what we think is an odd situation and we can't find any explanation for why this is. We're also not sure if its a problem or not. A brief summary is that we are doing a major database upgrade and are doing (lots) of testing. The box is a Linux box running Ubuntu 14.04

Re: [sqlite] -shm and -wal files left after trivially simple select statement from command line

2017-05-15 Thread J Decker
that was an old issue... current sqlite version do not have this issue. You MUST close the connection though, for the files to get deleted. http://sqlite.1065341.n5.nabble.com/journal-files-not-always-removed-td83700.html#a83705 On Mon, May 15, 2017 at 3:01 AM, Rob Willett

Re: [sqlite] -shm and -wal files left after trivially simple select statement from command line

2017-05-15 Thread Rob Willett
Thanks for this. This seems to be the old version of SQLite that comes with Ubuntu. We'll upgrade. Just to be clear we do close the connection as all we do is open the database using sqlite3 from the command line, do a select and close sqlite3 from the command line. We do not do anything

Re: [sqlite] -shm and -wal files left after trivially simple select statement from command line

2017-05-15 Thread Richard Hipp
On 5/15/17, Rob Willett wrote: > > As part of the testing we noticed that -shm and -wal files were being > left after we used sqlite3 on the command line. This puzzled us as we > didn't see any errors in our test scripts. How is the command being ended. Are you

Re: [sqlite] -shm and -wal files left after trivially simple select statement from command line

2017-05-15 Thread Rob Willett
Richard, J Decker, Just to close this down. The command was select * from device; We used .quit and Ctrl-D to exit the shell The command sequence was as simple as sqlite3 DATABASE.sqlite We knew about things like less and head and so we avoided them. The version of Sqlite seems to be the

Re: [sqlite] -shm and -wal files left after trivially simple select statement from command line

2017-05-15 Thread Richard Hipp
On 5/15/17, Richard Hipp wrote: > On 5/15/17, Rob Willett wrote: >> >> As part of the testing we noticed that -shm and -wal files were being >> left after we used sqlite3 on the command line. This puzzled us as we >> didn't see any errors in our

[sqlite] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread nomad
This works: SELECT 1 AS col ORDER BY col > 0 DESC; The following fails with "Error: 1st ORDER BY term does not match any column in the result set." SELECT 1 AS col UNION ALL SELECT 0 AS col ORDER BY col > 0 DESC; I've read "The

Re: [sqlite] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread nomad
On Mon May 15, 2017 at 09:58:31PM +0100, Simon Slavin wrote: > > On 15 May 2017, at 9:30pm, no...@null.net wrote: > > >SELECT > >1 AS col > >UNION ALL > >SELECT > >0 AS col > >ORDER BY > >col > 0 DESC; > > Out of interest, intuitively rather than reading

Re: [sqlite] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread David Raymond
The order by terms can still be complex expressions, they just have to match exactly (to all sub-queries in the join I believe) create table table1 (field1, field2); select field1 > 0 as foo, field2 + 42 as bar from table1 union all select field1 > 0 as foo, field2 - 42 as bar from table1...

Re: [sqlite] Documentation of valid ORDER BY terms after UNION?

2017-05-15 Thread Simon Slavin
On 15 May 2017, at 9:30pm, no...@null.net wrote: >SELECT >1 AS col >UNION ALL >SELECT >0 AS col >ORDER BY >col > 0 DESC; Out of interest, intuitively rather than reading documentation, which do you think should be done first ? Should SQL do both SELECTs

[sqlite] System.Data.SQLite version 1.0.105.1 released

2017-05-15 Thread Joe Mistachkin
System.Data.SQLite version 1.0.105.1 (with SQLite 3.18.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the