Rename mxs_mysql_account_to_pcre

The function is not capable of doing the right thing for an entire
account string, but only separately for user and host names, so the
function name should reflect that.
This commit is contained in:
Johan Wikman
2016-12-29 11:47:08 +02:00
parent 997bec868f
commit 18008dec6d
3 changed files with 27 additions and 20 deletions

View File

@ -603,16 +603,16 @@ static CACHE_RULE *cache_rule_create_simple_user(cache_rule_attribute_t attribut
}
else
{
mxs_mysql_account_to_pcre(pcre_user, user, MXS_PCRE_QUOTE_VERBATIM);
mxs_mysql_name_to_pcre(pcre_user, user, MXS_PCRE_QUOTE_VERBATIM);
}
if (mxs_mysql_trim_quotes(host))
{
char pcre_host[2 * len + 1]; // Surely enough
mxs_mysql_account_kind_t rv = mxs_mysql_account_to_pcre(pcre_host, host, MXS_PCRE_QUOTE_QUERY);
mxs_mysql_name_kind_t rv = mxs_mysql_name_to_pcre(pcre_host, host, MXS_PCRE_QUOTE_WILDCARD);
if (rv == MXS_MYSQL_ACCOUNT_WITH_WILDCARD)
if (rv == MXS_MYSQL_NAME_WITH_WILDCARD)
{
op = (op == CACHE_OP_EQ ? CACHE_OP_LIKE : CACHE_OP_UNLIKE);