How to reproduce:
create table testrt (title1 string attribute indexed, title2 string attribute indexed);
insert into testrt (title1, title2) values ('(a)-(b)', 'test');
select * from testrt where match('(@title1) \\)\\-\\(');
You will get the syntax error:
ERROR 1064 (42000): index testrt: syntax error, unexpected ')' near ') \)\-\()'
However, if you add the second field to the query, there will be no errors:
select * from testrt where match('(@title1, title2) \\)\\-\\(');
I know that the query that gives the error can be transformed to the following one, so that there won’t be any errors either:
select * from testrt where match('@title1 \\)\\-\\(');
But I think that the initial query is still correct and it should not throw any errors.
Also, this query will throw the same error:
select * from testrt where match('(@title1 \\)\\-\\('))
Please advise.