Re: [sqlite] [EXTERNAL] Implementing a statement cache

2019-12-16 Thread Hick Gunter
Any statement that has been stepped but not to completion will hold open the transaction on a connection. This may interfere with your expectations. Clearing bindings as a precaution will prevent inadvertent re-use of old bindings. The statement may have to be reset first, see documentation.

[sqlite] Implementing a statement cache

2019-12-16 Thread carsten.muencheberg
Hi, I am working on a generic cache for prepared statements and would like to make sure that I am not overlooking anything important. The cache is a simple map from an SQL string to a statement pointer. 1. When to call sqlite3_reset()? It looks like the safest and easiest approach is to call

Re: [sqlite] sqlite3_interrupt and explicit transactions

2019-12-16 Thread Keith Medcalf
On Monday, 16 December, 2019 12:17, Jesse Rittner wrote: > I have a few questions about how sqlite3_interrupt interacts with > explicit transaction operations. The docs say that "If the interrupted > SQL operation is an INSERT, UPDATE, or DELETE that is inside an > explicit transaction, then

Re: [sqlite] sqlite3_interrupt and explicit transactions

2019-12-16 Thread Simon Slavin
On 16 Dec 2019, at 7:16pm, Jesse Rittner wrote: > 1. Can sqlite3_interrupt interrupt a call to BEGIN or its variants (BEGIN > IMMEDIATE and BEGIN EXCLUSIVE)? If so, is the transaction automatically > "rolled back" in this case? > 2. What about an interrupt during an explicit call to COMMIT or

[sqlite] sqlite3_interrupt and explicit transactions

2019-12-16 Thread Jesse Rittner
I have a few questions about how sqlite3_interrupt interacts with explicit transaction operations. The docs say that "If the interrupted SQL operation is an INSERT, UPDATE, or DELETE that is inside an explicit transaction, then the entire transaction will be rolled back automatically." 1. Can

Re: [sqlite] [EXTERNAL] Difference between hex notation and string notation

2019-12-16 Thread Keith Medcalf
You will also note that the bytes in the blob must be the bytes in the underlying database text encoding in order for a cast to text to produce expected output (assuming that expected means valid text): sqlite> pragma encoding; UTF-8 sqlite> select x'414243'; ABC sqlite> pragma

Re: [sqlite] Performance vs. memory trade-off question

2019-12-16 Thread Nelson, Erik - 2
Dominique Devienne wrote on Monday, December 16, 2019 7:46 AM >On Sat, Dec 14, 2019 at 2:27 PM Richard Hipp wrote: >> QUESTION: Should this feature be default-on or default-off? >> >> What's more important to you? 0.25% fewer CPU cycles or about 72KB >> less heap space used per database

Re: [sqlite] Performance vs. memory trade-off question

2019-12-16 Thread Jose Isaias Cabrera
Give me speed anytime and twice on Sundays... From: sqlite-users on behalf of Eric Grange Sent: Saturday, December 14, 2019 04:11 PM To: SQLite mailing list Subject: Re: [sqlite] Performance vs. memory trade-off question While I am using SQLIite mostly in

Re: [sqlite] Performance vs. memory trade-off question

2019-12-16 Thread Dominique Devienne
On Sat, Dec 14, 2019 at 2:27 PM Richard Hipp wrote: > QUESTION: Should this feature be default-on or default-off? > > What's more important to you? 0.25% fewer CPU cycles or about 72KB > less heap space used per database connection? > Backward compatibility. I.e. if I change nothing in my

Re: [sqlite] A crash bug in sqlite

2019-12-16 Thread Richard Hipp
The bug does not exist in any released version of SQLite. It only appears in unreleased development versions. On 12/15/19, Chris Brody wrote: >> Yes. I discovered the same thing independently. The previous fix was >> subtly wrong. Please try the latest trunk version. > > Will there be a

[sqlite] Bug report

2019-12-16 Thread Mark Benningfield
In version 3.30.1 ( check-in [9b14eb77] ), file "sqlite3ext.h" 618 #define sqlite3_stmt_isexplain sqlite3_api->isexplain 619 #define sqlite3_value_frombind sqlite3_api->frombind should be 618 #define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain 619 #define

Re: [sqlite] SQL Murder Mystery

2019-12-16 Thread Stefan Evert
> On 16 Dec 2019, at 04:59, Simon Slavin wrote: > > A little light relief: > > > > Chosen SQL variation is SQLite ! Nice, but the crime is so easy to solve … SELECT CAST(x'4A6572656D7920426F77657273' AS TEXT); ;-)