mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)
Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.html#version_3_7_15): _"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_
This commit is contained in:
parent
0b858cdd5d
commit
f7f0ed59bc
2 changed files with 9 additions and 0 deletions
|
@ -260,6 +260,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)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue