Skip to content

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

Merged
vuvova merged 1 commit intoMariaDB:10.6from
aquilamacedo:10.6
Apr 29, 2026
Merged

MDEV-39479 Mroonga: avoid hang on invalid index flags#5011
vuvova merged 1 commit intoMariaDB:10.6from
aquilamacedo:10.6

Conversation

@aquilamacedo
Copy link
Copy Markdown
Contributor

@aquilamacedo aquilamacedo commented Apr 28, 2026

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

Copy link
Copy Markdown
Member

@grooverdan grooverdan left a comment

Choose a reason for hiding this comment

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

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;
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.

@grooverdan grooverdan added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Apr 28, 2026
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.
@vuvova vuvova merged commit dc4b5d4 into MariaDB:10.6 Apr 29, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants