[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Jean-Christophe Deschamps
At 22:28 25/08/2015, you wrote: >In the next version of SQLite3 the names of all columns will be >'columnname' "Don't trust me" could be more apropriate.

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Tim Streater
On 25 Aug 2015 at 19:37, Richard Hipp wrote: > On 25/8/15, Simon Slavin wrote: >> >> "If there is no AS clause then the name of the column is unspecified and may >> change from one release of SQLite to the next." > Heed this warning!!! > > And yet, there are countless tens of thousands of

[sqlite] order by not working in combination with random()

2015-08-25 Thread Stephen Chrzanowski
Somewhat of a devils advocate here, but I'm not sure one can order based on JUST data. Take the DATE function, for example. If, by your words, ORDER BY should only act on the data, consider this kind of query: select ItemName,SoldDate from SoldItemDetails order by SoldDate

[sqlite] order by not working in combination with random()

2015-08-25 Thread James K. Lowden
On Mon, 17 Aug 2015 12:01:58 +0200 Clemens Ladisch wrote: > Just because the ORDER BY clause refers to a column of the > SELECT clause does not mean that the value is not computed > a second time. Let's at least recognize that as a bug. ORDER BY shouldn't interpret SQL or invoke functions.

[sqlite] Boolean constraint regression between 3.7.7.1 and 3.8.6?

2015-08-25 Thread James K. Lowden
On Mon, 17 Aug 2015 17:19:49 +0200 Olivier Barthelemy wrote: > CREATE TABLE VariableDetails (dtl_id INTEGER PRIMARY KEY ASC > AUTOINCREMENT, storage_implicit BOOLEANCHECK (storage_implicit = > 'true' OR storage_implicit = 'false'), storage_type TEXT NOT NULL); > > Insert statement > INSERT INTO

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 8:52pm, Scott Robison wrote: > On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > >> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: >> >>> I vote to change it every release... Stimulate better habits! >> >> Seconded. Keep them on their toes! > > Or randomly generate names

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Petite Abeille
> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: > > I vote to change it every release... Stimulate better habits! Seconded. Keep them on their toes!

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread R.Smith
On 2015-08-25 08:37 PM, Richard Hipp wrote: > On 8/25/15, Simon Slavin wrote: >> "If there is no AS clause then the name of the column is unspecified and may >> change from one release of SQLite to the next." >> > Heed this warning!!! > > And yet, there are countless tens of thousands of

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Stephan Beal
The behaviour you're asking about is explicitly undefined in sqlite. Today it might work like you are reporting and tomorrow it might do something different. The ONLY way to guarantee specific column names is to do what Simon suggested: always use "as". If you don't, the exact results are

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
First of all thanks for reply ! I can understand your point, what confuses me is that when we query a view with "a.*" it doesn't qualify the names so I thought that was a mistake when we use individual names otherwise I would expected qualified names there too. Cheers ! > Tue Aug 25 2015

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Richard Hipp
On 8/25/15, Tim Streater wrote: > On 25 Aug 2015 at 19:37, Richard Hipp wrote: > >> On 25/8/15, Simon Slavin wrote: >>> >>> "If there is no AS clause then the name of the column is unspecified and >>> may >>> change from one release of SQLite to the next." > >> Heed this warning!!! >> >> And

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:52pm, sqlite-mail wrote: > I can understand your point, what confuses me is that when we query a view > with "a.*" it doesn't qualify the names so I thought that was a mistake when > we use individual names otherwise I would expected qualified names there too. I understand

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
Hello ! When querying views sqlite shows qualified column names if they are specified individually. Is this the expected result or a bug ? This behavior breaks some of my code that uses column names for other purposes. Cheers ! output of "test-view-alias" SQL: SELECT a.* FROM

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:23pm, Roger Binns wrote: > Generally you would be better off using something like homebrew: > > http://brew.sh/ > > [snip] > > Instruments isn't too bad, but IIRC does not do the same thing as > valgrind. Instruments is a lighter less thorough functionality. > Simon

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > When querying views sqlite shows qualified column names if they are specified > individually. Sorry but this has been mentioned a few times here and won't be changed. The SQL standard doesn't mention column names so SQL engines are free to do

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Richard Hipp
On 8/25/15, Simon Slavin wrote: > > "If there is no AS clause then the name of the column is unspecified and may > change from one release of SQLite to the next." > Heed this warning!!! And yet, there are countless tens of thousands of applications in circulation that have ignored this warning

[sqlite] Enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT by default

2015-08-25 Thread Richard Hipp
On 8/25/15, V.Krishn wrote: > > Hi, > > Will there be any issue if SQLITE_ENABLE_UPDATE_DELETE_LIMIT was enabled by > > default ? > ( I understand it cannot be used in triggers even though ) > That won't work with the amalgamation (sqlite3.c). You have to download the canonical source code and

[sqlite] Potential for Segmentation Violation/Fault in sqlite 3.8.11.1

2015-08-25 Thread Richard Hipp
On 8/25/15, Dan Kennedy wrote: > On 08/25/2015 11:36 PM, Bill Parker wrote: >> >> The patch file below should catch and handle all conditions where >> Tcl_Alloc() is called, but are NOT checked for a return value of NULL: > > Does Tcl_Alloc() actually return NULL if a malloc fails? I thought if >

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Scott Robison
On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > > > > On Aug 25, 2015, at 8:53 PM, R.Smith wrote: > > > > I vote to change it every release... Stimulate better habits! > > Seconded. Keep them on their toes! > Or randomly generate names after every prepare! Or just leave them anonymous.

[sqlite] Performance problems on windows

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 9:52am, Jakub Zakrzewski wrote: > Thanks for interest. If I can provide any useful information, just tell me, > what you need. I cannot reveal the source code but some profiling results or > SQL statements are not a secret. Can you provide a short series of SQL statements

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 10:38am, Jeff M wrote: > Looking at Xcode's memory report (and using Instruments), I see that memory > does ratchet up, despite my being very careful matching alloc/releases (this > app is pre-ARC). I need to relearn Instruments. You were tricked. You don't need to

[sqlite] Performance problems on windows

2015-08-25 Thread Scott Robison
On Aug 25, 2015 5:21 AM, "Jakub Zakrzewski" wrote: > > Hi, > > The slowdown is confirmed by one of our customers. He uses Win 2008 Server x64. I'm testing on Win7 x64. This might be obvious in which case my apologies for bringing it up but: are these systems demonstrating slowness perhaps

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-25 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/25/2015 02:38 AM, Jeff M wrote: > I tried to install valgrind (on Mac OS Yosemite), but I can't get > it to compile. I don't have the fortitude to work out the install > issues. Generally you would be better off using something like homebrew:

[sqlite] Compile warnings

2015-08-25 Thread David Bennett
Fair enough. Bearing in mind that any new code path requires a new test case and coverage. Regards David M Bennett FACS _ Andl - A New Database Language - andl.org From: Scott Robison [mailto:sc...@casaderobison.com] Sent: Tuesday, 25 August 2015 1:24 AM To: General Discussion

[sqlite] football.db - New 2015/16 Seasons - English Premier League, Bundesliga, etc.

2015-08-25 Thread Gerald Bauer
Hello, The plain text football fixtures for leagues, teams, match schedules, stadiums, and more that you can read with the sportdb gem into an SQLite database e.g. football.db - thus, the project name ;-) - now includes the 2015/16 seasons for the English Premier League [1], the Deutsche

[sqlite] Missing Sanity Checks for calls to sqlite3_realloc64() in shell.c

2015-08-25 Thread Bill Parker
Hello All, In reviewing code in sqlite 3.8.11.1, I found a pair of calls to sqlite3_realloc64() which upon return are NOT checked for a return value of NULL, indicating failure. The patch file below should correct this issue:

[sqlite] Potential for Segmentation Violation/Fault in sqlite 3.8.11.1

2015-08-25 Thread Bill Parker
Hello All, In reviewing source code files in sqlite 3.8.11.1, I found some instances of calls to Tcl_Alloc() which are not checked for a return value of NULL, indicating failure in directory '/tea/generic', file 'tclsqlite3.c'. Additionally, in the event of failure, there are some cases

[sqlite] Performance problems on windows

2015-08-25 Thread Jakub Zakrzewski
Hi, because our product is quite complicated, I have to measure the processing time of the entire dataset. I log transitions between states and the difference between first transition and the last one is my score. The measurements are pretty stable and I don't count in the startup or shutdown

[sqlite] Performance problems on windows

2015-08-25 Thread Richard Hipp
On 8/25/15, Jakub Zakrzewski wrote: > If I can provide any useful information, just tell me, Perchance, do you have a reproducible test case that you can share? Have you considered adding timers on individual SQL operations to see which ones are slower and/or faster? Can you record all SQL

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-25 Thread Jeff M
On Aug 24, 2015, at 11:50 AM, Roger Binns wrote: > On 08/24/2015 03:08 AM, Jeff M wrote: >> I've checked all of your suggestions and nothing is amiss. > > You ran valgrind and it said everything is fine? That would be shocking. You caught me. I wasn't familiar with valgrind, so I passed over

[sqlite] Compile warnings

2015-08-25 Thread Scott Robison
Agreed. It's easy for me to say what I think should be done since I'm not writing or maintaining the code. On Mon, Aug 24, 2015, 5:53 PM David Bennett wrote: > Fair enough. Bearing in mind that any new code path requires a new test > case and coverage. > > > > Regards > > David M Bennett FACS >