mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 04:43:03 +01:00
Misc.
This commit is contained in:
parent
974afe28a1
commit
df53be29bf
@ -3228,7 +3228,6 @@ void OptimizerInnerJoin::findBestOrder(int position, InnerJoinStreamInfo* stream
|
||||
new_cardinality = position_cardinality * cardinality;
|
||||
}
|
||||
|
||||
optimizer->opt_combinations++;
|
||||
// If the partial order is either longer than any previous partial order,
|
||||
// or the same length and cheap, save order as "best".
|
||||
if (position > optimizer->opt_best_count ||
|
||||
|
@ -413,9 +413,9 @@ RecordSource* OPT_compile(thread_db* tdbb,
|
||||
// memory will then be in csb->csb_rpt[stream].csb_idx_allocation, which
|
||||
// gets cleaned up before this function exits.
|
||||
|
||||
OptimizerBlk* opt = FB_NEW(*tdbb->getDefaultPool()) OptimizerBlk(tdbb->getDefaultPool());
|
||||
AutoPtr<OptimizerBlk> opt(FB_NEW(*tdbb->getDefaultPool()) OptimizerBlk(tdbb->getDefaultPool()));
|
||||
opt->opt_streams.grow(csb->csb_n_stream);
|
||||
RecordSource* rsb = 0;
|
||||
RecordSource* rsb = NULL;
|
||||
|
||||
try {
|
||||
|
||||
@ -988,9 +988,6 @@ RecordSource* OPT_compile(thread_db* tdbb,
|
||||
csb->csb_rpt[stream].csb_indices = 0;
|
||||
}
|
||||
|
||||
// free up memory for optimizer structures
|
||||
delete opt;
|
||||
|
||||
#ifdef OPT_DEBUG
|
||||
if (opt_debug_file)
|
||||
{
|
||||
@ -1007,10 +1004,9 @@ RecordSource* OPT_compile(thread_db* tdbb,
|
||||
{
|
||||
const USHORT stream = streams[i];
|
||||
delete csb->csb_rpt[stream].csb_idx;
|
||||
csb->csb_rpt[stream].csb_idx = 0;
|
||||
csb->csb_rpt[stream].csb_idx = NULL;
|
||||
csb->csb_rpt[stream].csb_indices = 0; // Probably needed to be safe
|
||||
}
|
||||
delete opt;
|
||||
throw;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,6 @@ class OptimizerBlk : public pool_alloc<type_opt>
|
||||
{
|
||||
public:
|
||||
CompilerScratch* opt_csb; // compiler scratch block
|
||||
SLONG opt_combinations; // number of partial orders considered
|
||||
double opt_best_cost; // cost of best join order
|
||||
USHORT opt_best_count; // longest length of indexable streams
|
||||
USHORT opt_base_conjuncts; // number of conjuncts in our rse, next conjuncts are distributed parent
|
||||
|
Loading…
Reference in New Issue
Block a user