From 525b2b45117b0ddbbdf213fe816d6fbcb4c262ac Mon Sep 17 00:00:00 2001 From: zzsmdfj Date: Mon, 16 May 2022 11:36:39 +0800 Subject: [PATCH] to compatible with binary(0) --- src/DataTypes/convertMySQLDataType.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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))