You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: MATCH() AGAINST(? ...) with a bound parameter rejected by parser — breaks Prisma fullTextSearch (v3.0.11 & 4.0-dev) #24735
A literalMATCH(col) AGAINST('x' IN BOOLEAN MODE) works, but using a bound parameter as the AGAINST argument — MATCH(col) AGAINST(? IN BOOLEAN MODE) — is rejected by the parser, even when a FULLTEXT index exists. Prisma's fullTextSearch preview always parameterizes the search term, so the entire feature is unusable on MatrixOne.
Steps to Reproduce
CREATETABLEft (id INTPRIMARY KEY, t VARCHAR(200), FULLTEXT INDEX ft_idx(t));
INSERT INTO ft VALUES (1,'hello world');
-- literal argument: OKSELECT id FROM ft WHERE MATCH(t) AGAINST('hello'INBOOLEAN MODE);
-- bound parameter argument: FAILS
PREPARE st FROM'SELECT id FROM ft WHERE MATCH(t) AGAINST(? IN BOOLEAN MODE)';
SET @q ='hello';
EXECUTE st USING @q;
-- ERROR 1105 (HY000): You have an error in your SQL syntax ... syntax error
Prisma impact
prisma.post.findMany({ where: { title: { search: 'hello' } } }) and orderBy: { _relevance: {...} } both fail at runtime (the client binds the term as a parameter):
MysqlError { code: 1064, message: "SQL parser error: ... syntax error at ... near \"? IN BOOLEAN MODE))\"" }
Confirmed on prod v3.0.11 and 4.0-dev nightly-0bfda604, with a real FULLTEXT index present. Related: prepared-statement compatibility #24186.
Expected Behavior
MySQL accepts a placeholder/parameter as the AGAINST search string in a prepared statement.
Found during deep Prisma ORM (v5.22) compatibility testing; reproduced on prod 8.0.30-MatrixOne-v3.0.11 and nightly-0bfda604.
Fixed by merged PR #24796: #24796. The prepared MATCH ... AGAINST(?) path, runtime NULL/empty validation, and prepared-statement reuse coverage are included in the merged change.
Activity
fix(sql): support prepared fulltext boolean search (#24796)
VioletQwQ-0 commentedon Jul 20, 2026
Fixed by merged PR #24796: #24796. The prepared MATCH ... AGAINST(?) path, runtime NULL/empty validation, and prepared-statement reuse coverage are included in the merged change.
fix(sql): support prepared fulltext boolean search (matrixorigin#24796)
fix(sql): support prepared fulltext boolean search (matrixorigin#24796)
fix(sql): support prepared fulltext boolean search (matrixorigin#24796)