-
Notifications
You must be signed in to change notification settings - Fork 5.9k
/
field_type.go
1328 lines (1299 loc) · 45 KB
/
field_type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2015 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package types
import (
"fmt"
"strconv"
"strings"
"github.com/pingcap/tidb/mysql"
"github.com/pingcap/tidb/util/charset"
"github.com/pingcap/tidb/util/format"
"github.com/pingcap/tidb/util/types/json"
)
// UnspecifiedLength is unspecified length.
const (
UnspecifiedLength int = -1
)
// FieldType records field type information.
type FieldType struct {
Tp byte
Flag uint
Flen int
Decimal int
Charset string
Collate string
// Elems is the element list for enum and set type.
Elems []string
}
// NewFieldType returns a FieldType,
// with a type and other information about field type.
func NewFieldType(tp byte) *FieldType {
return &FieldType{
Tp: tp,
Flen: UnspecifiedLength,
Decimal: UnspecifiedLength,
}
}
// AggFieldType aggregates field types for a multi-argument function like `IF`, `IFNULL`, `COALESCE`
// whose return type is determined by the arguments' FieldTypes.
// Aggregation is performed by MergeFieldType function.
func AggFieldType(tps []*FieldType) *FieldType {
var currType FieldType
for i, t := range tps {
if i == 0 && currType.Tp == mysql.TypeUnspecified {
currType = *t
continue
}
mtp := MergeFieldType(currType.Tp, t.Tp)
currType.Tp = mtp
}
return &currType
}
// AggregateEvalType aggregates arguments' EvalType of a multi-argument function.
func AggregateEvalType(fts []*FieldType, flag *uint) EvalType {
var (
aggregatedEvalType = ETString
unsigned bool
gotFirst bool
gotBinString bool
)
for _, ft := range fts {
if ft.Tp == mysql.TypeNull {
continue
}
et := ft.EvalType()
if (IsTypeBlob(ft.Tp) || IsTypeVarchar(ft.Tp) || IsTypeChar(ft.Tp)) && mysql.HasBinaryFlag(ft.Flag) {
gotBinString = true
}
if !gotFirst {
gotFirst = true
aggregatedEvalType = et
unsigned = mysql.HasUnsignedFlag(ft.Flag)
} else {
aggregatedEvalType = mergeEvalType(aggregatedEvalType, et, unsigned, mysql.HasUnsignedFlag(ft.Flag))
unsigned = unsigned && mysql.HasUnsignedFlag(ft.Flag)
}
}
setTypeFlag(flag, mysql.UnsignedFlag, unsigned)
setTypeFlag(flag, mysql.BinaryFlag, !aggregatedEvalType.IsStringKind() || gotBinString)
return aggregatedEvalType
}
func mergeEvalType(lhs, rhs EvalType, isLHSUnsigned, isRHSUnsigned bool) EvalType {
if lhs.IsStringKind() || rhs.IsStringKind() {
return ETString
} else if lhs == ETReal || rhs == ETReal {
return ETReal
} else if lhs == ETDecimal || rhs == ETDecimal || isLHSUnsigned != isRHSUnsigned {
return ETDecimal
}
return ETInt
}
func setTypeFlag(flag *uint, flagItem uint, on bool) {
if on {
*flag |= flagItem
} else {
*flag &= ^flagItem
}
}
// EvalType gets the type in evaluation.
func (ft *FieldType) EvalType() EvalType {
switch ft.Tp {
case mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong,
mysql.TypeBit, mysql.TypeYear:
return ETInt
case mysql.TypeFloat, mysql.TypeDouble:
return ETReal
case mysql.TypeNewDecimal:
return ETDecimal
case mysql.TypeDate, mysql.TypeDatetime:
return ETDatetime
case mysql.TypeTimestamp:
return ETTimestamp
case mysql.TypeDuration:
return ETDuration
case mysql.TypeJSON:
return ETJson
}
return ETString
}
// Hybrid checks whether a type is a hybrid type, which can represent different types of value in specific context.
func (ft *FieldType) Hybrid() bool {
return ft.Tp == mysql.TypeEnum || ft.Tp == mysql.TypeBit || ft.Tp == mysql.TypeSet
}
// Init initializes the FieldType data.
func (ft *FieldType) Init(tp byte) {
ft.Tp = tp
ft.Flen = UnspecifiedLength
ft.Decimal = UnspecifiedLength
}
// CompactStr only considers Tp/CharsetBin/Flen/Deimal.
// This is used for showing column type in infoschema.
func (ft *FieldType) CompactStr() string {
ts := TypeToStr(ft.Tp, ft.Charset)
suffix := ""
defaultFlen, defaultDecimal := mysql.GetDefaultFieldLengthAndDecimal(ft.Tp)
isFlenNotDefault := ft.Flen != defaultFlen && ft.Flen != 0 && ft.Flen != UnspecifiedLength
isDecimalNotDefault := ft.Decimal != defaultDecimal && ft.Decimal != 0 && ft.Decimal != UnspecifiedLength
// displayFlen and displayDecimal are flen and decimal values with `-1` substituted with default value.
displayFlen, displayDecimal := ft.Flen, ft.Decimal
if displayFlen == 0 || displayFlen == UnspecifiedLength {
displayFlen = defaultFlen
}
if displayDecimal == 0 || displayDecimal == UnspecifiedLength {
displayDecimal = defaultDecimal
}
switch ft.Tp {
case mysql.TypeEnum, mysql.TypeSet:
// Format is ENUM ('e1', 'e2') or SET ('e1', 'e2')
es := make([]string, 0, len(ft.Elems))
for _, e := range ft.Elems {
e = format.OutputFormat(e)
es = append(es, e)
}
suffix = fmt.Sprintf("('%s')", strings.Join(es, "','"))
case mysql.TypeTimestamp, mysql.TypeDatetime, mysql.TypeDuration:
if isDecimalNotDefault {
suffix = fmt.Sprintf("(%d)", displayDecimal)
}
case mysql.TypeDouble, mysql.TypeFloat:
// 1. Flen Not Default, Decimal Not Default -> Valid
// 2. Flen Not Default, Decimal Default (-1) -> Invalid
// 3. Flen Default, Decimal Not Default -> Valid
// 4. Flen Default, Decimal Default -> Valid (hide)
if isDecimalNotDefault {
suffix = fmt.Sprintf("(%d,%d)", displayFlen, displayDecimal)
}
case mysql.TypeNewDecimal:
if isFlenNotDefault || isDecimalNotDefault {
suffix = fmt.Sprintf("(%d", displayFlen)
if isDecimalNotDefault {
suffix += fmt.Sprintf(",%d", displayDecimal)
}
suffix += ")"
}
case mysql.TypeBit, mysql.TypeShort, mysql.TypeTiny, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong, mysql.TypeVarchar, mysql.TypeString, mysql.TypeVarString:
// Flen is always shown.
suffix = fmt.Sprintf("(%d)", displayFlen)
}
return ts + suffix
}
// InfoSchemaStr joins the CompactStr with unsigned flag and
// returns a string.
func (ft *FieldType) InfoSchemaStr() string {
suffix := ""
if mysql.HasUnsignedFlag(ft.Flag) {
suffix = " unsigned"
}
return ft.CompactStr() + suffix
}
// String joins the information of FieldType and returns a string.
// Note: when flen or decimal is unspecified, this function will use the default value instead of -1.
func (ft *FieldType) String() string {
strs := []string{ft.CompactStr()}
if mysql.HasUnsignedFlag(ft.Flag) {
strs = append(strs, "UNSIGNED")
}
if mysql.HasZerofillFlag(ft.Flag) {
strs = append(strs, "ZEROFILL")
}
if mysql.HasBinaryFlag(ft.Flag) && ft.Tp != mysql.TypeString {
strs = append(strs, "BINARY")
}
if IsTypeChar(ft.Tp) || IsTypeBlob(ft.Tp) {
if ft.Charset != "" && ft.Charset != charset.CharsetBin {
strs = append(strs, fmt.Sprintf("CHARACTER SET %s", ft.Charset))
}
if ft.Collate != "" && ft.Collate != charset.CharsetBin {
strs = append(strs, fmt.Sprintf("COLLATE %s", ft.Collate))
}
}
return strings.Join(strs, " ")
}
// DefaultTypeForValue returns the default FieldType for the value.
func DefaultTypeForValue(value interface{}, tp *FieldType) {
switch x := value.(type) {
case nil:
tp.Tp = mysql.TypeNull
tp.Flen = 0
tp.Decimal = 0
SetBinChsClnFlag(tp)
case bool:
tp.Tp = mysql.TypeLonglong
tp.Flen = 1
tp.Decimal = 0
tp.Flag |= mysql.IsBooleanFlag
SetBinChsClnFlag(tp)
case int:
tp.Tp = mysql.TypeLonglong
tp.Flen = len(strconv.FormatInt(int64(x), 10))
tp.Decimal = 0
SetBinChsClnFlag(tp)
case int64:
tp.Tp = mysql.TypeLonglong
tp.Flen = len(strconv.FormatInt(x, 10))
tp.Decimal = 0
SetBinChsClnFlag(tp)
case uint64:
tp.Tp = mysql.TypeLonglong
tp.Flag |= mysql.UnsignedFlag
tp.Flen = len(strconv.FormatUint(x, 10))
tp.Decimal = 0
SetBinChsClnFlag(tp)
case string:
tp.Tp = mysql.TypeVarString
// TODO: tp.Flen should be len(x) * 3 (max bytes length of CharsetUTF8)
tp.Flen = len(x)
tp.Decimal = UnspecifiedLength
tp.Charset = mysql.DefaultCharset
tp.Collate = mysql.DefaultCollationName
case float64:
tp.Tp = mysql.TypeDouble
s := strconv.FormatFloat(x, 'f', -1, 64)
tp.Flen = len(s)
tp.Decimal = UnspecifiedLength
SetBinChsClnFlag(tp)
case []byte:
tp.Tp = mysql.TypeBlob
tp.Flen = len(x)
tp.Decimal = UnspecifiedLength
SetBinChsClnFlag(tp)
case BitLiteral:
tp.Tp = mysql.TypeVarString
tp.Flen = len(x)
tp.Decimal = 0
SetBinChsClnFlag(tp)
case HexLiteral:
tp.Tp = mysql.TypeVarString
tp.Flen = len(x)
tp.Decimal = 0
tp.Flag |= mysql.UnsignedFlag
SetBinChsClnFlag(tp)
case BinaryLiteral:
tp.Tp = mysql.TypeBit
tp.Flen = len(x) * 8
tp.Decimal = 0
SetBinChsClnFlag(tp)
tp.Flag &= ^mysql.BinaryFlag
tp.Flag |= mysql.UnsignedFlag
case Time:
tp.Tp = x.Type
switch x.Type {
case mysql.TypeDate:
tp.Flen = mysql.MaxDateWidth
tp.Decimal = UnspecifiedLength
case mysql.TypeDatetime, mysql.TypeTimestamp:
tp.Flen = mysql.MaxDatetimeWidthNoFsp
if x.Fsp > DefaultFsp { // consider point('.') and the fractional part.
tp.Flen += x.Fsp + 1
}
tp.Decimal = x.Fsp
}
SetBinChsClnFlag(tp)
case Duration:
tp.Tp = mysql.TypeDuration
tp.Flen = len(x.String())
if x.Fsp > DefaultFsp { // consider point('.') and the fractional part.
tp.Flen = x.Fsp + 1
}
tp.Decimal = x.Fsp
SetBinChsClnFlag(tp)
case *MyDecimal:
tp.Tp = mysql.TypeNewDecimal
tp.Flen = len(x.ToString())
tp.Decimal = int(x.digitsFrac)
SetBinChsClnFlag(tp)
case Enum:
tp.Tp = mysql.TypeEnum
tp.Flen = len(x.Name)
tp.Decimal = UnspecifiedLength
SetBinChsClnFlag(tp)
case Set:
tp.Tp = mysql.TypeSet
tp.Flen = len(x.Name)
tp.Decimal = UnspecifiedLength
SetBinChsClnFlag(tp)
case json.JSON:
tp.Tp = mysql.TypeJSON
tp.Flen = UnspecifiedLength
tp.Decimal = 0
tp.Charset = charset.CharsetBin
tp.Collate = charset.CollationBin
default:
tp.Tp = mysql.TypeUnspecified
tp.Flen = UnspecifiedLength
tp.Decimal = UnspecifiedLength
}
}
// DefaultCharsetForType returns the default charset/collation for mysql type.
func DefaultCharsetForType(tp byte) (string, string) {
switch tp {
case mysql.TypeVarString, mysql.TypeString, mysql.TypeVarchar:
// Default charset for string types is utf8.
return mysql.DefaultCharset, mysql.DefaultCollationName
}
return charset.CharsetBin, charset.CollationBin
}
// MergeFieldType merges two MySQL type to a new type.
// This is used in hybrid field type expression.
// For example "select case c when 1 then 2 when 2 then 'tidb' from t;"
// The result field type of the case expression is the merged type of the two when clause.
// See https://github.com/mysql/mysql-server/blob/5.7/sql/field.cc#L1042
func MergeFieldType(a byte, b byte) byte {
ia := getFieldTypeIndex(a)
ib := getFieldTypeIndex(b)
return fieldTypeMergeRules[ia][ib]
}
func getFieldTypeIndex(tp byte) int {
itp := int(tp)
if itp < fieldTypeTearFrom {
return itp
}
return fieldTypeTearFrom + itp - fieldTypeTearTo - 1
}
const (
fieldTypeTearFrom = int(mysql.TypeBit) + 1
fieldTypeTearTo = int(mysql.TypeJSON) - 1
fieldTypeNum = fieldTypeTearFrom + (255 - fieldTypeTearTo)
)
var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{
/* mysql.TypeDecimal -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
//mysql.TypeShort mysql.TypeLong
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeDecimal, mysql.TypeDecimal,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeTiny -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeTiny,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeTiny, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeInt24,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeTiny,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeShort -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeShort,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeShort, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeInt24,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeShort,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeLong -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeLong,
//mysql.TypeShort mysql.TypeLong
mysql.TypeLong, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeLong, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeLong,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeLong,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeFloat -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeDouble, mysql.TypeFloat,
//mysql.TypeShort mysql.TypeLong
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeFloat, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeFloat, mysql.TypeFloat,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeFloat,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeDouble, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeDouble -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeShort mysql.TypeLong
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeDouble, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeDouble,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeDouble, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeNull -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeTiny,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeNull, mysql.TypeTimestamp,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeLonglong,
//mysql.TypeDate mysql.TypeTime
mysql.TypeNewDate, mysql.TypeDuration,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeDatetime, mysql.TypeYear,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeBit,
//mysql.TypeJSON
mysql.TypeJSON,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeEnum,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeSet, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeGeometry,
},
/* mysql.TypeTimestamp -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeTimestamp, mysql.TypeTimestamp,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeDatetime, mysql.TypeDatetime,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeDatetime, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeLonglong -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeLonglong,
//mysql.TypeShort mysql.TypeLong
mysql.TypeLonglong, mysql.TypeLonglong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeLonglong, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeLong,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeLonglong,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeInt24 -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeInt24,
//mysql.TypeShort mysql.TypeLong
mysql.TypeInt24, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeInt24, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeInt24,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeInt24,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeDate -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeNewDate, mysql.TypeDatetime,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeNewDate, mysql.TypeDatetime,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeDatetime, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeTime -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeDuration, mysql.TypeDatetime,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeDatetime, mysql.TypeDuration,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeDatetime, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeDatetime -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeDatetime, mysql.TypeDatetime,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeDatetime, mysql.TypeDatetime,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeDatetime, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeYear -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeDecimal, mysql.TypeTiny,
//mysql.TypeShort mysql.TypeLong
mysql.TypeShort, mysql.TypeLong,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeFloat, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeYear, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeLonglong, mysql.TypeInt24,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeYear,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeNewDecimal, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeNewDate -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeNewDate, mysql.TypeDatetime,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeNewDate, mysql.TypeDatetime,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeDatetime, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeNewDate, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeVarchar -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeVarchar, mysql.TypeVarchar,
},
/* mysql.TypeBit -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeBit, mysql.TypeVarchar,
//mysql.TypeLonglong mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate mysql.TypeTime
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime mysql.TypeYear
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeBit,
//mysql.TypeJSON
mysql.TypeVarchar,
//mysql.TypeNewDecimal mysql.TypeEnum
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeTinyBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeMediumBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeBlob, mysql.TypeVarchar,
//mysql.TypeString mysql.TypeGeometry
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeJSON -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeShort mysql.TypeLong
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNewFloat mysql.TypeDouble
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeJSON, mysql.TypeVarchar,
//mysql.TypeLongLONG mysql.TypeInt24
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDate MYSQL_TYPE_TIME
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeDatetime MYSQL_TYPE_YEAR
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeNewDate mysql.TypeVarchar
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeBit <16>-<244>
mysql.TypeVarchar,
//mysql.TypeJSON
mysql.TypeJSON,
//mysql.TypeNewDecimal MYSQL_TYPE_ENUM
mysql.TypeVarchar, mysql.TypeVarchar,
//mysql.TypeSet mysql.TypeTinyBlob
mysql.TypeVarchar, mysql.TypeLongBlob,
//mysql.TypeMediumBlob mysql.TypeLongBlob
mysql.TypeLongBlob, mysql.TypeLongBlob,
//mysql.TypeBlob mysql.TypeVarString
mysql.TypeLongBlob, mysql.TypeVarchar,
//mysql.TypeString MYSQL_TYPE_GEOMETRY
mysql.TypeString, mysql.TypeVarchar,
},
/* mysql.TypeNewDecimal -> */
{
//mysql.TypeDecimal mysql.TypeTiny
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
//mysql.TypeShort mysql.TypeLong
mysql.TypeNewDecimal, mysql.TypeNewDecimal,
//mysql.TypeFloat mysql.TypeDouble
mysql.TypeDouble, mysql.TypeDouble,
//mysql.TypeNull mysql.TypeTimestamp
mysql.TypeNewDecimal, mysql.TypeVarchar,