MDEV-39479 Mroonga: avoid hang on invalid index flags#5011
Merged
vuvova merged 1 commit intoMariaDB:10.6from Apr 29, 2026
Merged
MDEV-39479 Mroonga: avoid hang on invalid index flags#5011vuvova merged 1 commit intoMariaDB:10.6from
vuvova merged 1 commit intoMariaDB:10.6from
Conversation
grooverdan
reviewed
Apr 28, 2026
Member
grooverdan
left a comment
There was a problem hiding this comment.
Minor test case fixes and its all good from me.
| ER_MRN_INVALID_INDEX_FLAG_NUM, | ||
| ER_MRN_INVALID_INDEX_FLAG_STR, | ||
| invalid_flag_name); | ||
| break; |
Member
There was a problem hiding this comment.
good simple fix following what upstream have - https://github.com/mroonga/mroonga/blob/main/ha_mroonga.cpp#L2102
Contributor
Author
There was a problem hiding this comment.
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.
Stop parsing index flags after reporting an invalid flag in mrn_parse_grn_index_column_flags(). Otherwise, an invalid index comment such as flags "COMPRESS_ZSTD" can make CREATE TABLE loop forever while emitting warnings. Add a regression test for this case and check that the invalid flag is reported once and the default index flags are used.
grooverdan
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stop parsing index flags after reporting an invalid flag in
mrn_parse_grn_index_column_flags().Otherwise, an invalid index comment such as flags "COMPRESS_ZSTD" can make CREATE TABLE loop forever while emitting warnings. Add a regression test for this case and check that the invalid flag is reported once and the default index flags are used.
This fix already exists in upstream Mroonga:
https://github.com/mroonga/mroonga/blob/main/ha_mroonga.cpp#L2102