WL#2576: support non-const expressions in MATCH ... AGAINST
Affects: Server-7.1
—
Status: Un-Assigned
support non-const expressions in the AGAINST part of MATCH ... AGAINST A "non-const" expression is an expression which cannot be evaluated once at the start. For example, the following causes an error "ERROR 1210 (HY000): Incorrect arguments to AGAINST" because AGAINST contains an expression which contains a column name "x". drop table if exists articles; CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), body TEXT, x varchar(5), FULLTEXT (title,body) ); INSERT INTO articles (title,body,x) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...','base'), ('How To Use MySQL Well','After you went through a ...','base'), ('Optimizing MySQL','In this tutorial we will show ...','base'), ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...','base'), ('MySQL vs. YourSQL','In the following database comparison ...','base'), ('MySQL Security','When configured properly, MySQL ...','base'); SELECT * FROM articles WHERE MATCH (title,body) AGAINST (concat('data',x) IN NATURAL LANGUAGE MODE);
Copyright (c) 2000, 2024, Oracle Corporation and/or its affiliates. All rights reserved.