mysql采用的utf8编码的,发现表中有varchar字段经常出错,报类似下面的错误:
[FireDAC][DatS]-32. Variable length column [MOBILE] overflow. Value length - [11], column maximum length - [5]
通过调试发现firedac中源码地方有错,需要修改FireDAC.Phys.MySQL.pas 这个文件的InternalColInfoGet这个函数,找到源文件的898行:
if ((srcname = nil) or (srcname^ = TFDAnsiChar(#0))) and
(type_ = FIELD_TYPE_VAR_STRING) and (flags and BINARY_FLAG <> 0) then