| 9021 | */ |
| 9022 | |
| 9023 | void add_join_on(THD *thd, TABLE_LIST *b, Item *expr) |
| 9024 | { |
| 9025 | if (expr) |
| 9026 | { |
| 9027 | expr= normalize_cond(thd, expr); |
| 9028 | if (!b->on_expr) |
| 9029 | b->on_expr= expr; |
| 9030 | else |
| 9031 | { |
| 9032 | /* |
| 9033 | If called from the parser, this happens if you have both a |
| 9034 | right and left join. If called later, it happens if we add more |
| 9035 | than one condition to the ON clause. |
| 9036 | */ |
| 9037 | b->on_expr= new (thd->mem_root) Item_cond_and(thd, b->on_expr,expr); |
| 9038 | } |
| 9039 | b->on_expr->top_level_item(); |
| 9040 | } |
| 9041 | } |
| 9042 | |
| 9043 | |
| 9044 | /** |
no test coverage detected