mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
dbms: fixed error with max_subquery_depth and GLOBAL subqueries [#METR-19569].
This commit is contained in:
parent
f1f3619df4
commit
ce70e528e0
@ -333,7 +333,7 @@ void ExpressionAnalyzer::addExternalStorage(ASTPtr & subquery_or_table_name)
|
||||
external_table_name = "_data" + toString(external_table_id);
|
||||
}
|
||||
|
||||
SharedPtr<InterpreterSelectQuery> interpreter = interpretSubquery(subquery_or_table_name, context, subquery_depth + 1, {});
|
||||
SharedPtr<InterpreterSelectQuery> interpreter = interpretSubquery(subquery_or_table_name, context, subquery_depth, {});
|
||||
|
||||
Block sample = interpreter->getSampleBlock();
|
||||
NamesAndTypesListPtr columns = new NamesAndTypesList(sample.getColumnsList());
|
||||
|
@ -0,0 +1,3 @@
|
||||
1
|
||||
1
|
||||
2
|
@ -0,0 +1,4 @@
|
||||
SET max_subquery_depth = 3;
|
||||
|
||||
SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{1,2}', system.one) WHERE 1 GLOBAL IN (SELECT 1 FROM remote('127.0.0.{1,2}', system.one))));
|
||||
SELECT 2 FROM system.one WHERE 1 IN (SELECT 1 FROM system.one WHERE 1 IN (SELECT 1 FROM system.one WHERE 1 IN (SELECT 1 FROM system.one)));
|
Loading…
Reference in New Issue
Block a user