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: ignore integer zerofill size attribute when changing the column types (#20862) #20986

Merged
merged 5 commits into from
Nov 18, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #20862 to release-4.0


What problem does this PR solve?

Issue Number: close #20529

What is changed and how it works?

how does it work?

Like int(3), bigint(2), the number enclosed will be stored as flen in the field type, while it shouldn't be concerned when we make column type change from int(3) to(2) . Because bigint is quite larger than int, there is no need to take a reorg process.

what is changed

We should use the default flen of the specified field type rather than the origin flen.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • ddl: ignore integer zerofill size attribute when changing the column types

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@bb7133
Copy link
Member

bb7133 commented Nov 11, 2020

@AilinKid Please resolve the conflicts.

@zz-jason
Copy link
Member

@AilinKid please fix the build:

[2020-11-11T07:23:49.371Z] # github.com/pingcap/tidb/ddl

[2020-11-11T07:23:49.371Z] ddl/column.go:355:1: syntax error: non-declaration statement outside function body

[2020-11-11T07:23:49.371Z] ddl/column.go:363:1: syntax error: unexpected ==, expecting }

[2020-11-11T07:23:49.371Z] ddl/column.go:441:1: syntax error: unexpected >>, expecting }

[2020-11-11T07:23:49.371Z] ddl/column.go:441:98: invalid character U+0023 '#'

[2020-11-11T07:23:49.371Z] make: *** [importer] Error 2

[2020-11-11T07:23:49.933Z] # github.com/pingcap/tidb/ddl

[2020-11-11T07:23:49.933Z] ddl/column.go:355:1: syntax error: non-declaration statement outside function body

[2020-11-11T07:23:49.933Z] ddl/column.go:363:1: syntax error: unexpected ==, expecting }

[2020-11-11T07:23:49.933Z] ddl/column.go:441:1: syntax error: unexpected >>, expecting }

[2020-11-11T07:23:49.933Z] ddl/column.go:441:98: invalid character U+0023 '#'

[2020-11-11T07:23:49.933Z] make: *** [server] Error 2

[2020-11-11T07:23:49.933Z] # github.com/pingcap/tidb/ddl

[2020-11-11T07:23:49.933Z] ddl/column.go:355:1: syntax error: non-declaration statement outside function body

[2020-11-11T07:23:49.933Z] ddl/column.go:363:1: syntax error: unexpected ==, expecting }

[2020-11-11T07:23:49.933Z] ddl/column.go:441:1: syntax error: unexpected >>, expecting }

[2020-11-11T07:23:49.933Z] ddl/column.go:441:98: invalid character U+0023 '#'

[2020-11-11T07:23:49.933Z] make: *** [server] Error 2

AilinKid and others added 3 commits November 17, 2020 17:13
Signed-off-by: AilinKid <314806019@qq.com>
Signed-off-by: AilinKid <314806019@qq.com>
@AilinKid
Copy link
Contributor

/run-all-tests

@AilinKid
Copy link
Contributor

/run-tics-test

@AilinKid
Copy link
Contributor

/run-sqllogic-test-2

@AilinKid
Copy link
Contributor

/run-unit-test

@AilinKid
Copy link
Contributor

/run-tics-test

1 similar comment
@AilinKid
Copy link
Contributor

/run-tics-test

@AilinKid
Copy link
Contributor

/run-unit-test

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 18, 2020
Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 18, 2020
@bb7133 bb7133 merged commit 2b1b260 into pingcap:release-4.0 Nov 18, 2020
@tiancaiamao tiancaiamao deleted the release-4.0-38f876044fef branch November 30, 2020 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants