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

Method get_trigger_info

sql/sql_trigger.cc:2160–2186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2158*/
2159
2160void Trigger::get_trigger_info(LEX_CSTRING *trigger_stmt,
2161 LEX_CSTRING *trigger_body,
2162 LEX_STRING *definer)
2163{
2164 DBUG_ENTER("get_trigger_info");
2165
2166 *trigger_stmt= definition;
2167 if (!body)
2168 {
2169 /* Parse error */
2170 *trigger_body= definition;
2171 *definer= empty_lex_str;
2172 DBUG_VOID_RETURN;
2173 }
2174 *trigger_body= body->m_body_utf8;
2175
2176 if (body->suid() == SP_IS_NOT_SUID)
2177 {
2178 *definer= empty_lex_str;
2179 }
2180 else
2181 {
2182 definer->length= strxmov(definer->str, body->m_definer.user.str, "@",
2183 body->m_definer.host.str, NullS) - definer->str;
2184 }
2185 DBUG_VOID_RETURN;
2186}
2187
2188
2189/**

Callers 3

store_triggerFunction · 0.80
show_create_trigger_implFunction · 0.80

Calls 2

strxmovFunction · 0.85
suidMethod · 0.80

Tested by

no test coverage detected