Noah Levitt added the comment:

And here's a fix.

Unfortunately I think the change could break people's scripts. If they have 
isolation_level set (not None) and use executescript(), they will have to issue 
an explicit call to connection.commit().

executescript() could do the commit itself explicitly after running the sql, I 
suppose. Then the behavior is much like the old behavior, but at least you get 
the performance boost of running inside a transaction. (Substantial if you pass 
10k insert statements to executescript(), or something like that.)

Or, we could not change the code, and instead change the documentation. The 
docs could suggest wrapping the sql script with "begin;" and "commit;".

----------
keywords: +patch
Added file: http://bugs.python.org/file46942/issue30593-fix.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30593>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to