Message295815
| 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:04 | Noah Levitt | set | recipients:
+ Noah Levitt, Jim.Jewett |
| 2017年06月12日 19:33:04 | Noah Levitt | set | messageid: <1497295984.05.0.730089071321.issue30593@psf.upfronthosting.co.za> |
| 2017年06月12日 19:33:04 | Noah Levitt | link | issue30593 messages |
| 2017年06月12日 19:33:03 | Noah Levitt | create |
|