MCPcopy Create free account
hub / github.com/MariaDB/server / count_cond_for_nj

Function count_cond_for_nj

sql/sql_select.cc:7667–7691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7665
7666
7667void count_cond_for_nj(SELECT_LEX *sel, TABLE_LIST *nested_join_table)
7668{
7669 List_iterator<TABLE_LIST> li(nested_join_table->nested_join->join_list);
7670 List_iterator<TABLE_LIST> li2(nested_join_table->nested_join->join_list);
7671 bool have_another = FALSE;
7672 TABLE_LIST *table;
7673
7674 while ((table= li++) || (have_another && (li=li2, have_another=FALSE,
7675 (table= li++))))
7676 if (table->nested_join)
7677 {
7678 if (!table->on_expr)
7679 {
7680 /* It's a semi-join nest. Walk into it as if it wasn't a nest */
7681 have_another= TRUE;
7682 li2= li;
7683 li= List_iterator<TABLE_LIST>(table->nested_join->join_list);
7684 }
7685 else
7686 count_cond_for_nj(sel, table);
7687 }
7688 if (nested_join_table->on_expr)
7689 nested_join_table->on_expr->walk(&Item::count_sargable_conds, sel, 0);
7690
7691}
7692
7693/**
7694 Update keyuse array with all possible keys we can use to fetch rows.

Callers 1

update_ref_and_keysFunction · 0.85

Calls 1

walkMethod · 0.45

Tested by

no test coverage detected