Commit 674eea5f authored by unknown's avatar unknown

sql_table.cc key length limit check disabled for FULLTEXT

ft_parser.c	Nasty buffer overflow fixed


myisam/ft_parser.c:
  Nasty buffer overflow fixed
sql/sql_table.cc:
  key length limit check disabled for FULLTEXT
parent cbc817fa
......@@ -141,6 +141,7 @@ TREE * ft_parse(TREE *wtree, byte *doc, int doclen)
for (w.pos=doc; doc<end; doc++)
if (!word_char(*doc)) break;
if ((w.len= (uint) (doc-w.pos)) < MIN_WORD_LEN) continue;
if (w.len >= HA_FT_MAXLEN) continue;
if (!tree_insert(wtree, &w, 0))
{
delete_tree(wtree);
......
......@@ -469,7 +469,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
}
key_info->key_length=(uint16) key_length;
if (key_length > file->max_key_length())
if (key_length > file->max_key_length() && key->type != Key::FULLTEXT)
{
my_error(ER_TOO_LONG_KEY,MYF(0),file->max_key_length());
DBUG_RETURN(-1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment