| 13097 | |
| 13098 | |
| 13099 | JOIN_TAB *first_linear_tab(JOIN *join, |
| 13100 | enum enum_with_bush_roots include_bush_roots, |
| 13101 | enum enum_with_const_tables const_tbls) |
| 13102 | { |
| 13103 | JOIN_TAB *first= join->join_tab; |
| 13104 | |
| 13105 | if (!first) |
| 13106 | return NULL; |
| 13107 | |
| 13108 | if (const_tbls == WITHOUT_CONST_TABLES) |
| 13109 | first+= join->const_tables; |
| 13110 | |
| 13111 | if (first >= join->join_tab + join->top_join_tab_count) |
| 13112 | return NULL; /* All are const tables */ |
| 13113 | |
| 13114 | if (first->bush_children && include_bush_roots == WITHOUT_BUSH_ROOTS) |
| 13115 | { |
| 13116 | /* This JOIN_TAB is a SJM nest; Start from first table in nest */ |
| 13117 | return first->bush_children->start; |
| 13118 | } |
| 13119 | |
| 13120 | return first; |
| 13121 | } |
| 13122 | |
| 13123 | |
| 13124 | /* |
no outgoing calls
no test coverage detected