mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:43:04 +01:00
Improvement CORE-2697 - Support the "? in SELECT some_col FROM some_table" subqueries
This commit is contained in:
parent
a0a51d4363
commit
fb1e53fb67
@ -1411,6 +1411,14 @@ void MAKE_desc(CompiledStatement* statement, dsc* desc, dsql_nod* node, dsql_nod
|
||||
MAKE_desc(statement, desc, node->nod_arg[e_hidden_var_expr], null_replacement);
|
||||
return;
|
||||
|
||||
case nod_select_expr: // this should come from pass1_any call to set_parameter_type
|
||||
node = node->nod_arg[e_sel_query_spec];
|
||||
fb_assert(node->nod_type == nod_query_spec);
|
||||
node = node->nod_arg[e_qry_list];
|
||||
fb_assert(node->nod_type == nod_list && node->nod_count > 0);
|
||||
MAKE_desc(statement, desc, node->nod_arg[0], null_replacement);
|
||||
return;
|
||||
|
||||
default:
|
||||
fb_assert(false); // unexpected dsql_nod type
|
||||
|
||||
|
@ -3469,6 +3469,8 @@ static dsql_nod* pass1_any( CompiledStatement* statement, dsql_nod* input, NOD_T
|
||||
DEV_BLKCHK(statement, dsql_type_req);
|
||||
DEV_BLKCHK(input, dsql_type_nod);
|
||||
|
||||
set_parameter_type(statement, input->nod_arg[0], input->nod_arg[1], false);
|
||||
|
||||
// create a derived table representing our subquery
|
||||
dsql_nod* dt = MAKE_node(nod_derived_table, e_derived_table_count);
|
||||
// Ignore validation for columnames that must exist for "user" derived tables.
|
||||
|
Loading…
Reference in New Issue
Block a user