Skip to content

Commit

Permalink
sqlite cached_statements workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke committed Jan 9, 2025
1 parent c5dd8f2 commit 31f48b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chia/util/db_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ async def _create_connection(
log_file: Optional[TextIO] = None,
name: Optional[str] = None,
) -> aiosqlite.Connection:
connection = await aiosqlite.connect(database=database, uri=uri)
# To avoid https://github.com/python/cpython/issues/118172
connection = await aiosqlite.connect(database=database, uri=uri, cached_statements=0)

if log_file is not None:
await connection.set_trace_callback(functools.partial(sql_trace_callback, file=log_file, name=name))
Expand Down

0 comments on commit 31f48b9

Please sign in to comment.