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.
Created on 2017年06月07日 22:26 by Noah Levitt, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue30593-fix.diff | Noah Levitt, 2017年06月12日 19:33 | |||
| issue30593-test.diff | Noah Levitt, 2017年06月12日 19:35 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 26220 | merged | erlendaasland, 2021年05月18日 22:12 | |
| PR 26230 | merged | miss-islington, 2021年05月19日 07:05 | |
| PR 26231 | merged | miss-islington, 2021年05月19日 07:06 | |
| Messages (7) | |||
|---|---|---|---|
| msg295376 - (view) | Author: Noah Levitt (Noah Levitt) | Date: 2017年06月07日 22:26 | |
As far as I can tell, sqlite3 executescript() does not respect isolation_level. Is that true? If so, I think it's worth mentioning in the doc. Or maybe it should respect isolation_level, not sure there's any particular reason not to. |
|||
| msg295567 - (view) | Author: Jim Jewett (Jim.Jewett) * (Python triager) | Date: 2017年06月09日 20:33 | |
Do you have a test case that could be used to verify a patch? (Or even a full patch?) |
|||
| msg295813 - (view) | Author: Noah Levitt (Noah Levitt) | Date: 2017年06月12日 19:25 | |
Here's a test case |
|||
| msg295815 - (view) | Author: Noah Levitt (Noah Levitt) | Date: 2017年06月12日 19:33 | |
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;". |
|||
| msg393908 - (view) | Author: Erlend E. Aasland (erlendaasland) * (Python triager) | Date: 2021年05月18日 22:03 | |
Mentioning this behaviour in the documentation should be sufficient. |
|||
| msg393928 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2021年05月19日 07:32 | |
New changeset 76ed53ca7bf0d4a43099d9401af5fe9f75689885 by Miss Islington (bot) in branch '3.9': bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220) https://github.com/python/cpython/commit/76ed53ca7bf0d4a43099d9401af5fe9f75689885 |
|||
| msg393929 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2021年05月19日 07:37 | |
New changeset 1f483c0c1b5a9fd1062bacc2aeba6bb0e00009b7 by Miss Islington (bot) in branch '3.10': bpo-30593: Doc'ed that executescript() disregards isolation level (GH-26220) https://github.com/python/cpython/commit/1f483c0c1b5a9fd1062bacc2aeba6bb0e00009b7 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:47 | admin | set | github: 74778 |
| 2021年05月19日 07:40:30 | berker.peksag | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2021年05月19日 07:37:39 | berker.peksag | set | messages: + msg393929 |
| 2021年05月19日 07:32:48 | berker.peksag | set | messages: + msg393928 |
| 2021年05月19日 07:06:02 | miss-islington | set | pull_requests: + pull_request24848 |
| 2021年05月19日 07:05:57 | miss-islington | set | nosy:
+ miss-islington pull_requests: + pull_request24847 |
| 2021年05月18日 22:32:22 | erlendaasland | set | title: sqlite3 executescript does not respect isolation_level? -> Document that sqlite3.Cursor.executescript disregards isolation_level |
| 2021年05月18日 22:12:42 | erlendaasland | set | stage: needs patch -> patch review pull_requests: + pull_request24837 |
| 2021年05月18日 22:03:22 | erlendaasland | set | versions:
+ Python 3.9, Python 3.10, Python 3.11, - Python 2.7, Python 3.4, Python 3.5, Python 3.6 nosy: + erlendaasland, berker.peksag, docs@python messages: + msg393908 assignee: docs@python components: + Documentation, - Library (Lib) |
| 2017年06月13日 15:51:50 | palaviv | set | nosy:
+ palaviv |
| 2017年06月12日 19:35:33 | Noah Levitt | set | files: + issue30593-test.diff |
| 2017年06月12日 19:33:04 | Noah Levitt | set | files:
+ issue30593-fix.diff keywords: + patch messages: + msg295815 |
| 2017年06月12日 19:25:39 | Noah Levitt | set | messages: + msg295813 |
| 2017年06月09日 20:33:02 | Jim.Jewett | set | nosy:
+ Jim.Jewett messages: + msg295567 type: behavior stage: needs patch |
| 2017年06月07日 22:26:12 | Noah Levitt | create | |