-
Notifications
You must be signed in to change notification settings - Fork 102
restore: Fix system tables are filtered bug #1207
Conversation
/run-integration-tests |
2 similar comments
/run-integration-tests |
/run-integration-tests |
/run-integration-test |
pkg/utils/schema.go
Outdated
func GetSysDBName(tempDB model.CIStr) (string, bool) { | ||
ok := strings.Contains(tempDB.O, "__TiDB_BR_Temporary_") | ||
i := strings.LastIndex(tempDB.O, "_") | ||
return tempDB.O[i+1:], ok |
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 should be checking if ok := strings.HasPrefix(tempDB.O, "__TiDB_BR_Temporary_")
, right? And the i+1
is the length of that temporary string.
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.
fixed this method
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 33f6b11
|
In response to a cherrypick label: new pull request created: #1216. |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #1224. |
In response to a cherrypick label: new pull request created: #1225. |
What problem does this PR solve?
Fix issue #1197 and #1201
When user only want to restore the system table, i.e. -f "mysql*.*", because the system database was rename to a temporary name, that name will be filtered causing no system table is restored
What is changed and how it works?
When filter restore databases and tables, revert the temporary name to its original name
Check List
Tests
Code changes
Related changes
Release note