-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
variable: fix information_schema.VARIABLES_INFO DEFAULT_VALUE not right problem #49524
Merged
ti-chi-bot
merged 11 commits into
pingcap:master
from
jiyfhust:fix_variables_info_defaultvalue
Jan 11, 2024
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b3c5c16
fix information_schema.VARIABLES_INFO DEFAULT_VALUE not right
jiyfhust 5f3cab7
fix
jiyfhust 0861ba6
fix
jiyfhust 0bdec4e
add unittest
jiyfhust cb77afd
Merge branch 'pingcap:master' into fix_variables_info_defaultvalue
jiyfhust 209f385
fix set global variables to default
jiyfhust 0755997
add set global variable default value tests
jiyfhust 21f0c53
fix test
jiyfhust 0558302
fix
jiyfhust 432625c
fix test
jiyfhust 5697500
fix
jiyfhust File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we retrieve the default value from a centralized location instead of hard coding it here? This could be a problem if we ever need to change the default value in the future but forget to modify this here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this way. But it seems
defaultSysVars
is inited early thanconfig.GetGlobalConfig()
, so it can't work.Maybe we can set
variable.GetSysVars
afterconfig.GetGlobalConfig()
loaded, but it is also "hard coding".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TiDBEnableAsyncCommit
,we need do that afterconfig.GetGlobalConfig()
loadeddefaultSysVars
, for exampleTiDBRowFormatVersion
./cc @JmPotato
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this PR has minimal changes to fix the bug. If we want a more elegant way to make it, some questions should be answered before:
TiDBEnableAsyncCommit
configured statically without reading global config.tidb_pessimistic_txn_fair_locking
, it should keep the old default value 'OFF' after upgrading and 'ON' for a new cluster.