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 wrapped into an automatic transaction. Python tries to be clever and automatically starts transactions that are not committed as long as you keep executing DML statements. However, it is not possible to detect DML reliably (as you have seen). > I hope this is a bug, otherwise, this side effect considerably reduces > the interest of this query. I consider pysqlite's default transaction handling to be a bug. To disable it (and handle transactions manually), use something like this: connection.isolation_level = None or use a different SQLite driver, such as apsw. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users