mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #54649 from bakwc/materializedmysql_null_segfault
Fixed crash in MaterializedMySQL while using override + null field
This commit is contained in:
commit
329f9b5d8e
@ -716,6 +716,16 @@ static void writeFieldsToColumn(
|
||||
|
||||
null_map_column->insertValue(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Column is not null but field is null. It's possible due to overrides
|
||||
if (field.isNull())
|
||||
{
|
||||
column_to.insertDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
};
|
||||
@ -791,7 +801,7 @@ static void writeFieldsToColumn(
|
||||
|
||||
if (write_data_to_null_map(value, index))
|
||||
{
|
||||
const String & data = value.get<const String &>();
|
||||
const String & data = value.safeGet<const String &>();
|
||||
casted_string_column->insertData(data.data(), data.size());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user