mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-08-01 09:48:03 -04:00
On MySQL and MariaDB (the compressed content_bin code path, isCompressed() === true), three of the four regex-search constructions in FreshRSS_EntryDAO::sqlBooleanSearch() generated invalid SQL, so the query failed and the search silently returned zero articles: * intext:/regex/ appended a stray closing parenthesis after sqlRegex(...) (MySQL error 1248); * -intext:/regex/ had the same stray parenthesis; * -/regex/ emitted ' ANT NOT ' instead of ' AND NOT ' (MySQL error 1064). sqlRegex() already returns a self-contained, balanced expression (REGEXP_LIKE(expr, ?, 'flags') or expr REGEXP ?), so no extra parenthesis is needed, matching the uncompressed (SQLite / PostgreSQL) branches. The existing MySQL / MariaDB unit tests for intext:/regex/ had captured the buggy unbalanced SQL as their expected strings; they are corrected, and new cases are added for -intext:/regex/ and -/regex/ on both flavours. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
45 KiB
45 KiB