diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-01-04 23:41:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 23:41:03 (GMT) |
commit | 80e5732d31bb7362c7b647acc618df701b3ae951 (patch) | |
tree | f11b6d97857f149434576d3d89927822bf3070c4 /Lib | |
parent | def7dc3b715d92ccc3e8a6a58ac36779435e41c9 (diff) | |
download | cpython-80e5732d31bb7362c7b647acc618df701b3ae951.zip cpython-80e5732d31bb7362c7b647acc618df701b3ae951.tar.gz cpython-80e5732d31bb7362c7b647acc618df701b3ae951.tar.bz2 |
bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)
Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.htmlGH-version_3_7_15):
_"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_
(cherry picked from commit f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/sqlite3/test/hooks.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py index d74e74b..214205c 100644 --- a/Lib/sqlite3/test/hooks.py +++ b/Lib/sqlite3/test/hooks.py @@ -265,6 +265,14 @@ class TraceCallbackTests(unittest.TestCase): cur.execute(queries[0]) con2.execute("create table bar(x)") cur.execute(queries[1]) + + # Extract from SQLite 3.7.15 changelog: + # Avoid invoking the sqlite3_trace() callback multiple times when a + # statement is automatically reprepared due to SQLITE_SCHEMA errors. + # + # See bpo-40810 + if sqlite.sqlite_version_info < (3, 7, 15): + queries.append(queries[-1]) self.assertEqual(traced_statements, queries) |