| 2295 | |
| 2296 | |
| 2297 | static void print_table_array(THD *thd, String *str, TABLE_LIST **table, |
| 2298 | TABLE_LIST **end, enum_query_type query_type) |
| 2299 | { |
| 2300 | (*table)->print(thd, str, query_type); |
| 2301 | |
| 2302 | for (TABLE_LIST **tbl= table + 1; tbl < end; tbl++) |
| 2303 | { |
| 2304 | TABLE_LIST *curr= *tbl; |
| 2305 | // Print the join operator which relates this table to the previous one |
| 2306 | if (curr->outer_join) |
| 2307 | { |
| 2308 | /* MySQL converts right to left joins */ |
| 2309 | str->append(STRING_WITH_LEN(" left join ")); |
| 2310 | } |
| 2311 | else if (curr->straight) |
| 2312 | str->append(STRING_WITH_LEN(" straight_join ")); |
| 2313 | else if (curr->sj_on_expr) |
| 2314 | str->append(STRING_WITH_LEN(" semi join ")); |
| 2315 | else |
| 2316 | str->append(STRING_WITH_LEN(" join ")); |
| 2317 | curr->print(thd, str, query_type); // Print table |
| 2318 | if (curr->join_cond()) // Print join condition |
| 2319 | { |
| 2320 | str->append(STRING_WITH_LEN(" on(")); |
| 2321 | curr->join_cond()->print(str, query_type); |
| 2322 | str->append(')'); |
| 2323 | } |
| 2324 | } |
| 2325 | } |
| 2326 | |
| 2327 | |
| 2328 | /** |
no test coverage detected