Skip to content

Commit

Permalink
Fixed CORE-1156 - Prepare fails when having a parameter in a DSQL sta…
Browse files Browse the repository at this point in the history
…tement before a sub query
  • Loading branch information
asfernandes committed Mar 6, 2007
1 parent 920793e commit 6fef59a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/dsql/pass1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
*
* 2004.01.16 Vlad Horsun: added support for default parameters and
* EXECUTE BLOCK statement
*
* Adriano dos Santos Fernandes
*
*/

#include "firebird.h"
Expand Down Expand Up @@ -912,11 +915,16 @@ dsql_nod* PASS1_node(dsql_req* request, dsql_nod* input, bool proc_flag)
temp->nod_arg[e_via_value_1] =
rse->nod_arg[e_rse_items]->nod_arg[0];
temp->nod_arg[e_via_value_2] = MAKE_node(nod_null, (int) 0);

// Try to force sub1 to be same type as sub2 eg: ? = (select ...) case
sub1 = node->nod_arg[0];
sub2 = node->nod_arg[1];
set_parameter_type(request, sub1, sub2, false);

// Finish off by cleaning up contexts
request->req_context->clear(base);

request->req_context->clear(base);
return node;
return node;
}
else {
switch (input->nod_type)
Expand Down

0 comments on commit 6fef59a

Please sign in to comment.