From c233d263aca1de2de18b45569494c4053825b42d Mon Sep 17 00:00:00 2001 From: "serg@serg.mysql.com" <> Date: Mon, 9 Oct 2000 22:10:10 +0200 Subject: [PATCH] sql_select.cc Coredump in FULLTEXT code fixed sql_select.cc sasha's workaround removed --- sql/sql_select.cc | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 812ac9ee8d5..a804870a69e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -24,9 +24,7 @@ #include "mysql_priv.h" #include "sql_select.h" -#if 0 // Sergei - remove when fixed -#include "opt_ft.h" -#endif +#include "opt_ft.h" #include #include @@ -1321,16 +1319,16 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, if (func->functype() == Item_func::FT_FUNC) cond_func=(Item_func_match *)cond; - else if (arg0->type() == Item::FUNC_ITEM && - arg0->functype() == Item_func::FT_FUNC && - (func->functype() == Item_func::GE_FUNC || + else if ((func->functype() == Item_func::GE_FUNC || func->functype() == Item_func::GT_FUNC) && + arg0->type() == Item::FUNC_ITEM && + arg0->functype() == Item_func::FT_FUNC && arg1->const_item() && arg1->val()>=0) cond_func=(Item_func_match *)arg0; - else if (arg1->type() == Item::FUNC_ITEM && - arg1->functype() == Item_func::FT_FUNC && - (func->functype() == Item_func::LE_FUNC || + else if ((func->functype() == Item_func::LE_FUNC || func->functype() == Item_func::LT_FUNC) && + arg1->type() == Item::FUNC_ITEM && + arg1->functype() == Item_func::FT_FUNC && arg0->const_item() && arg0->val()>=0) cond_func=(Item_func_match *)arg1; } @@ -5049,12 +5047,6 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit) DBUG_RETURN(0); // Can't use index. } -// Sergei - remove this one when you have added opt_ft stuff -QUICK_SELECT *get_ft_or_quick_select_for_ref(TABLE *table, JOIN_TAB *tab) -{ - return get_quick_select_for_ref(table, &tab->ref); -} - static int create_sort_index(JOIN_TAB *tab,ORDER *order,ha_rows select_limit) {