summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-02-04 15:24:06 +0100
committerserg@serg.mylan <>2005-02-04 15:24:06 +0100
commitcc1ee6475f9a15415c81867f239f71a0bb1c969c (patch)
tree2046dfa1cc3d0a3296de2bdfbd4d1ad59ece8f58 /sql
parent33fc4b10b69e06bb4162a3d2650eab00e0b8927c (diff)
downloadmariadb-git-cc1ee6475f9a15415c81867f239f71a0bb1c969c.tar.gz
indexless boolean fulltext search was depending on default_charset_info - Bug#8159
ftbw->off wasn't cleared on reinit - Bug#8234
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_myisam.h8
-rw-r--r--sql/handler.h3
-rw-r--r--sql/item_func.cc8
3 files changed, 10 insertions, 9 deletions
diff --git a/sql/ha_myisam.h b/sql/ha_myisam.h
index 972d6b18e19..1e6cf2f4ada 100644
--- a/sql/ha_myisam.h
+++ b/sql/ha_myisam.h
@@ -88,8 +88,12 @@ class ha_myisam: public handler
ft_handler->please->reinit_search(ft_handler);
return 0;
}
- FT_INFO *ft_init_ext(uint flags, uint inx,const byte *key, uint keylen)
- { return ft_init_search(flags,file,inx,(byte*) key,keylen, table->record[0]); }
+ FT_INFO *ft_init_ext(uint flags, uint inx,String *key)
+ {
+ return ft_init_search(flags,file,inx,
+ (byte *)key->ptr(), key->length(), key->charset(),
+ table->record[0]);
+ }
int ft_read(byte *buf);
int rnd_init(bool scan);
int rnd_next(byte *buf);
diff --git a/sql/handler.h b/sql/handler.h
index 245defe61e0..0426312f404 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -373,8 +373,7 @@ public:
int compare_key(key_range *range);
virtual int ft_init() { return HA_ERR_WRONG_COMMAND; }
void ft_end() { ft_handler=NULL; }
- virtual FT_INFO *ft_init_ext(uint flags,uint inx,const byte *key,
- uint keylen)
+ virtual FT_INFO *ft_init_ext(uint flags, uint inx,String *key)
{ return NULL; }
virtual int ft_read(byte *buf) { return HA_ERR_WRONG_COMMAND; }
virtual int rnd_next(byte *buf)=0;
diff --git a/sql/item_func.cc b/sql/item_func.cc
index bff49541252..85cd1c693b7 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -3047,9 +3047,7 @@ void Item_func_match::init_search(bool no_order)
if (join_key && !no_order)
flags|=FT_SORTED;
- ft_handler=table->file->ft_init_ext(flags, key,
- (byte*) ft_tmp->ptr(),
- ft_tmp->length());
+ ft_handler=table->file->ft_init_ext(flags, key, ft_tmp);
if (join_key)
table->file->ft_handler=ft_handler;
@@ -3091,12 +3089,12 @@ bool Item_func_match::fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref)
}
/*
Check that all columns come from the same table.
- We've already checked that columns in MATCH are fields so
+ We've already checked that columns in MATCH are fields so
PARAM_TABLE_BIT can only appear from AGAINST argument.
*/
if ((used_tables_cache & ~PARAM_TABLE_BIT) != item->used_tables())
key=NO_SUCH_KEY;
-
+
if (key == NO_SUCH_KEY && !(flags & FT_BOOL))
{
my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH");