Skip to content
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 2 commits into from
Sep 9, 2015
Merged

ddl: check constraint name. #72

merged 2 commits into from
Sep 9, 2015

Conversation

coocood
Copy link
Member

@coocood coocood commented Sep 8, 2015

Fixes #66 and also check duplication.

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{}
Copy link
Member

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?

@siddontang
Copy link
Member

LGTM

coocood added a commit that referenced this pull request Sep 9, 2015
@coocood coocood merged commit a54c896 into master Sep 9, 2015
@coocood coocood deleted the coocood/constraint-name branch September 9, 2015 00:23
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants