diff --git a/src/DataTypes/convertMySQLDataType.cpp b/src/DataTypes/convertMySQLDataType.cpp index 7e2f2e7c6b9..64633c6fd7b 100644 --- a/src/DataTypes/convertMySQLDataType.cpp +++ b/src/DataTypes/convertMySQLDataType.cpp @@ -83,7 +83,11 @@ DataTypePtr convertMySQLDataType(MultiEnum type_support, res = std::make_shared(); } else if (type_name == "binary") + { + //compatible with binary(0) DataType + if (length == 0) length = 1; res = std::make_shared(length); + } else if (type_name == "datetime" || type_name == "timestamp") { if (!type_support.isSet(MySQLDataTypesSupport::DATETIME64))