to compatible with binary(0)

This commit is contained in:
zzsmdfj 2022-05-16 11:36:39 +08:00
parent 20281c25b3
commit 525b2b4511

View File

@ -83,7 +83,11 @@ DataTypePtr convertMySQLDataType(MultiEnum<MySQLDataTypesSupport> type_support,
res = std::make_shared<DataTypeDate>();
}
else if (type_name == "binary")
{
//compatible with binary(0) DataType
if (length == 0) length = 1;
res = std::make_shared<DataTypeFixedString>(length);
}
else if (type_name == "datetime" || type_name == "timestamp")
{
if (!type_support.isSet(MySQLDataTypesSupport::DATETIME64))