| 1855 | */ |
| 1856 | |
| 1857 | void add_join_on(TABLE_LIST *b, Item *expr) |
| 1858 | { |
| 1859 | if (expr) |
| 1860 | { |
| 1861 | if (!b->join_cond()) |
| 1862 | b->set_join_cond(expr); |
| 1863 | else |
| 1864 | { |
| 1865 | /* |
| 1866 | If called from the parser, this happens if you have both a |
| 1867 | right and left join. If called later, it happens if we add more |
| 1868 | than one condition to the ON clause. |
| 1869 | */ |
| 1870 | b->set_join_cond(new Item_cond_and(b->join_cond(), expr)); |
| 1871 | } |
| 1872 | b->join_cond()->top_level_item(); |
| 1873 | } |
| 1874 | } |
| 1875 | |
| 1876 | |
| 1877 | /** |
nothing calls this directly
no test coverage detected