MySQL Forums
Forum List  »  Optimizer & Parser

Source code question related to sql_optimizer.cc line 8583
Posted by: Petru-Florin Mihancea
Date: November 28, 2017 04:20AM

Hi,

Can someone answer me a question at the source code level :)?

In file sql_optimizer.cc / method JOIN::attach_join_conditions(plan_idx last_tab) line 8583 (latest version b9636305dcdba3f83746bd13f0fa791e64150550 at the time of my question) we have the following code:

/*
Split the non-constant part of the join condition into parts that
can be attached to the inner tables of the outer join.
*/
for (plan_idx i= first_inner; i <= last_tab; ++i)
{

....

//Line 8583
// Add the guard turning the predicate off for the null-complemented row.
cond= new Item_func_trig_cond(cond, NULL, this, first_inner,
Item_func_trig_cond::IS_NOT_NULL_COMPL);

....
}

I am not sure, but is it correct to use the value of first_inner in that line, or it should have been used i (index of inner table as in line 8591)?

I am not familiar to this code and I cannot precisely decide if it is a problem or not :).

Thanks,
Petru Mihancea

Options: ReplyQuote


Subject
Views
Written By
Posted
Source code question related to sql_optimizer.cc line 8583
289
November 28, 2017 04:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.