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: disallow dropping index on auto_increment column (#11360) #11399

Merged
merged 4 commits into from
Jul 26, 2019

Conversation

tangenta
Copy link
Contributor

Cherry-pick #11360.

Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tangenta tangenta added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 24, 2019
@@ -295,7 +296,7 @@ func (p *preprocessor) checkAutoIncrement(stmt *ast.CreateTableStmt) {
}
}
if (autoIncrementMustBeKey && !isKey) || count > 1 {
p.err = errors.New("Incorrect table definition; there can be only one auto column and it must be defined as a key")
p.err = autoid.ErrWrongAutoKey.GenWithStackByArgs()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If arguments is empty, I think we can use GenWithStack()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zz-jason GenWithStack() accepts a formatted string, but there is no such string here.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added status/can-merge Indicates a PR has been approved by a committer. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 24, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jul 24, 2019

@tangenta merge failed.

@tangenta
Copy link
Contributor Author

[2019-07-24T11:07:45.144Z] ----------------------------------------------------------------------
[2019-07-24T11:07:45.144Z] FAIL: client_fail_test.go:32: testClientSuite.TestPanicInRecvLoop
[2019-07-24T11:07:45.144Z] 
[2019-07-24T11:07:45.144Z] client_fail_test.go:57:
[2019-07-24T11:07:45.144Z]     c.Assert(err, IsNil)
[2019-07-24T11:07:45.144Z] ... value *errors.fundamental = injected error in batchRecvLoop ("injected error in batchRecvLoop")

/run-check_dev_2

@tangenta
Copy link
Contributor Author

/rebuild

@tangenta
Copy link
Contributor Author

tangenta commented Jul 24, 2019

----------------------------------------------------------------------
FAIL: client_fail_test.go:32: testClientSuite.TestPanicInRecvLoop

client_fail_test.go:57:
    c.Assert(err, IsNil)
... value *errors.fundamental = injected error in batchRecvLoop ("injected error in batchRecvLoop")

This error has occurred for the second time. @crazycs520 PTAL?

@zz-jason zz-jason merged commit 1124627 into pingcap:release-3.0 Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants