-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
infoschema: fix default NUMBER_SCALE value of float type #7602
Conversation
infoschema/tables.go
Outdated
@@ -1006,24 +1010,24 @@ func dataForTableConstraints(schemas []*model.DBInfo) [][]types.Datum { | |||
func dataForPseudoProfiling() [][]types.Datum { | |||
var rows [][]types.Datum | |||
row := types.MakeDatums( | |||
0, // QUERY_ID |
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.
Please update your golang version to 1.11.
infoschema/tables.go
Outdated
@@ -1006,24 +1010,24 @@ func dataForTableConstraints(schemas []*model.DBInfo) [][]types.Datum { | |||
func dataForPseudoProfiling() [][]types.Datum { | |||
var rows [][]types.Datum | |||
row := types.MakeDatums( | |||
0, // QUERY_ID |
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.
Please update your golang version to 1.11, then format again.
PTAL @jackysp |
/run-all-tests |
@imtbkcat Please fix the CI. |
/run-all-tests |
@shenli ok. |
/run-all-tests tidb-test=pr/619 |
1 similar comment
/run-all-tests tidb-test=pr/619 |
LGTM |
/run-all-tests tidb-test=pr/619 |
/run-all-tests tidb-test=pr/619 |
/run-all-tests tidb-test=pr/619 |
/run-all-tests |
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.
LGTM
What problem does this PR solve?
Fix wrong value for default
numberScale
value for float and double type.Test Case:
MySQL:
TiDB:
This is because the default value of
NUMERIC_SCALE
for float and double type is-1
, butNUMERIC_SCALE
is aUNSIGNED LONG
.What is changed and how it works?
add code to make
NUMERIC_SCALE
same as MySQL.Check List
Tests
Code changes
Side effects
-No