Merge pull request #60083 from Avogar/max-query-size-ddl-entry

Use max_query_size from context in DDLLogEntry instead of hardcoded 4096
This commit is contained in:
Alexey Milovidov 2024-02-17 01:49:08 +01:00 committed by GitHub
commit 87134acdf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -148,9 +148,8 @@ void DDLLogEntry::parse(const String & data)
String settings_str;
rb >> "settings: " >> settings_str >> "\n";
ParserSetQuery parser{true};
constexpr UInt64 max_size = 4096;
constexpr UInt64 max_depth = 16;
ASTPtr settings_ast = parseQuery(parser, settings_str, max_size, max_depth);
ASTPtr settings_ast = parseQuery(parser, settings_str, Context::getGlobalContextInstance()->getSettingsRef().max_query_size, max_depth);
settings.emplace(std::move(settings_ast->as<ASTSetQuery>()->changes));
}
}