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

Method parse

sql/sql_class.cc:8987–9009  ·  view source on GitHub ↗

Set from a string in 'user@host' format. This method resembles parse_user(), but does not need temporary buffers. */

Source from the content-addressed store, hash-verified

8985 but does not need temporary buffers.
8986*/
8987void AUTHID::parse(const char *str, size_t length)
8988{
8989 const char *p= strrchr(str, '@');
8990 if (!p)
8991 {
8992 user.str= str;
8993 user.length= length;
8994 host= null_clex_str;
8995 }
8996 else
8997 {
8998 user.str= str;
8999 user.length= (size_t) (p - str);
9000 host.str= p + 1;
9001 host.length= (size_t) (length - user.length - 1);
9002 if (user.length && !host.length)
9003 host= host_not_specified; // 'user@' -> 'user@%'
9004 }
9005 if (user.length > USERNAME_LENGTH)
9006 user.length= USERNAME_LENGTH;
9007 if (host.length > HOSTNAME_LENGTH)
9008 host.length= HOSTNAME_LENGTH;
9009}
9010
9011
9012bool Database_qualified_name::copy_sp_name_internal(MEM_ROOT *mem_root,

Callers 6

set_definerMethod · 0.45
check_n_loadMethod · 0.45
mariadb_view_version_getFunction · 0.45
mysql_make_viewFunction · 0.45
mysql_rename_viewFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected