Skip to content

fix: SQL/DB layer - identifier quoting, log secrets, UTC TimeZone, populate source lock, exact DECIMAL - #225

Closed
jrosskopf wants to merge 2 commits into
mainfrom
fix/gh-198-212-216-sql-layer
Closed

jrosskopf wants to merge 2 commits into
mainfrom
fix/gh-198-212-216-sql-layer

Conversation

@jrosskopf

@jrosskopf jrosskopf commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • New test/integration/test_sql_layer_hardening.py (real binary): red on the pre-fix binary (commit 1), green after
  • ctest: 981/981 pass
  • Existing cache/sqlite/audit/data-type/log integration suites pass (91 tests)

Closes #212 #216
Refs #198 #217


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…, populate lock, DECIMAL (red)

- hyphenated ducklake alias / cache schema must boot, refresh and serve (#198)
- debug log must not print a connection password (#198)
- session TimeZone defaults to UTC regardless of host TZ (#212)
- SQLite write during a slow populate must wait for it (#216)
- DECIMAL wider than a double is serialised exactly (#217)
…one, lock source for populate, exact wide DECIMAL (#198 #212 #216 #217)

- sql::QuoteIdentifier/EscapeSqlLiteral live in sql_utils; the DuckLake ATTACH/DETACH,
  CREATE SCHEMA, audit table/insert and the audit REST query quote alias and schema,
  so my-lake / my-schema boot and serve (#198)
- Debug logging no longer dumps the template context (conn.* secrets) and scrubs
  connection credentials from the rendered SQL line (#198)
- DuckDB TimeZone is set GLOBAL to UTC (or the user's duckdb.TimeZone, any key case)
  after the engine opens and logged; per-connection SET fallback if ICU is not loadable (#212)
- A cache populate takes the source connection's serialize-access lock after the
  catalog write lock (fixed order) via ICacheDatabaseAdapter::lockSourceAccess (#216)
- DECIMAL with more than 15 significant digits is an exact JSON string instead of a
  rounded double; documented as a type change (#217)
- Docs: CONFIG_REFERENCE, caching, query-execution, CHANGELOG; Catch2 cases for quoting
@jrosskopf

Copy link
Copy Markdown
Contributor Author

Superseded by #230 (combined and merged).

@jrosskopf jrosskopf closed this Nov 21, 2026
@jrosskopf
jrosskopf deleted the fix/gh-198-212-216-sql-layer branch November 21, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache populate and the source connection lock (#116 follow-up) DuckDB now()::TIMESTAMP switches from UTC to local time once ICU loads

1 participant