| 3846 | |
| 3847 | #define MAX_USER_HOST_SIZE 512 |
| 3848 | static inline uint make_user_name(THD *thd, char *buf) |
| 3849 | { |
| 3850 | Security_context *sctx= thd->security_ctx; |
| 3851 | return strxnmov(buf, MAX_USER_HOST_SIZE, |
| 3852 | sctx->priv_user[0] ? sctx->priv_user : "", "[", |
| 3853 | sctx->user ? sctx->user : "", "] @ ", |
| 3854 | sctx->get_host()->length() ? sctx->get_host()->ptr() : |
| 3855 | "", " [", sctx->get_ip()->length() ? sctx->get_ip()->ptr() : |
| 3856 | "", "]", NullS) - buf; |
| 3857 | } |
| 3858 | |
| 3859 | |
| 3860 | extern pthread_attr_t *get_connection_attrib(void); |