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 ROL

[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 sqlit

Re: [sqlite] sqlite3_interrupt vs. SQLITE_CONFIG_SINGLETHREAD

2019-08-14 Thread Deon Brewis
Wednesday, August 14, 2019 6:19 AM To: SQLite mailing list Subject: Re: [sqlite] sqlite3_interrupt vs. SQLITE_CONFIG_SINGLETHREAD On 8/14/19, Deon Brewis wrote: > sqlite3_interrupt is documented as: > “It is safe to call this routine from a thread different from the > thread that is cur

Re: [sqlite] sqlite3_interrupt vs. SQLITE_CONFIG_SINGLETHREAD

2019-08-14 Thread Richard Hipp
On 8/14/19, Deon Brewis wrote: > sqlite3_interrupt is documented as: > “It is safe to call this routine from a thread different from the thread > that is currently running the database operation” > > SQLITE_CONFIG_SINGLETHREAD is documented as: > “puts SQLite into a mode where it can only be used

[sqlite] sqlite3_interrupt vs. SQLITE_CONFIG_SINGLETHREAD

2019-08-14 Thread Deon Brewis
sqlite3_interrupt is documented as: “It is safe to call this routine from a thread different from the thread that is currently running the database operation” SQLITE_CONFIG_SINGLETHREAD is documented as: “puts SQLite into a mode where it can only be used by a single thread” Which one wins 😉? i.e

[sqlite] sqlite3_interrupt

2019-01-18 Thread Michele Pradella
Hi all, I was looking to the sqlite3_interrupt to make my application closing faster without waiting for long standing DB operation. I read in the documentation that should not be a problem to call it during insert update or delete: if transaction is running is automatically rolled back. Do you

Re: [sqlite] sqlite3_interrupt() for controlled interruption

2013-12-03 Thread Chen, Mi
This is exactly what I need. Thanks very much! Mi Chen -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Tuesday, December 03, 2013 7:46 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite

Re: [sqlite] sqlite3_interrupt() for controlled interruption

2013-12-03 Thread Igor Tandetnik
On 12/3/2013 9:26 PM, Chen, Mi wrote: I want to use sqlite3_interrupt() to interrupt the statement that is executing sqlite3_step() for the first time in the worker. It is mutex protected so I already make sure that when sqlite3_interrupt() is called, my worker thread is running sqlite3_step()

[sqlite] sqlite3_interrupt() for controlled interruption

2013-12-03 Thread Chen, Mi
I run into an issue where I have a database connection that have quite a few queries that were suspended due to managed priorities... I have two threads, the control thread (UI), and a sqlite3 worker thread. I want to use sqlite3_interrupt() to interrupt the statement that is executing sqlite3_s

[sqlite] sqlite3_interrupt() can interrupt query started after it's return

2009-04-17 Thread Filipe AZEVEDO
Hi, I'm using sqlite as the sql driver of Qt 4. I have a connection created in a thread and i call sqlite3_interrupt() from another one. It's working great, perhaps i have not the behavior that say the doc : "A call to sqlite3_interrupt() has no effect on SQL statements that are started after

[sqlite] sqlite3_interrupt and transactions

2008-04-02 Thread Igor Sereda
Greetings! I need to be able to interrupt a long-running query within a transaction. The question is: is it possible that changes made previously in this transaction will be affected? Example pseudo-code: 1. BEGIN IMMEDIATE 2. INSERT INTO x (x) VALUES ('y'); 3. SELECT long_running_query

Re: [sqlite] sqlite3_interrupt from another thread

2007-01-31 Thread drh
Roger Binns <[EMAIL PROTECTED]> wrote: > > We had an earlier discussion about calling sqlite3_interrupt from > another thread, which wasn't possible at the time: > > It looks like the code is fixed for 3.3.12 (and possibly earlier). I > just wanted to double check that it is now officially safe

[sqlite] sqlite3_interrupt from another thread

2007-01-31 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 We had an earlier discussion about calling sqlite3_interrupt from another thread, which wasn't possible at the time: http://article.gmane.org/gmane.comp.db.sqlite.general/20427 It looks like the code is fixed for 3.3.12 (and possibly earlier). I jus

[sqlite] sqlite3_interrupt() works

2006-08-25 Thread Rob Richardson
Greetings! After installing SQLite 3.3.7 and making sure I was passing the correct pointer to sqlite3_interrupt(), I got it to work. Rob Richardson RAD-CON INC.

RE: [sqlite] sqlite3_interrupt()

2006-08-24 Thread Rob Richardson
I think I've found the problem. The next step in debugging was to find the actual sqlite3 library calls I was making, just to make sure the delay wasn't somewhere else in my code. Here's the trace statements: GetTrendData() started at Thu Aug 24 16; sqlite object is at 056B9570. select tag_key,v

RE: [sqlite] sqlite3_interrupt()

2006-08-24 Thread Rob Richardson
Dr. Hipp, Thank you very much for your earlier assistance. As you suggested, I downloaded the version 3.3.7 source code and built it into a static library. My application now correctly reports that it is using version 3.3.7. But sqlite3_interrupt() still seems to be doing nothing. I added TRAC

Re: [sqlite] sqlite3_interrupt()

2006-08-24 Thread drh
"Rob Richardson" <[EMAIL PROTECTED]> wrote: > Dr. Hipp, > > Thank you very much for your earlier assistance. As you suggested, I > downloaded the version 3.3.7 source code and built it into a static > library. My application now correctly reports that it is using version > 3.3.7. > > But sqlite

RE: [sqlite] sqlite3_interrupt()

2006-08-24 Thread Rob Richardson
Dr. Hipp, Thanks for your reply. The question of which version I'm using is up in the air right now. I threw a call to sqlite3_libversion() into my application, and it returned "3.2.1". I asked our lead developer (who's in Indiana while the rest of us are just west of Cleveland, OH) what versio

Re: [sqlite] sqlite3_interrupt()

2006-08-24 Thread drh
"Rob Richardson" <[EMAIL PROTECTED]> wrote: > I have a thread that executes a query that takes about 30 seconds on my > test setup. In the field, the query could take several minutes. The > user needs to be able to stop this query if it was started by accident. > I have a pointer to the sqlite3 o

[sqlite] sqlite3_interrupt()

2006-08-24 Thread Rob Richardson
I have a thread that executes a query that takes about 30 seconds on my test setup. In the field, the query could take several minutes. The user needs to be able to stop this query if it was started by accident. I have a pointer to the sqlite3 object that is running the query inside my thread. I

Re: [sqlite] sqlite3_interrupt() and threads

2006-07-26 Thread Jens Miltner
Am 26.07.2006 um 01:06 schrieb [EMAIL PROTECTED]: Michael Scharf <[EMAIL PROTECTED]> wrote: Rob, I notice in the documentation that the sqlite3_progress_handler() method is marked "experimental". Is that significant? No idea, that's a question Richard Hipp may answer.. I need to remov

[sqlite] unsubscribe me please RE: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Shi, Chunde CTR DISA PEO-C2C
Chunde Shi [EMAIL PROTECTED] 703 882 1466 703 882 2325 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue 7/25/2006 7:06 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_interrupt() and threads Michael Scharf <[EMAIL PROTEC

Re: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread drh
Michael Scharf <[EMAIL PROTECTED]> wrote: > Rob, > > I notice in the documentation that the sqlite3_progress_handler() method > > is marked "experimental". Is that significant? > > No idea, that's a question Richard Hipp may answer.. > I need to remove the experimental marking. Perhaps somebod

Re: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Michael Scharf
Rob, I notice in the documentation that the sqlite3_progress_handler() method is marked "experimental". Is that significant? No idea, that's a question Richard Hipp may answer.. Michael -- http://MichaelScharf.blogspot.com/

RE: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Rob Richardson
Michael, I notice in the documentation that the sqlite3_progress_handler() method is marked "experimental". Is that significant? Rob

RE: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Rob Richardson
Great! That looks like exactly what I need. Thanks very much! Rob Richardson RAD-CON INC. -Original Message- From: Michael Scharf [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 10:45 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_interrupt() and threads Hi

Re: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Michael Scharf
Hi Richard, I use a progres_handler: http://www.sqlite.org/capi3ref.html#sqlite3_progress_handler I set it up to be called every 1 ticks (2nd argument) or so and I use and the void* to points to a data structure that contains a boolean isCanceled. If another thread wants to cancel the worke

RE: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Rob Richardson
Thank you for pointing me to that article. That leads to two more questions: What alternative do I have? If I abort the thread that is running the query, will the query stop? And, if sqlite3_interrupt() has to be issued from the same thread that is using the database, what is it designed to b

Re: [sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Martin Jenkins
Rob Richardson wrote: [...] Can sqlite3_interrupt() be called from a different thread than the sqlite3_step() that I want to interrupt, or is there some other mechanism I can use, or is there no way to do this? This came up a couple of weeks ago. I don't have the message here to quote but you

[sqlite] sqlite3_interrupt() and threads

2006-07-25 Thread Rob Richardson
Greetings! My application will occasionally be called on to execute queries that take several minutes. This will be done from a worker thread so that the user interface remains active. As the query is being executed, the user must be able to respond to alarms. When the user hits F11 to go strai