diff options
author | unknown <serg@serg.mysql.com> | 2001-10-09 14:53:54 +0200 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2001-10-09 14:53:54 +0200 |
commit | 736e5b0de2281ab75af2cf3d88480aa6db9a18d2 (patch) | |
tree | c39107b036ff091f557b03a1f37183735dcddbad /sql/item_func.h | |
parent | 734e2a8bcaa4a5d2de6059f4cdcac8e71bbb5d6d (diff) | |
download | mariadb-git-736e5b0de2281ab75af2cf3d88480aa6db9a18d2.tar.gz |
Boolean search passes _some_ tests
sql/ha_myisam.cc:
One more abstraction layer added (C++ emulated in C :).
include/ft_global.h:
boolean search code plugged in
mysql-test/r/fulltext_cache.result:
boolean search code plugged in
mysql-test/r/fulltext_left_join.result:
boolean search code plugged in
mysql-test/r/fulltext_multi.result:
boolean search code plugged in
mysql-test/r/fulltext_order_by.result:
boolean search code plugged in
sql/lex.h:
IN BOOLEAN MODE syntax
myisam/ft_nlq_search.c:
boolean search code plugged in
myisam/ftdefs.h:
boolean search code plugged in
sql/ha_myisam.h:
boolean search code plugged in
sql/handler.h:
boolean search code plugged in
include/my_base.h:
do_not_sort_keyseg feature for MyISAM
include/my_global.h:
#define comp(a,b) (((a) < (b)) ? -1 : ((a) > (b)) ? 1 : 0)
myisam/ft_boolean_search.c:
bugfixing
myisam/ft_parser.c:
cleanup
myisam/ft_static.c:
do_not_sort_keyseg feature for MyISAM
myisam/mi_search.c:
do_not_sort_keyseg feature for MyISAM
myisam/mi_write.c:
cleanup
mysql-test/t/fulltext.test:
boolean search tests added
BitKeeper/etc/ignore:
Added myisam/FT1.MYD myisam/FT1.MYI to the ignore list
sql/item_func.cc:
boolean search
sql/item_func.h:
boolean search
sql/sql_yacc.yy:
boolean search
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 19f15eaf9b3..1926fd025f4 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -863,7 +863,7 @@ public: uint key; bool join_key; Item_func_match *master; - void * ft_handler; + FT_INFO * ft_handler; Item_func_match(List<Item> &a, Item *b): Item_real_func(b), fields(a), table(0), join_key(0), master(0), ft_handler(0) {} @@ -871,14 +871,13 @@ public: { if (!master && ft_handler) { - ft_handler_close(); + ft_handler->please->close_search(ft_handler); + ft_handler=0; if(join_key) table->file->ft_handler=0; } } - virtual int ft_handler_init(const byte *key, uint keylen, bool presort) - { return 1; } - virtual int ft_handler_close() { return 1; } + virtual int ft_handler_init(const byte *key, uint keylen, bool presort) =0; enum Functype functype() const { return FT_FUNC; } void update_used_tables() {} bool fix_fields(THD *thd,struct st_table_list *tlist); @@ -896,18 +895,16 @@ public: const char *func_name() const { return "match_nl"; } double val(); int ft_handler_init(const byte *query, uint querylen, bool presort) - { ft_handler=table->file->ft_init_ext(key, query, querylen, presort); } - int ft_handler_close() { ft_nlq_close_search(ft_handler); ft_handler=0; } + { ft_handler=table->file->ft_init_ext(FT_NL,key, query, querylen, presort); } }; -#if 0 + class Item_func_match_bool :public Item_func_match { public: - Item_func_match_nl(List<Item> &a, Item *b): Item_func_match(a,b) {} + Item_func_match_bool(List<Item> &a, Item *b): Item_func_match(a,b) {} const char *func_name() const { return "match_bool"; } double val(); int ft_handler_init(const byte *query, uint querylen, bool presort) - { ft_handler=table->file->ft_init_ext(key, query, querylen, presort); } - int ft_handler_close() { ft_close_search(ft_handler); ft_handler=0; } + { ft_handler=table->file->ft_init_ext(FT_BOOL,key, query, querylen, presort); } }; -#endif + |