MCPcopy Create free account
hub / github.com/MariaDB/server / add_join_on

Function add_join_on

sql/sql_parse.cc:9023–9041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9021*/
9022
9023void 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/**

Callers 1

mark_common_columnsFunction · 0.85

Calls 2

normalize_condFunction · 0.85
top_level_itemMethod · 0.45

Tested by

no test coverage detected