*: Change TypeVarchar to TypeVarString

This commit is contained in:
shenli
2016-01-15 11:49:03 +08:00
parent 70bfab8b30
commit fda1fefa26

View File

@ -278,5 +278,11 @@ func convertColumnInfo(fld *field.ResultField) (ci *ColumnInfo) {
ci.Decimal = uint8(fld.Decimal)
}
ci.Type = uint8(fld.Tp)
// Keep things compatible for old clients.
// Refer to mysql-server/sql/protocol.cc send_result_set_metadata()
if ci.Type == mysql.TypeVarchar {
ci.Type = mysql.TypeVarString
}
return
}