mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
3a42aab81c
(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.
10 lines
339 B
Text
10 lines
339 B
Text
--source include/have_simple_parser.inc
|
|
|
|
#
|
|
# BUG#39746 - Debug flag breaks struct definition (server crash)
|
|
#
|
|
INSTALL PLUGIN simple_parser SONAME 'mypluglib.so';
|
|
CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
|
|
ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
|
|
DROP TABLE t1;
|
|
UNINSTALL PLUGIN simple_parser;
|