append a user or role name to a buffer that will be later used as an error message */
| 7731 | append a user or role name to a buffer that will be later used as an error message |
| 7732 | */ |
| 7733 | static 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 | |
| 7749 | static void append_user(THD *thd, String *str, LEX_USER *user) |
| 7750 | { |
no test coverage detected