Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-07 Thread big stone
Curiousity question : Why are you basing your SQLfast next book on Python 2.7.6 rather than Python 3.3 (or 3.4) ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-07 Thread Simon Slavin
On 7 Jul 2014, at 6:49am, big stone wrote: > If I understood well, the "autocommit" idea was to not "hold" the database > file by default, and ease multi-user access to the file database. Not executing "BEGIN" is also the most frequent error that SQL programmers make.

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread big stone
Hi again, To answer the question in the title : - yes, the "autocommit" bug is buggy with "with", http://bugs.python.org/issue21718 - it is also buggy with comments at the beginning of the 'select'. The "autocommit" feature was a false good idea, but as sqlite3 arrived like that in the

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread Keith Medcalf
st p1 Smith p2 Dermiez p1 Smith p2 Dermiez p3 Jones 1 2 p1 Smith p2 Dermiez >-Original Message- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Jean-Luc Hainaut >Sent: Saturday, 5 July, 2014 13:56 >To: sqlite

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread big stone
Hi Jean-Luc, All your problem is that you must use conn.isolation_level = None With conn.isolation_level = "" , the default of sqlite3, nothing related with transaction will work. Just try with : * this program : https://github.com/stonebig/sqlite_bro/blob/master/sqlite_bro.py (or pip install

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread Keith Medcalf
sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Jean-Luc Hainaut >Sent: Saturday, 5 July, 2014 13:56 >To: sqlite-users@sqlite.org >Subject: [sqlite] Autocommit in "with" query: bug or feature? > >Hi, > >Context: Python 2.7.6, Windows XP, SQLite v3

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread RSmith
On 2014/07/05 21:55, Jean-Luc Hainaut wrote: Hi, Context: Python 2.7.6, Windows XP, SQLite v3.8.5. The following test program suggest that "with" queries automatically execute a commit, as if they were DDL statements. I hope this is a bug, otherwise, this side effect considerably reduces

Re: [sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread Clemens Ladisch
Jean-Luc Hainaut wrote: > Context: Python > > The following test program suggest that "with" queries automatically > execute a commit, as if they were DDL statements. SQLite itself does not differentiate between DDL and DML statements; when there are no explicit transactions, every statement gets

[sqlite] Autocommit in "with" query: bug or feature?

2014-07-06 Thread Jean-Luc Hainaut
Hi, Context: Python 2.7.6, Windows XP, SQLite v3.8.5. The following test program suggest that "with" queries automatically execute a commit, as if they were DDL statements. I hope this is a bug, otherwise, this side effect considerably reduces the interest of this query. Best regards