> The problem with going to EXCLUSIVE manually is that you lock out other
> connections for longer than necessary.
I have only one connection that does writes. In any event, I wanted
to confirm the readers would work correctly while another connection
held an EXCLUSIVE lock, because if they
> Why on earth are you using BEGIN EXCLUSIVE?
If WAL works "as advertised", I might as well go straight to EXCLUSIVE so I
don't have to later escalate the lock from RESERVED to EXCLUSIVE. And it
does work just fine, once I turned off the shared cache mode.
> I was under the apparently mistaken impression that starting any
transaction would block writes, even in WAL mode.
My problem was that I was using sqlite3_enable_shared_cache(true). I
enabled this because I was under the impression that is required for
multiple connections to share an
On 24 Sep 2015, at 5:37pm, Allen wrote:
> I was under the apparently mistaken impression that starting any
> transaction would block writes, even in WAL mode.
In WAL mode, a writing connection writes to the journal. Other connections
will continue to read from the 'live' database. When the
Allen wrote:
> 1. It would be nice to have read-only transactions for use with WAL
> databases. When a read-only transaction was started, it would take a
> "lock" on the WAL and then not advance further into the WAL until the
> transaction ended. Thus, all select statements issued while the read
On Thu, Sep 24, 2015 at 4:56 AM, ALBERT Aur?lien <
aurelien.albert at alyotech.fr> wrote:
> @ Stephan Beal
>
> "Every instance of a :memory: db is a unique instance, so you cannot have
> multiple connections to a single :memory: db."
>
> >> I know, this is one of the various reasons that made my
Hi,
When -DSQLITE_THREADSAFE=0 is used then unixShmBarrier becomes a noop because
unixEnterMutex/unixLeaveMutex are empty functions.
Digging through the SQLite source code I found this comment:
/* Read the header. This might happen concurrently with a write to the
** same area of shared memory
Hello again,
I think I can simplify the actual question:
Can I use a SELECT returning multiple rows as input to some INSERT
logic, and in that logic INSERT into multiple tables?
Like if I have a table t1 containing id 1, 2, 3.
For each id in t1, do
INSERT INTO t2 (...)
INSERT INTO t3 (...)
On Thu, 24 Sep 2015 11:42:27 +0200, ALBERT Aur?lien
wrote:
>Hi,
>
>I'm using SQLite C API and my application use multiple databases, each
>database having multiple connections.
>I need to identify which connection use the same database as another
>connection.
>For the moment, I use the
@ Stephan Beal
"Every instance of a :memory: db is a unique instance, so you cannot have
multiple connections to a single :memory: db."
>> I know, this is one of the various reasons that made my solution not really
>> ideal
@ Simon Slavin
"There's a PRAGMA for storing and retrieving a
Den 2015-09-24 kl. 13:03, skrev Simon Slavin:
> On 24 Sep 2015, at 11:38am, Daniel Polski wrote:
>
>> -- Here is where my real question starts. Can I fetch a list of rows in a
>> trigger
>> -- and update different tables from that data?
> Create a VIEW which does this
>
> SELECT ... FROM t1 JOIN
> > WAL does this already. You just need to BEGIN a transaction when you
> want it to BEGIN and COMMIT or ROLLBACK when you are done with it.
>
> I was under the apparently mistaken impression that starting any
> transaction would block writes, even in WAL mode.
>
> Just to be clear, this would
Hello!
--Table t1 contains some "base" data
CREATE TABLE t1 (
idINTEGER PRIMARY KEY,
name VARCHAR(10),
value INT NOT NULL
);
INSERT INTO t1 VALUES(1, 't1 1', 0);
INSERT INTO t1 VALUES(2, 't1 2', 0);
--Table t2 can contain extra data for a row in table t1
CREATE TABLE t2(
> WAL does this already. You just need to BEGIN a transaction when you
want it to BEGIN and COMMIT or ROLLBACK when you are done with it.
I was under the apparently mistaken impression that starting any
transaction would block writes, even in WAL mode.
Just to be clear, this would work:
On
On 24 Sep 2015, at 11:38am, Daniel Polski wrote:
> -- Here is where my real question starts. Can I fetch a list of rows in a
> trigger
> -- and update different tables from that data?
Create a VIEW which does this
SELECT ... FROM t1 JOIN t2 ON t2.t1_id = t1.id
Then set the triggers for the
On Thu, Sep 24, 2015 at 11:42 AM, ALBERT Aur?lien <
aurelien.albert at alyotech.fr> wrote:
> (for example, if one day I need the same about ":memory:" databases, bad
> things are gonna to happen)
>
Every instance of a :memory: db is a unique instance, so you cannot have
multiple connections to
Hi,
I'm using SQLite C API and my application use multiple databases, each database
having multiple connections.
I need to identify which connection use the same database as another connection.
For the moment, I use the absolute database filename as an "unique database
identifier", and I
Suggestions for SQLite features:
1. It would be nice to have read-only transactions for use with WAL
databases. When a read-only transaction was started, it would take a
"lock" on the WAL and then not advance further into the WAL until the
transaction ended. Thus, all select statements issued
On 24 Sep 2015, at 10:42am, ALBERT Aur?lien
wrote:
> I need to identify which connection use the same database as another
> connection.
>
> For the moment, I use the absolute database filename as an "unique database
> identifier", and I store this information with my "sqlite3*" connection
Hmmm... actually, looks like Windows 10 has regressed back to only having
one set of DST rules...
Manually changed timezone to Pacific US. Results are from before reboot
but don't seem to have changed after.
David.
Windows 10
Dates from https://www.timeanddate.com/time/dst/1985.html
Using
Excerpts from Daniel Polski's message of 2015-09-24 09:50:36 -0300:
>
> Hello again,
> I think I can simplify the actual question:
>
> Can I use a SELECT returning multiple rows as input to some INSERT
> logic, and in that logic INSERT into multiple tables?
That was exactly what I showed you
On Thursday, 24 September, 2015 08:53, Allen said:
> Suggestions for SQLite features:
> 1. It would be nice to have read-only transactions for use with WAL
> databases. When a read-only transaction was started, it would take a
> "lock" on the WAL and then not advance further into the WAL
On 9/24/15, T?r?k Edwin wrote:
> Hi,
>
> When -DSQLITE_THREADSAFE=0 is used then unixShmBarrier becomes a noop
> because unixEnterMutex/unixLeaveMutex are empty functions.
Good observation. This problem is addressed by
Excerpts from Daniel Polski's message of 2015-09-24 07:38:24 -0300:
> Hello!
>
> --Table t1 contains some "base" data
> CREATE TABLE t1 (
> idINTEGER PRIMARY KEY,
> name VARCHAR(10),
> value INT NOT NULL
> );
>
> INSERT INTO t1 VALUES(1, 't1 1', 0);
> INSERT INTO t1 VALUES(2,
On Thursday, 24 September, 2015 03:36, Dave McKee
said:
> Hmmm... actually, looks like Windows 10 has regressed back to only having
> one set of DST rules...
Windows at Vista and later can have an (unlimited) set of DST rules for each
Microsoft Time Zone (Microsoft Time Zone's can only be
25 matches
Mail list logo