MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / add_join_on

Function add_join_on

sql/sql_parse.cc:1857–1874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1855*/
1856
1857void 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/**

Callers

nothing calls this directly

Calls 3

join_condMethod · 0.80
set_join_condMethod · 0.80
top_level_itemMethod · 0.45

Tested by

no test coverage detected