Skip to content

fix: use CAST(... AS CHAR) for MySQL search queries#25

Merged
stahnma merged 1 commit into
productionfrom
fix_search
Feb 12, 2026
Merged

fix: use CAST(... AS CHAR) for MySQL search queries#25
stahnma merged 1 commit into
productionfrom
fix_search

Conversation

@stahnma

@stahnma stahnma commented Feb 12, 2026

Copy link
Copy Markdown
Member

MySQL doesn't support CAST(... AS TEXT), which caused 500 errors
on the /search endpoint in production. Use dialect detection to
select CHAR for MySQL and TEXT for SQLite.

Add data-layer search tests for both SQLite (default) and MySQL
(behind //go:build mysql tag) covering title, URL, tag, ordering,
and error preview exclusion logic.

MySQL doesn't support CAST(... AS TEXT), which caused 500 errors
on the /search endpoint in production. Use dialect detection to
select CHAR for MySQL and TEXT for SQLite.

Add data-layer search tests for both SQLite (default) and MySQL
(behind //go:build mysql tag) covering title, URL, tag, ordering,
and error preview exclusion logic.
@stahnma stahnma merged commit d59bc34 into production Feb 12, 2026
1 check passed
@stahnma stahnma deleted the fix_search branch February 12, 2026 04:14
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