Commit 6b205f93 authored by unknown's avatar unknown

BUG#27040 - Incorrect FTS parser name output

When a table uses two (or more) fulltext keys with different fulltext parsers,
all fulltext keys (excluding those that use built-in parser) were using first
parser that was mentioned in .frm.

With this fix fulltext keys use proper (assigned during create table) fulltext
parser.

This code was contributed by Yoshinori Matsunobu ymatsunobu@mysql.com
on 2007-03-12 The copyright was assigned and transferred under the
terms of the MySQL Contributor License Agreement.


sql/table.cc:
  Shift extra data segment buffer pointer by parser name length to restore
  next key parser name correctly.
parent 4a19d500
...@@ -918,6 +918,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, ...@@ -918,6 +918,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
} }
parser_name.str= (char*) next_chunk; parser_name.str= (char*) next_chunk;
parser_name.length= strlen((char*) next_chunk); parser_name.length= strlen((char*) next_chunk);
next_chunk+= parser_name.length + 1;
keyinfo->parser= my_plugin_lock_by_name(NULL, &parser_name, keyinfo->parser= my_plugin_lock_by_name(NULL, &parser_name,
MYSQL_FTPARSER_PLUGIN); MYSQL_FTPARSER_PLUGIN);
if (! keyinfo->parser) if (! keyinfo->parser)
......
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