Re: [sqlite] sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

2020-03-10 Thread Dominique Pellé
Stefan Sperling wrote: > > Does valgrind give any clues? > > Valgrind does not run on the OpenBSD/sparc64 platform, unfortunately. Would the address sanitizer (i.e. gcc -fsanitize=address, or clang -fsanitize=address) work on OpenBSD/sparc64? Regards Dominique

Re: [sqlite] sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

2020-03-10 Thread Stefan Sperling
On Tue, Mar 10, 2020 at 01:21:34PM -0400, Richard Hipp wrote: > On 3/10/20, Stefan Sperling wrote: > > The query being executed is "STMT_INSERT_NODE": > > -- STMT_INSERT_NODE > > INSERT OR REPLACE INTO nodes ( > > wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path, > >

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread P Kishor
Hi, Besides the most excellent explanation given by Keith Medcalf, I want to point out a couple of (hopefully) helpful things – 1. Contrary to your subject line, SQLite actually does give a feedback/returns something. It is just not good enough (for many of us). Consider the following: ``` ○

Re: [sqlite] sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

2020-03-10 Thread Richard Hipp
On 3/10/20, Stefan Sperling wrote: > The query being executed is "STMT_INSERT_NODE": > -- STMT_INSERT_NODE > INSERT OR REPLACE INTO nodes ( > wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path, > revision, presence, depth, kind, changed_revision, changed_date, >

Re: [sqlite] sqlite3: .width counts bytes, not characters

2020-03-10 Thread Software
> I think the enhancement is here: > https://sqlite.org/src/timeline?c=ed0842c156ab1a78 > > That would correspond to version 3.20.0. > > -- > D. Richard Hipp Thank you. The upcoming Ubuntu LTS release (20.04) includes sqlite version 3.31.1, so the issue should disappear soon also for me.

[sqlite] sqlite 3.31.1 crashes in SVN on OpenBSD/sparc64

2020-03-10 Thread Stefan Sperling
Hi, We have seen sqlite segfault on OpenBSD/sparc64 in the context of running Subversion's regression test suite: https://ci.apache.org/builders/svn-bb-openbsd/builds/498 The log files show that a simple 'svn update' triggers the problem:

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Simon Slavin, on Tuesday, March 10, 2020 09:23 AM, wrote... > > On 10 Mar 2020, at 12:40pm, Jose Isaias Cabrera > wrote: > > > Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > > > >> That's going in my list of annoying questions. Thank you. > > > > Simon, with all due respect, and

Re: [sqlite] Is this an SQL parsing / ambiguity bug ?

2020-03-10 Thread Richard Hipp
On 3/10/20, Simon Slavin wrote: > On 9 Mar 2020, at 8:40pm, Vladimir Vysotsky wrote: > >> sqlite> insert into dst(id) select id from src on conflict do nothing; >> Error: near "do": syntax error > > SQLite does not understand "DO NOTHING". You probably want "ON CONFLICT > IGNORE". I think Vlad

Re: [sqlite] Is this an SQL parsing / ambiguity bug ?

2020-03-10 Thread Simon Slavin
On 9 Mar 2020, at 8:40pm, Vladimir Vysotsky wrote: > sqlite> insert into dst(id) select id from src on conflict do nothing; > Error: near "do": syntax error SQLite does not understand "DO NOTHING". You probably want "ON CONFLICT IGNORE".

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Simon Slavin
On 10 Mar 2020, at 12:40pm, Jose Isaias Cabrera wrote: > Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > >> That's going in my list of annoying questions. Thank you. > > Simon, with all due respect, and grateful for all the answers you have > provided to me, this is not an

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Keith Medcalf, on Tuesday, March 10, 2020 03:57 AM, wrote... > > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > > >I try to run a simple math expression, but SQLite gives no feedback : > > >sqlite> select 99-(55/(30/57)); > > >Should I expect it to return nothing? > > It is

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Jose Isaias Cabrera
Simon Slavin, on Tuesday, March 10, 2020 03:25 AM, wrote... > > On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > > > sqlite> select 99-(55/(30/57)); > > > > Should I expect it to return nothing? > > That's going in my list of annoying questions. Thank you. Simon, with all due respect, and

Re: [sqlite] Sqlite error code 14 when using 3.31.0+

2020-03-10 Thread Daniel Polski
Den 2020-03-10 kl. 02:33, skrev Rowan Worth: On Mon, 9 Mar 2020 at 23:22, Daniel Polski wrote: Updated to 3.31.1 but my application started spitting out an error when opening the database, so I tested some earlier sqlite versions to figure out when the problem starts. I don't get the message

Re: [sqlite] Sqlite error code 14 when using 3.31.0+

2020-03-10 Thread Graham Holden
Tuesday, March 10, 2020, 1:33:13 AM, Rowan Worth wrote: > On Mon, 9 Mar 2020 at 23:22, Daniel Polski wrote: >> Updated to 3.31.1 but my application started spitting out an error when >> opening the database, so I tested some earlier sqlite versions to figure >> out when the problem starts. >>

[sqlite] Is this an SQL parsing / ambiguity bug ?

2020-03-10 Thread Vladimir Vysotsky
I found a case where an "on conflict" clause generates an unexpected error, could this be an SQL parsing bug or grammar ambiguity? trivee@work:~/test$ sqlite3 --version 3.29.0 2019-07-10 17:32:03 fc82b73eaac8b36950e527f12c4b5dc1e147e6f4ad2217ae43ad82882a88alt1 trivee@work:~/test$ sqlite3 test.db

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread P Kishor
A very helpful and clear explanation to many of us not familiar with SQLite’s math idiosyncracies, or simply needing a refresher. Many thanks Keith. > On Mar 10, 2020, at 8:57 AM, Keith Medcalf wrote: > > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > >> I try to run a simple

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
I will use floating point as you all suggested. Thank you! Simon Slavin 于2020年3月10日周二 下午3:25写道: > On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > > > sqlite> select 99-(55/(30/57)); > > > > Should I expect it to return nothing? > > That's going in my list of annoying questions. Thank you. >

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
Thanks for the detailed explanation! Keith Medcalf 于2020年3月10日周二 下午3:58写道: > > On Tuesday, 10 March, 2020 01:22, Octopus ZHANG > wrote: > > >I try to run a simple math expression, but SQLite gives no feedback : > > >sqlite> select 99-(55/(30/57)); > > >Should I expect it to return nothing? > >

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
Yeah, I expected it should show the error message. I will check the related threads. radovan5 于2020年3月10日周二 下午4:02写道: > Hi, > > because sqlite calculate expression 30/57 as zero or 0. > So this give then divide by zero error when 55/0 is calculated. > Search more on google "Divide by 0 not

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread radovan5
Hi, because sqlite calculate expression 30/57 as zero or 0. So this give then divide by zero error when 55/0 is calculated. Search more on google "Divide by 0 not giving error in sqlite". If you need to calculate you must change this so that one number has affinity real like this: select

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Keith Medcalf
On Tuesday, 10 March, 2020 01:22, Octopus ZHANG wrote: >I try to run a simple math expression, but SQLite gives no feedback : >sqlite> select 99-(55/(30/57)); >Should I expect it to return nothing? It is returning something. It is returning NULL. sqlite> .nullvalue sqlite> select

Re: [sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Simon Slavin
On 10 Mar 2020, at 7:21am, Octopus ZHANG wrote: > sqlite> select 99-(55/(30/57)); > > Should I expect it to return nothing? That's going in my list of annoying questions. Thank you. sqlite> select 99.0-(55.0/(30.0/57.0)); -5.5 Now you can work out what the problem is.

[sqlite] No feedback for executing a mathematical expression

2020-03-10 Thread Octopus ZHANG
Hi all, I try to run a simple math expression, but SQLite gives no feedback : sqlite> select 99-(55/(30/57)); Should I expect it to return nothing? Thank you -- Yushan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org