Workaround for intermittent test failure on SQLite 3.25.3

Closes:
- #2632
This commit is contained in:
Simon Willison 2026-01-28 18:34:00 -08:00 committed by GitHub
commit ffadb5f74c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -706,8 +706,11 @@ def table_column_details(conn, table):
).fetchall()
]
else:
# Treat hidden as 0 for all columns
# First trigger a query against sqlite_master to fix an intermittent
# test failure, see https://github.com/simonw/datasette/issues/2632
conn.execute("select 1 from sqlite_master limit 1").fetchall()
return [
# Treat hidden as 0 for all columns.
Column(*(list(r) + [0]))
for r in conn.execute(
f"PRAGMA table_info({escape_sqlite(table)});"