-
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
ddl: check constraint name. #72
Merged
Merged
Conversation
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
Fixes #66 and also check duplication.
@@ -261,6 +262,37 @@ func checkDuplicateColumn(colDefs []*coldef.ColumnDef) error { | |||
return nil | |||
} | |||
|
|||
func checkConstraintNames(constraints []*coldef.TableConstraint) error { | |||
m := map[string]bool{} |
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.
use another clear name instead of m?
LGTM |
YuJuncen
pushed a commit
to YuJuncen/tidb
that referenced
this pull request
Apr 23, 2021
* util: added a general TransactWithRetry function Turned ExecWithRetry to handle a single SQL statement only (all existing calls use a single SQL statement only). Also make it accept arguments. For execution with multiple statements, use TransactWithRetry. Also added a WriteMySQLIdentifier function for proper identifier escaping (doubling the '`'s). * util: extracted ToDSN function out * main_test: write the PID to a PIDFILE if wanted This allows external processes to easily kill a lightning instance * config: added config for checkpoints * restore, checkpoints: implement MySQL-based checkpoints * restore: removed closeWithRetry in favor of checkpoints If there is failure in closing an engine, we could now retry after fixing the error offline. * tests: added test cases for checkpoints * *: adapted checkpoints v1.1 This version recognizes that importer's WriteEngine is not the atomic operation, but the individual Send to the stream. Thus we instead just create a new stream everytime we want to deliver something. This also allows us to support chunk checkpoints on non-PKIsHandle tables (in particular UUID-based tables). * vendor: add github.com/joho/sqltocsv * cmd: added tidb-lightning-ctl to manage checkpoints * restore: added a step to clean checkpoints after finish User still needs to remove the schema manually, but at least some more sensitive data should have be gone. * *: silence some errors about Ctrl+C * *: addressed comments * util: use errors.Annotate in transactImpl to shorten unnecessary logs
YuJuncen
pushed a commit
to YuJuncen/tidb
that referenced
this pull request
Apr 23, 2021
* backup range by table info * update intergation test
xhebox
pushed a commit
to xhebox/tidb
that referenced
this pull request
Sep 28, 2021
xhebox
pushed a commit
to xhebox/tidb
that referenced
this pull request
Oct 8, 2021
ti-chi-bot
pushed a commit
that referenced
this pull request
Oct 9, 2021
okJiang
pushed a commit
to okJiang/tidb
that referenced
this pull request
Oct 19, 2021
* cmd: replace cobra by pflag we don't need subcommand parsing, let's choose a less heavyweight library * cmd: added the --version/-V flag * log: support configurating log file and format
Defined2014
pushed a commit
to Defined2014/tidb
that referenced
this pull request
Apr 14, 2022
iosmanthus
pushed a commit
to iosmanthus/tidb
that referenced
this pull request
Oct 31, 2022
* fix getCodec and WatchKeyspaces
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.
Fixes #66 and also check duplication.