Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/importer/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func genColumnData(table *table, column *column) (string, error) {

data = append(data, '\'')
return string(data), nil
case mysql.TypeNewDecimal, mysql.TypeDecimal:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should remove the TypeDecimal here, it's misuse

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

revert done, thx~

ditto.

case mysql.TypeNewDecimal:
var limit = int64(math.Pow10(tp.Flen))
var intVal int64
if limit < 0 {
Expand Down
2 changes: 1 addition & 1 deletion ddl/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func getIndexColumnLength(col *model.ColumnInfo, colLen int) (int, error) {
return mysql.DefaultLengthOfMysqlTypes[mysql.TypeFloat], nil
}
return mysql.DefaultLengthOfMysqlTypes[mysql.TypeDouble], nil
case mysql.TypeDecimal, mysql.TypeNewDecimal:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should remove the TypeDecimal here, it's misuse

case mysql.TypeNewDecimal:
return calcBytesLengthForDecimal(length), nil
case mysql.TypeYear, mysql.TypeDate, mysql.TypeDuration, mysql.TypeDatetime, mysql.TypeTimestamp:
return mysql.DefaultLengthOfMysqlTypes[col.Tp], nil
Expand Down
2 changes: 1 addition & 1 deletion expression/builtin_cast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func (s *testEvaluatorSuite) TestCastXXX(c *C) {

// cast(bad_string as decimal)
for _, s := range []string{"hello", ""} {
f = BuildCastFunction(ctx, &Constant{Value: types.NewDatum(s), RetType: types.NewFieldType(mysql.TypeDecimal)}, tp)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be changed to TypeNewDecimal

f = BuildCastFunction(ctx, &Constant{Value: types.NewDatum(s), RetType: types.NewFieldType(mysql.TypeNewDecimal)}, tp)
res, err = f.Eval(chunk.Row{})
c.Assert(err, IsNil)
}
Expand Down
2 changes: 1 addition & 1 deletion expression/builtin_cast_vec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (s *testEvaluatorSuite) TestVectorizedCastStringAsDecimalWithUnsignedFlagIn
}

for _, input := range inputs {
result := chunk.NewColumn(types.NewFieldType(mysql.TypeDecimal), input.NumRows())
result := chunk.NewColumn(types.NewFieldType(mysql.TypeNewDecimal), input.NumRows())
c.Assert(cast.vecEvalDecimal(input, result), IsNil)
for i := 0; i < input.NumRows(); i++ {
res, isNull, err := cast.evalDecimal(input.GetRow(i))
Expand Down
4 changes: 2 additions & 2 deletions expression/builtin_other_vec_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion expression/builtin_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -4867,7 +4867,7 @@ func (c *timestampFunctionClass) getFunction(ctx sessionctx.Context, args []Expr
}
isFloat := false
switch args[0].GetType().Tp {
case mysql.TypeFloat, mysql.TypeDouble, mysql.TypeDecimal:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to change this TypeDecimal to TypeNewDecimal

case mysql.TypeFloat, mysql.TypeDouble, mysql.TypeNewDecimal:
isFloat = true
}
bf, err := newBaseBuiltinFuncWithTp(ctx, c.funcName, args, types.ETDatetime, evalTps...)
Expand Down
1 change: 0 additions & 1 deletion expression/expr_to_pb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ func (s *testEvaluatorSuite) TestColumn2Pb(c *C) {
colExprs = append(colExprs, dg.genColumn(mysql.TypeEnum, 3))
colExprs = append(colExprs, dg.genColumn(mysql.TypeGeometry, 4))
colExprs = append(colExprs, dg.genColumn(mysql.TypeUnspecified, 5))
colExprs = append(colExprs, dg.genColumn(mysql.TypeDecimal, 6))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why remove this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since if mysql.TypeDecimal is replaced into mysql.TypeUnspecified, the test will duplicate.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we can change this TypeDecimal to TypeNewDecimal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Emmmm... The test for mysql.TypeNewDecimal has been added in the following code. Add it will also duplicate.


pushed, remained := PushDownExprs(sc, colExprs, client, kv.UnSpecified)
c.Assert(len(pushed), Equals, 0)
Expand Down
4 changes: 2 additions & 2 deletions expression/generator/other_vec.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ var vecBuiltin{{ .Category }}GeneratedCases = map[string][]vecExprBenchCase {
{Value: types.NewFloat64Datum(0.2), RetType: types.NewFieldType(mysql.TypeFloat)},
{{- end }}
{{- if eq .Input.ETName "Decimal" }}
{Value: types.NewDecimalDatum(types.NewDecFromInt(10)), RetType: types.NewFieldType(mysql.TypeDecimal)},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be changed to TypeNewDecimal

{Value: types.NewDecimalDatum(types.NewDecFromInt(20)), RetType: types.NewFieldType(mysql.TypeDecimal)},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be changed to TypeNewDecimal

{Value: types.NewDecimalDatum(types.NewDecFromInt(10)), RetType: types.NewFieldType(mysql.TypeNewDecimal)},
{Value: types.NewDecimalDatum(types.NewDecFromInt(20)), RetType: types.NewFieldType(mysql.TypeNewDecimal)},
{{- end }}
},
},
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require (
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989
github.com/pingcap/kvproto v0.0.0-20200706115936-1e0910aabe6c
github.com/pingcap/log v0.0.0-20200511115504-543df19646ad
github.com/pingcap/parser v0.0.0-20200717054943-cd445b0c607b
github.com/pingcap/parser v0.0.0-20200729064743-5fe0b0fdf629
github.com/pingcap/pd/v4 v4.0.0-rc.2.0.20200714122454-1a64f969cb3c
github.com/pingcap/sysutil v0.0.0-20200715082929-4c47bcac246a
github.com/pingcap/tidb-tools v4.0.1+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ github.com/pingcap/parser v0.0.0-20200518090819-ec1e13b948b1/go.mod h1:vQdbJqobJ
github.com/pingcap/parser v0.0.0-20200522094936-3b720a0512a6/go.mod h1:vQdbJqobJAgFyiRNNtXahpMoGWwPEuWciVEK5A20NS0=
github.com/pingcap/parser v0.0.0-20200609110328-c65941b9fbb3/go.mod h1:vQdbJqobJAgFyiRNNtXahpMoGWwPEuWciVEK5A20NS0=
github.com/pingcap/parser v0.0.0-20200623082809-b74301ac298b/go.mod h1:vQdbJqobJAgFyiRNNtXahpMoGWwPEuWciVEK5A20NS0=
github.com/pingcap/parser v0.0.0-20200717054943-cd445b0c607b h1:/qZ2NEHSYaZN8G3eNIpTkt7DZgiM7DkzKmb31hL5QrU=
github.com/pingcap/parser v0.0.0-20200717054943-cd445b0c607b/go.mod h1:vQdbJqobJAgFyiRNNtXahpMoGWwPEuWciVEK5A20NS0=
github.com/pingcap/parser v0.0.0-20200729064743-5fe0b0fdf629 h1:pBEzY0/NKPS5lZ2uo80KF+5M5al5j9GsYWrQBvDxmvY=
github.com/pingcap/parser v0.0.0-20200729064743-5fe0b0fdf629/go.mod h1:vQdbJqobJAgFyiRNNtXahpMoGWwPEuWciVEK5A20NS0=
github.com/pingcap/pd/v4 v4.0.0-rc.1.0.20200422143320-428acd53eba2/go.mod h1:s+utZtXDznOiL24VK0qGmtoHjjXNsscJx3m1n8cC56s=
github.com/pingcap/pd/v4 v4.0.0-rc.2.0.20200520083007-2c251bd8f181/go.mod h1:q4HTx/bA8aKBa4S7L+SQKHvjRPXCRV0tA0yRw0qkZSA=
github.com/pingcap/pd/v4 v4.0.0-rc.2.0.20200714122454-1a64f969cb3c h1:aOiyGetA256/LUkdmhny0Q/PWTBQiF/TPNhJuJMGRSY=
Expand Down
2 changes: 1 addition & 1 deletion types/etc.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func IsTypeTime(tp byte) bool {
func IsTypeNumeric(tp byte) bool {
switch tp {
case mysql.TypeBit, mysql.TypeTiny, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong, mysql.TypeNewDecimal,
mysql.TypeDecimal, mysql.TypeFloat, mysql.TypeDouble, mysql.TypeShort:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should change this to TypeNewDecimal

mysql.TypeFloat, mysql.TypeDouble, mysql.TypeShort:
return true
}
return false
Expand Down
4 changes: 2 additions & 2 deletions types/etc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ func (s *testTypeEtcSuite) TestIsTypeNumeric(c *C) {
res = IsTypeNumeric(mysql.TypeNewDecimal)
c.Assert(res, Equals, true)

res = IsTypeNumeric(mysql.TypeDecimal)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should change this to TypeNewDecimal

c.Assert(res, Equals, true)
res = IsTypeNumeric(mysql.TypeUnspecified)
c.Assert(res, Equals, false)

res = IsTypeNumeric(mysql.TypeFloat)
c.Assert(res, Equals, true)
Expand Down
62 changes: 31 additions & 31 deletions types/field_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ const (
)

var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
/* mysql.TypeDecimal -> */
/* mysql.TypeUnspecified -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
//mysql.TypeShort mysql.TypeLong
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
Expand All @@ -342,7 +342,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeDecimal, mysql.TypeDecimal,
mysql.TypeUnspecified, mysql.TypeUnspecified,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
Expand All @@ -366,7 +366,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeTiny -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeTiny,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
Expand Down Expand Up @@ -399,7 +399,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeShort -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeShort,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
Expand Down Expand Up @@ -432,7 +432,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeLong -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeLong,
//mysql.TypeShort mysql.TypeLong
mysql.TypeLong, mysql.TypeLong,
Expand Down Expand Up @@ -465,7 +465,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeFloat -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeDouble, mysql.TypeFloat,
//mysql.TypeShort mysql.TypeLong
mysql.TypeFloat, mysql.TypeDouble,
Expand Down Expand Up @@ -498,7 +498,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeDouble -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeShort mysql.TypeLong
mysql.TypeDouble, mysql.TypeDouble,
Expand Down Expand Up @@ -531,7 +531,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeNull -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeTiny,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
Expand Down Expand Up @@ -564,7 +564,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeTimestamp -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -597,7 +597,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeLonglong -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeLonglong,
//mysql.TypeShort mysql.TypeLong
mysql.TypeLonglong, mysql.TypeLonglong,
Expand Down Expand Up @@ -630,7 +630,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeInt24 -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeInt24,
//mysql.TypeShort mysql.TypeLong
mysql.TypeInt24, mysql.TypeLong,
Expand Down Expand Up @@ -663,7 +663,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeDate -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -696,7 +696,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeTime -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -729,7 +729,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeDatetime -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -762,8 +762,8 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeYear -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeDecimal, mysql.TypeTiny,
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeUnspecified, mysql.TypeTiny,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
Expand Down Expand Up @@ -795,7 +795,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeNewDate -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -828,7 +828,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeVarchar -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -861,7 +861,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeBit -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -894,7 +894,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeJSON -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -927,7 +927,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeNewDecimal -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
//mysql.TypeShort mysql.TypeLong
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
Expand Down Expand Up @@ -960,7 +960,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeEnum -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -993,7 +993,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeSet -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -1026,7 +1026,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeTinyBlob -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeTinyBlob, mysql.TypeTinyBlob,
//mysql.TypeShort mysql.TypeLong
mysql.TypeTinyBlob, mysql.TypeTinyBlob,
Expand Down Expand Up @@ -1059,7 +1059,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeMediumBlob -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeMediumBlob, mysql.TypeMediumBlob,
//mysql.TypeShort mysql.TypeLong
mysql.TypeMediumBlob, mysql.TypeMediumBlob,
Expand Down Expand Up @@ -1092,7 +1092,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeLongBlob -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeLongBlob, mysql.TypeLongBlob,
//mysql.TypeShort mysql.TypeLong
mysql.TypeLongBlob, mysql.TypeLongBlob,
Expand Down Expand Up @@ -1125,7 +1125,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeBlob -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeBlob, mysql.TypeBlob,
//mysql.TypeShort mysql.TypeLong
mysql.TypeBlob, mysql.TypeBlob,
Expand Down Expand Up @@ -1158,7 +1158,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeVarString -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down Expand Up @@ -1191,7 +1191,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeString -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeString, mysql.TypeString,
//mysql.TypeShort mysql.TypeLong
mysql.TypeString, mysql.TypeString,
Expand Down Expand Up @@ -1224,7 +1224,7 @@ var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
},
/* mysql.TypeGeometry -> */
{
//mysql.TypeDecimal mysql.TypeTiny
//mysql.TypeUnspecified mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
Expand Down
Loading