summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2001-09-25 20:31:02 +0200
committerunknown <serg@serg.mysql.com>2001-09-25 20:31:02 +0200
commit734e2a8bcaa4a5d2de6059f4cdcac8e71bbb5d6d (patch)
treea70bc86b1e25c9dd79c1730e066609f2781b606d /sql
parent51c261ff2393476110d2914bec5f8a1f057555be (diff)
downloadmariadb-git-734e2a8bcaa4a5d2de6059f4cdcac8e71bbb5d6d.tar.gz
get rid of ft_search. Now there're two sets of ft_ functions, ft_nlq_* and ft_boolean_*
BitKeeper/deleted/.del-ft_search.c~c011cb6e8041bb59: Delete: myisam/ft_search.c include/ft_global.h: ft_ --> ft_nlq_ myisam/Makefile.am: get rid of ft_search.c myisam/ft_dump.c: ft_ --> ft_nlq_ myisam/ft_eval.c: ft_ --> ft_nlq_ myisam/ft_nlq_search.c: get rid of ft_search.c myisam/ft_test1.c: ft_ --> ft_nlq_ sql/ha_myisam.cc: ft_ --> ft_nlq_ sql/ha_myisam.h: ft_ --> ft_nlq_ sql/handler.h: cleanup sql/item_func.cc: ft_ --> ft_nlq_ sql/item_func.h: ft_ --> ft_nlq_ sql/item_strfunc.h: cleanup
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_myisam.cc2
-rw-r--r--sql/ha_myisam.h4
-rw-r--r--sql/handler.h2
-rw-r--r--sql/item_func.cc2
-rw-r--r--sql/item_func.h15
-rw-r--r--sql/item_strfunc.h6
6 files changed, 21 insertions, 10 deletions
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 812e0b77077..61452c3de3b 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -1197,7 +1197,7 @@ int ha_myisam::ft_read(byte * buf)
thread_safe_increment(ha_read_next_count,&LOCK_status); // why ?
- error=ft_read_next((FT_DOCLIST *) ft_handler,(char*) buf);
+ error=ft_nlq_read_next((FT_DOCLIST *) ft_handler,(char*) buf);
table->status=error ? STATUS_NOT_FOUND: 0;
return error;
diff --git a/sql/ha_myisam.h b/sql/ha_myisam.h
index d870331e750..a95f0ed71cb 100644
--- a/sql/ha_myisam.h
+++ b/sql/ha_myisam.h
@@ -76,9 +76,9 @@ class ha_myisam: public handler
int index_next_same(byte *buf, const byte *key, uint keylen);
int index_end() { ft_handler=NULL; return 0; }
int ft_init()
- { if(!ft_handler) return 1; ft_reinit_search(ft_handler); return 0; }
+ { if(!ft_handler) return 1; ft_nlq_reinit_search(ft_handler); return 0; }
void *ft_init_ext(uint inx,const byte *key, uint keylen, bool presort)
- { return ft_init_search(file,inx,(byte*) key,keylen,presort); }
+ { return ft_nlq_init_search(file,inx,(byte*) key,keylen,presort); }
int ft_read(byte *buf);
int rnd_init(bool scan=1);
int rnd_next(byte *buf);
diff --git a/sql/handler.h b/sql/handler.h
index 5cf39daeadf..16f7ba90eff 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -237,7 +237,7 @@ public:
virtual int update_row(const byte * old_data, byte * new_data)=0;
virtual int delete_row(const byte * buf)=0;
virtual int index_read(byte * buf, const byte * key,
- uint key_len, enum ha_rkey_function find_flag)=0;
+ uint key_len, enum ha_rkey_function find_flag)=0;
virtual int index_read_idx(byte * buf, uint index, const byte * key,
uint key_len, enum ha_rkey_function find_flag)=0;
virtual int index_next(byte * buf)=0;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index ff793a4a214..076194e8b7b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1914,7 +1914,7 @@ double Item_func_match_nl::val()
if (join_key)
{
if (table->file->ft_handler)
- return ft_get_relevance(ft_handler);
+ return ft_nlq_get_relevance(ft_handler);
join_key=0; // Magic here ! See ha_myisam::ft_read()
}
diff --git a/sql/item_func.h b/sql/item_func.h
index 293ef17b82d..19f15eaf9b3 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -893,10 +893,21 @@ 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"; }
+ 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; }
+};
+#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) {}
+ 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; }
};
-
+#endif
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 1b829b19439..59bb815f0c3 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -1,15 +1,15 @@
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */