Skip to content

unicode: keep the built-in LIKE when RegisterLike is false - #448

Merged
ncruces merged 1 commit into
ncruces:mainfrom
rriski:fix-register-like
Nov 6, 2026
Merged

ncruces merged 1 commit into
ncruces:mainfrom
rriski:fix-register-like

Conversation

@rriski

@rriski rriski commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #447.

Register passed a nil function for like when RegisterLike was false. A nil function deletes the function, so LIKE was not available.

This change calls CreateFunction for like only when RegisterLike is true. Then the built-in LIKE stays.

The new test TestRegister_withoutLike sets RegisterLike to false and runs LIKE with 2 and 3 arguments. Without the fix, the test fails with wrong number of arguments to function LIKE(). With the fix, go test ./ext/unicode/ passes.

Register passed a nil function for like when RegisterLike was false.
A nil function deletes the function, so LIKE was not available.

Fixes ncruces#447.
@ncruces
ncruces merged commit 7c8c759 into ncruces:main Nov 6, 2026
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.

unicode: RegisterLike = false removes the built-in LIKE

2 participants