Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions storage/mroonga/ha_mroonga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,7 @@ static bool mrn_parse_grn_index_column_flags(THD *thd,
ER_MRN_INVALID_INDEX_FLAG_NUM,
ER_MRN_INVALID_INDEX_FLAG_STR,
invalid_flag_name);
break;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good simple fix following what upstream have - https://github.com/mroonga/mroonga/blob/main/ha_mroonga.cpp#L2102

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and yes, this appears to match upstream Mroonga commit
923d16208bb9226671b663dae713acdfc1aaa3ea ("Fix a infinite loop bug").

The issue is still reproducible in MariaDB's bundled Mroonga code, so this patch effectively backports/syncs that fix here.

}
}
return found;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# MDEV-39479 Mroonga: avoid hang on invalid index flags
#
CREATE TABLE memos (
content VARCHAR(64) NOT NULL,
FULLTEXT INDEX (content) COMMENT 'flags "COMPRESS_ZSTD"'
);
Warnings:
Warning 16508 The index flag 'COMPRESS_ZSTD' is invalid. It is ignored
SELECT mroonga_command("dump --dump_plugins no --dump_schema no");
mroonga_command("dump --dump_plugins no --dump_schema no")
column_create memos#content index COLUMN_INDEX|WITH_POSITION memos content
DROP TABLE memos;
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright(C) 2026
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
Comment thread
aquilamacedo marked this conversation as resolved.

--echo #
--echo # MDEV-39479 Mroonga: avoid hang on invalid index flags
--echo #

--source ../../include/mroonga/have_mroonga.inc
--source ../../include/mroonga/load_mroonga_functions.inc

CREATE TABLE memos (
content VARCHAR(64) NOT NULL,
FULLTEXT INDEX (content) COMMENT 'flags "COMPRESS_ZSTD"'
);

SELECT mroonga_command("dump --dump_plugins no --dump_schema no");

DROP TABLE memos;

--source ../../include/mroonga/unload_mroonga_functions.inc
--source ../../include/mroonga/have_mroonga_deinit.inc