mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
Process nodes using the scratch pool as default pool.
To make it work, change MAKE_parameter to allocate parameters in the message pool (statement pool).
This commit is contained in:
parent
d65cf5aac8
commit
55c88a21b5
@ -589,7 +589,10 @@ void DSQL_execute_immediate(thread_db* tdbb, Jrd::Attachment* attachment, jrd_tr
|
||||
void DsqlDmlRequest::dsqlPass(thread_db* tdbb, DsqlCompilerScratch* scratch,
|
||||
ntrace_result_t* traceResult)
|
||||
{
|
||||
{ // scope
|
||||
Jrd::ContextPoolHolder scratchContext(tdbb, &scratch->getPool());
|
||||
node = Node::doDsqlPass(scratch, node);
|
||||
}
|
||||
|
||||
if (scratch->clientDialect > SQL_DIALECT_V5)
|
||||
scratch->getStatement()->setBlrVersion(5);
|
||||
@ -1484,7 +1487,6 @@ static dsql_req* prepareStatement(thread_db* tdbb, dsql_dbb* database, jrd_tra*
|
||||
ntrace_result_t traceResult = ITracePlugin::RESULT_SUCCESS;
|
||||
try
|
||||
{
|
||||
///Jrd::ContextPoolHolder scratchContext(tdbb, scratchPool); // scope
|
||||
request->dsqlPass(tdbb, scratch, &traceResult);
|
||||
}
|
||||
catch (const Exception&)
|
||||
|
@ -412,7 +412,7 @@ dsql_par* MAKE_parameter(dsql_msg* message, bool sqlda_flag, bool null_flag,
|
||||
|
||||
thread_db* tdbb = JRD_get_thread_data();
|
||||
|
||||
dsql_par* parameter = FB_NEW_POOL(*tdbb->getDefaultPool()) dsql_par(*tdbb->getDefaultPool());
|
||||
dsql_par* parameter = FB_NEW_POOL(message->getPool()) dsql_par(message->getPool());
|
||||
parameter->par_message = message;
|
||||
message->msg_parameters.insert(0, parameter);
|
||||
parameter->par_parameter = message->msg_parameter++;
|
||||
|
Loading…
Reference in New Issue
Block a user