mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix nullptr dereference in defaultValueOfTypeName
This commit is contained in:
parent
74d4fa3993
commit
01567d62a4
@ -40,9 +40,8 @@ public:
|
||||
{
|
||||
const ColumnConst * col_type_const = typeid_cast<const ColumnConst *>(arguments.front().column.get());
|
||||
if (!col_type_const || !isString(arguments.front().type))
|
||||
throw Exception("The argument of function " + getName() + " must be a constant string describing type. "
|
||||
"Instead there is a column with the following structure: " + arguments.front().column->dumpStructure(),
|
||||
ErrorCodes::ILLEGAL_COLUMN);
|
||||
throw Exception("The argument of function " + getName() + " must be a constant string describing type.",
|
||||
ErrorCodes::ILLEGAL_COLUMN);
|
||||
|
||||
return DataTypeFactory::instance().get(col_type_const->getValue<String>());
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
SELECT defaultValueOfTypeName(FQDN()); -- { serverError 44 }
|
Loading…
Reference in New Issue
Block a user