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

Function reset_nj_counters

sql/sql_select.cc:20274–20299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20272*/
20273
20274static uint reset_nj_counters(JOIN *join, List<TABLE_LIST> *join_list)
20275{
20276 List_iterator<TABLE_LIST> li(*join_list);
20277 TABLE_LIST *table;
20278 DBUG_ENTER("reset_nj_counters");
20279 uint n=0;
20280 while ((table= li++))
20281 {
20282 NESTED_JOIN *nested_join;
20283 bool is_eliminated_nest= FALSE;
20284 if ((nested_join= table->nested_join))
20285 {
20286 nested_join->counter= 0;
20287 nested_join->n_tables= reset_nj_counters(join, &nested_join->join_list);
20288 if (!nested_join->n_tables)
20289 is_eliminated_nest= TRUE;
20290 }
20291 const table_map removed_tables= join->eliminated_tables |
20292 join->const_table_map;
20293
20294 if ((table->nested_join && !is_eliminated_nest) ||
20295 (!table->nested_join && (table->table->map & ~removed_tables)))
20296 n++;
20297 }
20298 DBUG_RETURN(n);
20299}
20300
20301
20302/**

Callers 2

optimize_stage2Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected