Skip to content

fix: optimize the exact selected FTS table - #261

Merged
vincentkoc merged 1 commit into
mainfrom
fix/fts-literal-table-names
Nov 19, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/fts-literal-table-names

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Optimizing an FTS table named docs targeted docs instead. If docs was an ordinary table with a matching column, the call silently inserted an optimize row into it; if absent, optimization failed.

User Impact

User impact: FTS optimization uses the exact selected table name, including surrounding whitespace, without modifying a similarly named table.

Why This Change Was Made

Keep whitespace trimming for blank-name validation only. Preserve the supplied name when quoting the SQL identifier; existing invalid-name checks remain.

Evidence

Real temporary SQLite regressions reproduced the unwanted insertion for leading, trailing, and surrounding whitespace. After the fix, the store suite passes; the tests verify the neighboring table stays empty and optimization also succeeds without that neighbor.

Independent native review found no P0–P3 issues in f0109e5e2ef8567028bbaa647eedec23f43621d5 against 5f45abfb45255e289f219f9bd0e58c819fd556cb. make check passed: module tidiness, formatting, vet, dead-code analysis, vulnerability checks, full unit and race suites, and all 47 release-script tests. A separate GOWORK=off go test -count=1 ./... passed. No live archives are used.

@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 19, 2026 17:35
@vincentkoc
vincentkoc merged commit 21a6d44 into main Nov 19, 2026
8 checks passed
@vincentkoc
vincentkoc deleted the fix/fts-literal-table-names branch November 19, 2026 17:37
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.

1 participant