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

Method print_assignment

sql/item_func.cc:1573–1580  ·  view source on GitHub ↗

just the assignment, for use in "SET @a:=5" type self-prints

Source from the content-addressed store, hash-verified

1571
1572// just the assignment, for use in "SET @a:=5" type self-prints
1573void Item_func_set_user_var::print_assignment(String *str,
1574 enum_query_type query_type)
1575{
1576 str->append(STRING_WITH_LEN("@"));
1577 str->append(name);
1578 str->append(STRING_WITH_LEN(":="));
1579 args[0]->print(str, query_type);
1580}
1581
1582// parenthesize assignment for use in "EXPLAIN EXTENDED SELECT (@e:=80)+5"
1583void Item_func_set_user_var::print(String *str, enum_query_type query_type)

Callers 1

printMethod · 0.80

Calls 2

appendMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected