This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Noah Levitt
Recipients Jim.Jewett, Noah Levitt
Date 2017-06-12.19:33:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497295984.05.0.730089071321.issue30593@psf.upfronthosting.co.za>
In-reply-to
Content
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;".
History
Date User Action Args
2017-06-12 19:33:04Noah Levittsetrecipients: + Noah Levitt, Jim.Jewett
2017-06-12 19:33:04Noah Levittsetmessageid: <1497295984.05.0.730089071321.issue30593@psf.upfronthosting.co.za>
2017-06-12 19:33:04Noah Levittlinkissue30593 messages
2017-06-12 19:33:03Noah Levittcreate