8
0
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:
asfernandes 2009-10-30 14:47:25 +00:00
parent a0a51d4363
commit fb1e53fb67
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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.