Re: [sqlite] Error/Result code documentation

2020-02-26 Thread Dominique Devienne
On Wed, Feb 26, 2020 at 11:09 AM Dominique Devienne wrote: > Hi. In the doc excerpt below from https://www.sqlite.org/rescode.html > are the $n*Code variables supposed to be expanded with a numeric > value, and there's a little issue in the doc generation? Thanks, --DD Thanks for the fix

Re: [sqlite] How to prevent sqlite_reset reporting an already known error

2020-02-26 Thread Simon Slavin
On 26 Feb 2020, at 11:58pm, mailing lists wrote: > The issue is that sqlite_reset() reports the same error that already > sqlite3_step() reported. How can I prevent that sqlite_reset() reports the > same error. You can't. It's working as designed. One would normally test the result that

[sqlite] How to prevent sqlite_reset reporting an already known error

2020-02-26 Thread mailing lists
I am executing a prepared statement S with a couple of different bindings. The execution sequence is similar to this while (moreBindings) { bind_parameters_to_prepared_statement; sqlite3_step(); if (error) { … } sqlite_reset(); if (error) { } } The issue is that sqlite_reset() reports the

[sqlite] VFS xFullPathname cannot access URI parameters

2020-02-26 Thread Chris Warner
In 3.31.1, attempting to access URI Parameters via the sqlite3_uri_* functions inside a VFS xFullPathname function returns junk.  This was not an issue in 3.30.1 or 3.31.0. The internals of those functions use the new databaseName() function, which attempts to find the database name from the

[sqlite] Issues with sqlite3session_attach(conn, NULL) w/ duplicate table in temp

2020-02-26 Thread Adam Levy
Hi all When I have a database connection with a temp table of the same name as a table in main, I am getting what I feel is unexpected behavior from the session extension. Most succinctly, I start a session on a connection on the main db with a table with an INTEGER PRIMARY KEY, attach it to all

Re: [sqlite] Trigger name missing

2020-02-26 Thread Jean-Luc Hainaut
On 26/02/2020 12:18, Richard Hipp wrote: On 2/26/20, Jean-Luc Hainaut wrote: Hi all, It seems that SQLite (version 31.1) accepts a trigger declaration in which the name is missing. When fired, this trigger doesn't crashes but exhibits a strange behaviour. In particular, while expression

[sqlite] [feature request] Quirk-fixing compile-time options

2020-02-26 Thread Joshua Wise
Hi, I was very happy to see the addition of the SQLITE_DQS compile-time option, which fixes one of the legacy bugs/quirks of SQLite3. I was wondering if additional compile-time options could be added to fix two other legacy quirks: - Primary Keys containing NULLs

Re: [sqlite] Fwd: inserting new data only

2020-02-26 Thread Jose Isaias Cabrera
James K. Lowden, on Wednesday, February 26, 2020 11:55 AM, wrote... > > On Tue, 25 Feb 2020 12:02:24 -0500 > Przemek Klosowski wrote: > > > and I want to avoid storing repetitive data, so that the database > > should contain > > 10:32 12 > > 10:35 15 > > 10:39 13 > > 10:46 18 > > where only

Re: [sqlite] inserting new data only

2020-02-26 Thread Simon Slavin
On 26 Feb 2020, at 5:18pm, Przemek Klosowski wrote: > This 'store only changed values' is > intended for situations like that. > Another suitable candidate for that treatment might be a status, for > instance 'on battery' value for a UPS monitoring system. I can't think of a > scenario where

Re: [sqlite] Fwd: inserting new data only

2020-02-26 Thread Przemek Klosowski
On Wed, Feb 26, 2020 at 11:56 AM James K. Lowden wrote: > > and I want to avoid storing repetitive data, so that the database > > should contain > > [...] > > only the earliest time with the unchanging value is stored. > > Be careful what you wish for. Usually "avoid storing" is a proxy for >

Re: [sqlite] Fwd: inserting new data only

2020-02-26 Thread James K. Lowden
On Tue, 25 Feb 2020 12:02:24 -0500 Przemek Klosowski wrote: > and I want to avoid storing repetitive data, so that the database > should contain > 10:32 12 > 10:35 15 > 10:39 13 > 10:46 18 > where only the earliest time with the unchanging value is stored. Be careful what you wish for.

Re: [sqlite] Trigger name missing

2020-02-26 Thread Jose Isaias Cabrera
SQLite is even better than I thought... From: sqlite-users on behalf of Richard Hipp Sent: Wednesday, February 26, 2020 11:44 AM To: SQLite mailing list Subject: Re: [sqlite] Trigger name missing On 2/26/20, Simon Slavin wrote: > > Backward compatibility ?

Re: [sqlite] Trigger name missing

2020-02-26 Thread Richard Hipp
On 2/26/20, Simon Slavin wrote: > > Backward compatibility ? Do you think anyone who used the word AFTER > really wants a BEFORE trigger ? More likely to be a bug they should know > about. We have seen triggers like this in the wild, that work as intended. If we change it to throw an error,

Re: [sqlite] Trigger name missing

2020-02-26 Thread Simon Slavin
On 26 Feb 2020, at 2:15pm, Dan Kennedy wrote: > A statement like the following creates a "BEFORE" trigger named "AFTER". Does > that explain things? > > CREATE TRIGGER AFTER INSERT ON t1 BEGIN > ... > END; > > I find I fall into this trap about once every 18 months... If only you

Re: [sqlite] more efficient JSON encoding: idle musing

2020-02-26 Thread Paul van Helden
> > > I experimented with a number of similar ideas for storing JSON when I > was first designing the JSON components for SQLite. I was never able > to find anything that was as fast or as compact as just storing the > original JSON text. > I've also done a lot of experiments and was surprised

Re: [sqlite] Trigger name missing

2020-02-26 Thread Dan Kennedy
On 26/2/63 16:31, Jean-Luc Hainaut wrote: Hi all, It seems that SQLite (version 31.1) accepts a trigger declaration in which the name is missing. When fired, this trigger doesn't crashes but exhibits a strange behaviour. In particular, while expression "new." in an "insert" trigger returns

Re: [sqlite] sqliteDefaultBusyCallback and HAVE_USLEEP

2020-02-26 Thread Peter Kolbus
> On Feb 26, 2020, at 5:53 AM, Graham Holden wrote: > > Wednesday, February 26, 2020, 11:15:14 AM, Richard Hipp > wrote: > >>> On 2/25/20, Peter Kolbus wrote: >>> I noticed that sqliteDefaultBusyCallback() seems to depend directly on the >>> OS (behave differently based on

Re: [sqlite] sqliteDefaultBusyCallback and HAVE_USLEEP

2020-02-26 Thread Graham Holden
Wednesday, February 26, 2020, 11:15:14 AM, Richard Hipp wrote: > On 2/25/20, Peter Kolbus wrote: >> I noticed that sqliteDefaultBusyCallback() seems to depend directly on the >> OS (behave differently based on SQLITE_OS_WIN||HAVE_USLEEP). Since the >> underlying primitive, sqlite3OsSleep(),

Re: [sqlite] Trigger name missing

2020-02-26 Thread Richard Hipp
On 2/26/20, Jean-Luc Hainaut wrote: > Hi all, > > It seems that SQLite (version 31.1) accepts a trigger declaration in > which the name is missing. When fired, this trigger doesn't crashes but > exhibits a strange behaviour. In particular, while expression > "new." in an "insert" trigger returns

Re: [sqlite] sqliteDefaultBusyCallback and HAVE_USLEEP

2020-02-26 Thread Richard Hipp
On 2/25/20, Peter Kolbus wrote: > I noticed that sqliteDefaultBusyCallback() seems to depend directly on the > OS (behave differently based on SQLITE_OS_WIN||HAVE_USLEEP). Since the > underlying primitive, sqlite3OsSleep(), actually uses the VFS to sleep, and > unixSleep() also has a roundup to

Re: [sqlite] unexpected sqlite_busy behaviour within transactions

2020-02-26 Thread Software
Dear Igor, Andy, Keith Thank you for your patience to explain. Now very clear to me why it is not worth for the second process to honor the sqlite_busy handler, and instead returns immediately. In retrospect re-reading with your explanations in mind, I also understand the official

[sqlite] Error/Result code documentation

2020-02-26 Thread Dominique Devienne
Hi. In the doc excerpt below from https://www.sqlite.org/rescode.html are the $n*Code variables supposed to be expanded with a numeric value, and there's a little issue in the doc generation? Thanks, --DD 4. Primary Result Code List The $nPrimCode result codes ... 5. Extended Result Code List

[sqlite] Trigger name missing

2020-02-26 Thread Jean-Luc Hainaut
Hi all, It seems that SQLite (version 31.1) accepts a trigger declaration in which the name is missing. When fired, this trigger doesn't crashes but exhibits a strange behaviour. In particular, while expression "new." in an "insert" trigger returns the correct value, the equivalent

Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte
Hello and thank you for reply ! As I said it's an exercise to know the peculiarities of compiling on this platform and I'm exposing this experience here in hope it can help others and improve sqlite build system. If what you mention is correct about requiring tcl 8.5 or newer then the

Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Shawn Wagner
I'm pretty sure the full build scripts require tcl 8.5 or newer. Maybe try the -amalgamation or -autoconf versions? On Wed, Feb 26, 2020 at 1:21 AM Domingo Alvarez Duarte wrote: > Hello ! > > > > $ uname -a > AIX minimal 1 7 00C63E504B00 > $ tclsh > % puts $tcl_patchLevel > 8.4.7 > % >

Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte
Hello ! $ uname -a AIX minimal 1 7 00C63E504B00 $ tclsh % puts $tcl_patchLevel 8.4.7 % On 26/2/20 10:19, Shawn Wagner wrote: puts $tcl_patchLevel ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Shawn Wagner
What version of tcl do you have installed? (At the tclsh prompt, do a `puts $tcl_patchLevel`) On Wed, Feb 26, 2020 at 1:05 AM Domingo Alvarez Duarte wrote: > Hello ! > > Trying to compile https://sqlite.org/2020/sqlite-src-3310100.zip on AIX > 7.1 operating system for exercise and to know the

Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte
Going forward after fixing the access mode from "rb" to "r" we get this error (tclsh8.4): tclsh /home/mingo/dev/sqlite-src-3310100/tool/mkshellc.tcl >shell.c cp /home/mingo/dev/sqlite-src-3310100/ext/fts5/fts5parse.y . rm -f fts5parse.h ./lemon  -S fts5parse.y tclsh

[sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte
Hello ! Trying to compile https://sqlite.org/2020/sqlite-src-3310100.zip on AIX 7.1 operating system for exercise and to know the peculiarities of building software on this OS and I'm getting this error, somehow tclsh that is installed on this OS do not wrap/hide OS incompatibilities.