* fix(import): keep data sheets selectable when an Excel sheet is empty
* fix(import): scan past the preview window before judging an Excel sheet empty
Anchor the preview window at the first content row instead of stopping at
data_start_row + preview_limit, so a sheet whose only data sits beyond the
preview limit is no longer reported as an empty preview. The grid-size guard
now counts only the anchored window so a far first data row cannot falsely
trip MAX_FAST_PREVIEW_CELLS.
* fix(clippy): drop test-only transfer column name wrapper
resolve_transfer_target_column_names lost its last non-test caller in
7fdf16283, so the lib build fails the CI clippy job with dead_code. Fold
its four test call sites into resolve_transfer_target_column_names_or
with the source names as fallback.
* fix(sql-file): pin one session for the whole SQL file execution
Non-MySQL SQL file imports executed each statement through the shared pool, so a file-level BEGIN / COMMIT could span physical connections and leave an unfinished transaction idle in transaction. A later DROP TABLE or a second run then blocked on the leftover locks (#12160).
Pin a session-scoped pool for the whole file, pass its client_session_id to every statement, and release the pool (rolling back any open transaction) when the execution finishes, errors or is cancelled. MySQL keeps its existing pinned executor and manual transactions keep their session.
Verified on PostgreSQL 18: before the fix a file containing BEGIN; SELECT 1; left one idle-in-transaction connection; after the fix there are none, and the #12160 file runs twice with a DROP TABLE between runs.
* fix(sql-file): derive the pinned session from execution_id
The streaming Postgres-family test injects a SQLite pool under the base pool key; the executor now looks up a session-scoped key, so the test must register the stub there too. Deriving the session id from execution_id (the frontend's per-run batch id) makes the key predictable and keeps one session per execution. Add a test-only key helper and inject the stub under both keys.
* fix(sql-file): release the pinned session before restoring constraints
The catalog-level constraint restore runs on the shared pool. A file that leaves a transaction open (BEGIN, then an error or cancellation) keeps the pinned session's locks, so the restore's ALTER TABLE can wait until the query timeout. Close the session pool before the restore in both the content and multi-file paths, then restore constraints.
Add a live PostgreSQL regression test with skip_relational_constraints and a file that locks a table and then fails.
Add a per-connection manual_transaction_timeout_secs (default 300s,
30-86400s) honored by every idle-rollback path. When a session that may
hold uncommitted work expires, stop and show the rollback notice instead
of replaying the statement into a fresh transaction; proven read-only
sessions still restart silently. Error and notice texts no longer
hard-code five minutes.