BUG#25729 - boolean full text search is confused by NULLs produced by

LEFT JOIN
Fixed that in certain situations MATCH ... AGAINST returns false hits
for NULLs produced by LEFT JOIN when there is no fulltext index
available.


mysql-test/r/fulltext_left_join.result:
  A test case for BUG#25729.
mysql-test/t/fulltext_left_join.test:
  A test case for BUG#25729.
sql/item_func.cc:
  concat_ws(NULL) returns empty string instead of NULL. There is not much
  sense to calculate relevance for empty strings, thus return 0 immediately
  if we got NULL or empty string from concat_ws.
sql/item_func.h:
  Item_func_match::concat renamed to concat_ws.
This commit is contained in:
unknown 2007-04-02 17:26:39 +05:00
commit 3c763afc9c
4 changed files with 26 additions and 8 deletions

View file

@ -1308,12 +1308,12 @@ public:
FT_INFO *ft_handler;
TABLE *table;
Item_func_match *master; // for master-slave optimization
Item *concat; // Item_func_concat_ws
String value; // value of concat
Item *concat_ws; // Item_func_concat_ws
String value; // value of concat_ws
String search_value; // key_item()'s value converted to cmp_collation
Item_func_match(List<Item> &a, uint b): Item_real_func(a), key(0), flags(b),
join_key(0), ft_handler(0), table(0), master(0), concat(0) { }
join_key(0), ft_handler(0), table(0), master(0), concat_ws(0) { }
void cleanup()
{
DBUG_ENTER("Item_func_match");
@ -1321,7 +1321,7 @@ public:
if (!master && ft_handler)
ft_handler->please->close_search(ft_handler);
ft_handler= 0;
concat= 0;
concat_ws= 0;
DBUG_VOID_RETURN;
}
enum Functype functype() const { return FT_FUNC; }