diff options
author | unknown <serg@serg.mysql.com> | 2001-10-22 11:57:48 +0200 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2001-10-22 11:57:48 +0200 |
commit | d0ea7a53c98c1d0f94154722f8504c401c3259e1 (patch) | |
tree | 8b062a08d4895622a57e2a2fa220fa1d6115b5c4 /sql | |
parent | 8a015dc327bba65df40352501206e80e019e45ea (diff) | |
parent | 9433c5387ea9e4ccacc0b1b78b9df27622f8eaae (diff) | |
download | mariadb-git-d0ea7a53c98c1d0f94154722f8504c401c3259e1.tar.gz |
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0
sql/item_func.h:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_func.cc | 14 | ||||
-rw-r--r-- | sql/item_func.h | 8 |
2 files changed, 13 insertions, 9 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index bbe5e5fced9..1ca511be485 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2065,6 +2065,7 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist) } const_item_cache=0; table=((Item_field *)fields.head())->field->table; + record=table->record[0]; return 0; } @@ -2160,7 +2161,6 @@ bool Item_func_match::eq(const Item *item) const return 0; } -#if 0 double Item_func_match::val() { if (ft_handler==NULL) @@ -2182,10 +2182,10 @@ double Item_func_match::val() if ((null_value=(docid==HA_OFFSET_ERROR))) return 0.0; else - return ft_handler->please->find_relevance(ft_handler, docid); + return ft_handler->please->find_relevance(ft_handler, docid, record); } -#endif +#if 0 double Item_func_match_nl::val() { if (ft_handler==NULL) @@ -2207,7 +2207,7 @@ double Item_func_match_nl::val() if ((null_value=(docid==HA_OFFSET_ERROR))) return 0.0; else - return ft_handler->please->find_relevance(ft_handler, docid); + return ft_handler->please->find_relevance(ft_handler, docid, record); } double Item_func_match_bool::val() @@ -2226,9 +2226,11 @@ double Item_func_match_bool::val() join_key=0; } - null_value=1; - return -1.0; + return ft_handler->please->find_relevance(ft_handler, docid, record); + //null_value=1; + //return -1.0; } +#endif /*************************************************************************** System variables diff --git a/sql/item_func.h b/sql/item_func.h index b02d6ccaa8c..182daf9f74e 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -867,9 +867,10 @@ public: bool join_key; Item_func_match *master; FT_INFO * ft_handler; + byte *record; Item_func_match(List<Item> &a, Item *b): Item_real_func(b), - fields(a), table(0), join_key(0), master(0), ft_handler(0) {} + fields(a), table(0), join_key(0), master(0), ft_handler(0) {} ~Item_func_match() { if (!master && ft_handler) @@ -886,6 +887,7 @@ public: bool fix_fields(THD *thd,struct st_table_list *tlist); bool eq(const Item *) const; longlong val_int() { return val()!=0.0; } + double val(); bool fix_index(); void init_search(bool no_order); @@ -896,7 +898,7 @@ class Item_func_match_nl :public Item_func_match public: Item_func_match_nl(List<Item> &a, Item *b): Item_func_match(a,b) {} const char *func_name() const { return "match_nl"; } - double val(); +// double val(); int ft_handler_init(const byte *query, uint querylen, bool presort) { ft_handler=table->file->ft_init_ext(FT_NL,key, query, querylen, presort); @@ -909,7 +911,7 @@ class Item_func_match_bool :public Item_func_match public: Item_func_match_bool(List<Item> &a, Item *b): Item_func_match(a,b) {} const char *func_name() const { return "match_bool"; } - double val(); +// double val(); int ft_handler_init(const byte *query, uint querylen, bool presort) { ft_handler=table->file->ft_init_ext(FT_BOOL,key, query, querylen, presort); |