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

Function append_user

sql/sql_acl.cc:7733–7747  ·  view source on GitHub ↗

append a user or role name to a buffer that will be later used as an error message */

Source from the content-addressed store, hash-verified

7731 append a user or role name to a buffer that will be later used as an error message
7732*/
7733static void append_user(THD *thd, String *str,
7734 const LEX_CSTRING *u, const LEX_CSTRING *h)
7735{
7736 if (str->length())
7737 str->append(',');
7738 append_query_string(system_charset_info, str, u->str, u->length,
7739 thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES);
7740 /* hostname part is not relevant for roles, it is always empty */
7741 if (u->length == 0 || h->length != 0)
7742 {
7743 str->append('@');
7744 append_query_string(system_charset_info, str, h->str, h->length,
7745 thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES);
7746 }
7747}
7748
7749static void append_user(THD *thd, String *str, LEX_USER *user)
7750{

Callers 5

mysql_grant_roleFunction · 0.85
mysql_create_userFunction · 0.85
mysql_drop_userFunction · 0.85
mysql_rename_userFunction · 0.85
mysql_alter_userFunction · 0.85

Calls 3

append_query_stringFunction · 0.85
lengthMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected