Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.0(EOL), 10.1(EOL), 10.2(EOL)
Description
Description:
Odd results when comparing the below query on MySQL 5.6 / 5.7 with Maria 10.0 - 10.2
How to repeat:
create table t1(a varchar(255)); |
ALTER TABLE `t1` ADD FULLTEXT KEY `a` (`a`); |
insert into t1 values ("Install requirements"); |
|
|
select MATCH(`a`) AGAINST ("Install unimaginative" IN NATURAL LANGUAGE MODE) from `t1`; |
select `a` from `t1` where case when true then MATCH(`a`) AGAINST ("Install unimaginative" IN NATURAL LANGUAGE MODE) end; |
Actual Results:
Second SELECT query returns no results, yet on MySQL 5.6 / 5.7 it does (see: https://www.db-fiddle.com/f/tM2FxQMFrbjCThgW4oQE7X/1)
Expected Results:
Second SELECT query should return the "Install requirements" row
Additional Information:
Seems to work without the CASE statement:
select `a` from `t1` where MATCH(`a`) AGAINST ("Install unimaginative" IN NATURAL LANGUAGE MODE) |
Seems to also work if you add > 0:
select `a` from `t1` where case when true then MATCH(`a`) AGAINST ("Install unimaginative" IN NATURAL LANGUAGE MODE) end > 0; |