Skip to content

Initial commit to fix IParser::Pos.max_depth issue#8647

Merged
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
qMBQx8GH:fix_max_depth
Jan 14, 2020
Merged

Initial commit to fix IParser::Pos.max_depth issue#8647
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
qMBQx8GH:fix_max_depth

Conversation

@qMBQx8GH
Copy link
Copy Markdown
Contributor

@qMBQx8GH qMBQx8GH commented Jan 14, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • New Feature

Changelog entry (up to few sentences, required except for Non-significant/Documentation categories):

New setting introduced: max_parser_depth. To control maximum stack size and allow long complex queries. This fixes #6681 and #7668.


size_t total_dictionaries = 0;
iterateMetadataFiles(context, [&file_names, &total_dictionaries, this](const String & file_name)
iterateMetadataFiles(context, [context, &file_names, &total_dictionaries, this](const String & file_name)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe &context to avoid copy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. I've never used C++ lambda functions.

Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. And we also need a test (simple .sql test is enough, see dbms/tests/queries) to check that the setting works.

@qMBQx8GH
Copy link
Copy Markdown
Contributor Author

Ok. And we also need a test (simple .sql test is enough, see dbms/tests/queries) to check that the setting works.

done

Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@alexey-milovidov alexey-milovidov merged commit b6f41e4 into ClickHouse:master Jan 14, 2020
@qMBQx8GH qMBQx8GH deleted the fix_max_depth branch January 16, 2020 06:30
@alesapin alesapin added the pr-feature Pull request with new product feature label Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardcoded IParser.h max_depth = 1000 should be configurable.

3 participants