Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread David Raymond
Subject: Re: [sqlite] Creating and dropping tables with multiple connections Change the executed SQL to be executed using .executescript(...) and make sure that the executed SQL is a multi-statement batch consisting of BEGIN TRANSACTION; COMMIT; that is cur1.execute(createSQL) -> cur1.executescr

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Keith Medcalf
lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of David Raymond >Sent: Tuesday, 20 November, 2018 12:57 >To: SQLite mailing list >Subject: Re: [sqlite] Creating and dropping

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread David Raymond
As an aside, it works properly written in python using apsw. It does not work when using Pythons sqlite3 wrapper (but then, since that wrapper "buggers about" with no way to tell what it is doing, I find that unsurprising). Works fine for me anyway. What I wrote for an equivalent is below.

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Keith Medcalf
te.org >Subject: [sqlite] Creating and dropping tables with multiple >connections > >Hi everybody, > > >I have a question regarding multiple connections to the same DB from >the same process. > >I was expecting that modifying a DB via a certain connection should >

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Richard Hipp
On 11/20/18, Albert Banaszkiewicz wrote: > I was expecting that modifying a DB via a certain connection should also be > visible for all other opened connections. That is correct. > > > In my test example, I am creating a table via connection no. 1 and drop it > via connection no. 2. The

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Igor Korot
Hi, On Tue, Nov 20, 2018 at 10:32 AM Dominique Devienne wrote: > > On Tue, Nov 20, 2018 at 5:28 PM Simon Slavin wrote: > > > On 20 Nov 2018, at 3:34pm, Albert Banaszkiewicz < > > albert.banaszkiew...@tomtom.com> wrote: > > > > > ExecuteInTransaction(writeDb1, KCreateTable); > > > > I can't

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Simon Slavin
On 20 Nov 2018, at 4:32pm, Dominique Devienne wrote: > Hmmm, DDL is transactional in SQLite, AFAIK... --DD I was wrong. Thanks for the correction. Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Jay Kreibich
> On Nov 20, 2018, at 10:27 AM, Simon Slavin wrote: > On 20 Nov 2018, at 3:34pm, Albert Banaszkiewicz > wrote: > >> ExecuteInTransaction(writeDb1, KCreateTable); > > I can't answer your question but the above line shows a misunderstanding of > SQL. Transactions are for commands which

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Dominique Devienne
On Tue, Nov 20, 2018 at 5:28 PM Simon Slavin wrote: > On 20 Nov 2018, at 3:34pm, Albert Banaszkiewicz < > albert.banaszkiew...@tomtom.com> wrote: > > > ExecuteInTransaction(writeDb1, KCreateTable); > > I can't answer your question but the above line shows a misunderstanding > of SQL.

Re: [sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Simon Slavin
On 20 Nov 2018, at 3:34pm, Albert Banaszkiewicz wrote: > ExecuteInTransaction(writeDb1, KCreateTable); I can't answer your question but the above line shows a misunderstanding of SQL. Transactions are for commands which modify tables: INSERT, UPDATE, DELETE. Commands which modify the

[sqlite] Creating and dropping tables with multiple connections

2018-11-20 Thread Albert Banaszkiewicz
Hi everybody, I have a question regarding multiple connections to the same DB from the same process. I was expecting that modifying a DB via a certain connection should also be visible for all other opened connections. Is my assumption incorrect ? (both operations being transactions). In