MDEV-38454 CHANGE MASTER TO master_heartbeat_period does not accept numbers with + sign#4617
Open
gengtianuiowa wants to merge 2 commits intoMariaDB:mainfrom
Open
MDEV-38454 CHANGE MASTER TO master_heartbeat_period does not accept numbers with + sign#4617gengtianuiowa wants to merge 2 commits intoMariaDB:mainfrom
+ sign#4617gengtianuiowa wants to merge 2 commits intoMariaDB:mainfrom
Conversation
…umbers with `+` sign Fixed parser inconsistency where CHANGE MASTER TO master_heartbeat_period rejected numeric values with an explicit '+' sign, while other parameters like master_connect_retry accepted them. The issue was in sql/sql_yacc.yy where master_heartbeat_period used NUM_literal (which doesn't accept '+'), while other parameters used ulong_num (which includes opt_plus). Solution: Added opt_plus before NUM_literal in the master_heartbeat_period grammar rule, making it consistent with other numeric parameters. Added test case to verify: - master_heartbeat_period=+60 now works (was broken) - master_heartbeat_period=60 still works (backward compatible) - Consistent behavior across all CHANGE MASTER TO numeric parameters All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
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.
Description
Fixed parser inconsistency where CHANGE MASTER TO master_heartbeat_period rejected numeric values with an explicit '+' sign, while other parameters like master_connect_retry accepted them.
The issue was in sql/sql_yacc.yy where master_heartbeat_period used NUM_literal (which doesn't accept '+'), while other parameters used ulong_num (which includes opt_plus).
Solution: Added opt_plus before NUM_literal in the master_heartbeat_period grammar rule, making it consistent with other numeric parameters.
How can this PR be tested?
Execute the
mdev_38454.testinrpltest suite in mysql-test-run.Basing the PR against the correct MariaDB version
Backward compatibility
This is a bug fix which allows "+" sign for "master_heartbeat_period". It is compatible with previous versions.
Copyright
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.