mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
Trim newlines
This commit is contained in:
parent
1ffae83809
commit
9a30ae7c37
@ -6209,7 +6209,15 @@ void Settings::dumpToSystemSettingsColumns(MutableColumnsAndConstraints & params
|
||||
{
|
||||
res_columns[1]->insert(setting.getValueString());
|
||||
res_columns[2]->insert(setting.isValueChanged());
|
||||
res_columns[3]->insert(setting.getDescription());
|
||||
|
||||
/// Trim starting/ending newline.
|
||||
std::string_view doc = setting.getDescription();
|
||||
if (doc.length() > 0 && doc[0] == '\n')
|
||||
doc = doc.substr(1);
|
||||
if (doc.length() > 0 && doc[doc.length() - 1] == '\n')
|
||||
doc = doc.substr(0, doc.length() - 1);
|
||||
|
||||
res_columns[3]->insert(doc);
|
||||
|
||||
Field min, max;
|
||||
SettingConstraintWritability writability = SettingConstraintWritability::WRITABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user