diff options
author | Sergey Vojtovich <svoj@mysql.com> | 2008-12-17 17:24:34 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mysql.com> | 2008-12-17 17:24:34 +0400 |
commit | 3a42aab81c2f9b49a5f8ee3ed69af2d8fd1d5b0f (patch) | |
tree | b4187eed5fe207190f6709ef28a341f7546aaed6 /sql/sql_table.cc | |
parent | 0077ba49400a58e2b35181f8b9d6e78314a9b36f (diff) | |
download | mariadb-git-3a42aab81c2f9b49a5f8ee3ed69af2d8fd1d5b0f.tar.gz |
BUG#39746 - Debug flag breaks struct definition
(server crash)
Altering a table with fulltext index[es] which use
pluggable fulltext parser may cause server crash
in debug builds.
The problem was that ALTER TABLE code wrongly assigned
fulltext parser name.
Also fixed that altering a table with fulltext index[es]
leave stale fulltext parser locks, which prevent
fulltext parsers from being uninstalled after
ALTER TABLE.
mysql-test/include/have_simple_parser.inc:
Added support for testing simple fulltext parser.
mysql-test/mysql-test-run.pl:
Added support for testing simple fulltext parser.
mysql-test/r/fulltext_plugin.result:
A test case for BUG#39746.
mysql-test/r/have_simple_parser.require:
Added support for testing simple fulltext parser.
mysql-test/t/fulltext_plugin-master.opt:
A test case for BUG#39746.
mysql-test/t/fulltext_plugin.test:
A test case for BUG#39746.
sql/sql_table.cc:
Fixed that alter table wrongly assigns fulltext parser
name. parser_name member is only available during
table creation. When we open existing table we must
get parser_name from plugin_ref, which is handled
by plugin_name() macro.
sql/table.cc:
Moved code that releases fulltext parsers into
free_table_share(). This fixes stale fulltext parser
locks set by ALTER TABLE, which are preventing fulltext
parsers from being uninstalled.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 8ce4c0b0a46..51b16ba0f43 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -5870,7 +5870,7 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, if (key_info->flags & HA_USES_BLOCK_SIZE) key_create_info.block_size= key_info->block_size; if (key_info->flags & HA_USES_PARSER) - key_create_info.parser_name= *key_info->parser_name; + key_create_info.parser_name= *plugin_name(key_info->parser); if (key_info->flags & HA_SPATIAL) key_type= Key::SPATIAL; |