Skip to content

fix(fts): snapshot FTS aux info in bind data (Fixes ladybugdb/ladybug#1105) - #94

Open
adsharma wants to merge 1 commit into
mainfrom
fix-1105-fts-bind-dangling-entry
Open

adsharma wants to merge 1 commit into
mainfrom
fix-1105-fts-bind-dangling-entry

Conversation

@adsharma

@adsharma adsharma commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Second parameterized CALL QUERY_FTS_INDEX on the same connection segfaults (LadybugDB/ladybug#1105, follow-up to LadybugDB/ladybug#1082 / LadybugDB/ladybug#1088).

Root cause: QueryFTSBindData held a const IndexCatalogEntry reference into the versioned catalog. Bind data outlives the bind transaction via the prepared-plan cache, so the 2nd execution dereferences a dangling entry.

Fix: store an owned FTSIndexAuxInfo value copy; read config from auxInfo in getQueryTerms/bindFunc/writer.

Minimal local testing per policy - CI owns build + e2e (extension rebuild + 4-mode repro from the issue).

…#1105)

QueryFTSBindData held a reference into the versioned catalog,
which dangles when the prepared plan is reused on a second
parameterized execution on the same connection, segfaulting
(Refs LadybugDB/ladybug#1082, Refs LadybugDB/ladybug#1088).
Store an owned copy of FTSIndexAuxInfo instead.
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