@@ -211,37 +211,35 @@ func (t *Table) parse() error {
211
211
}
212
212
213
213
func makeScanRecipients (f * Field , allowNull * string , cols []string ) []interface {} {
214
- fields := []interface {}{
215
- & f .TableCatalog ,
216
- & f .TableSchema ,
217
- & f .TableName ,
218
- & f .ColumnName ,
219
- & f .OrdinalPosition ,
220
- & f .ColumnDefault ,
221
- & allowNull ,
222
- & f .DataType ,
223
- & f .CharacterMaximumLength ,
224
- & f .CharacterOctetLength ,
225
- & f .NumericPrecision ,
226
- & f .NumericScale ,
227
- & f .DatetimePrecision ,
228
- & f .CharacterSetName ,
229
- & f .CollationName ,
230
- & f .ColumnType ,
231
- & f .ColumnKey ,
232
- & f .Extra ,
233
- & f .Privileges ,
234
- & f .ColumnComment ,
235
- }
236
-
237
- if len (cols ) > 20 && cols [20 ] == "GENERATION_EXPRESSION" { // MySQL 5.7+ "GENERATION_EXPRESSION" field
238
- fields = append (fields , & f .GenerationExpression )
239
- }
240
- if len (cols ) > 21 && cols [21 ] == "SRS_ID" { // MySQL 8.0+ "SRS ID" field
241
- fields = append (fields , & f .SrsID )
242
- }
243
-
244
- return fields
214
+ fields := []interface {}{
215
+ & f .TableCatalog ,
216
+ & f .TableSchema ,
217
+ & f .TableName ,
218
+ & f .ColumnName ,
219
+ & f .OrdinalPosition ,
220
+ & f .ColumnDefault ,
221
+ & allowNull ,
222
+ & f .DataType ,
223
+ & f .CharacterMaximumLength ,
224
+ & f .CharacterOctetLength ,
225
+ & f .NumericPrecision ,
226
+ & f .NumericScale ,
227
+ }
228
+
229
+ if len (cols ) > 19 { // MySQL 5.5 does not have "DATETIME_PRECISION" field
230
+ fields = append (fields , & f .DatetimePrecision )
231
+ }
232
+
233
+ fields = append (fields , & f .CharacterSetName , & f .CollationName , & f .ColumnType , & f .ColumnKey , & f .Extra , & f .Privileges , & f .ColumnComment )
234
+
235
+ if len (cols ) > 20 && cols [20 ] == "GENERATION_EXPRESSION" { // MySQL 5.7+ "GENERATION_EXPRESSION" field
236
+ fields = append (fields , & f .GenerationExpression )
237
+ }
238
+ if len (cols ) > 21 && cols [21 ] == "SRS_ID" { // MySQL 8.0+ "SRS ID" field
239
+ fields = append (fields , & f .SrsID )
240
+ }
241
+
242
+ return fields
245
243
}
246
244
247
245
// FieldNames returns an string array with the table's field names
0 commit comments