Commit 3d7a384d authored by jimw@mysql.com's avatar jimw@mysql.com

Allow hostnames that are IP addresses with a netmask even when

running with --skip-name-resolve. (Bug #8471)
parent dd62343b
GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
Grants for mysqltest_1@127.0.0.1/255.255.255.255
GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255'
GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255'
REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255';
DROP USER mysqltest_1@'127.0.0.1/255.255.255.255';
# Bug #8471: IP address with mask fail when skip-name-resolve is on
GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255';
DROP USER mysqltest_1@'127.0.0.1/255.255.255.255';
...@@ -1339,7 +1339,7 @@ bool hostname_requires_resolving(const char *hostname) ...@@ -1339,7 +1339,7 @@ bool hostname_requires_resolving(const char *hostname)
return FALSE; return FALSE;
for (; (cur=*hostname); hostname++) for (; (cur=*hostname); hostname++)
{ {
if ((cur != '%') && (cur != '_') && (cur != '.') && if ((cur != '%') && (cur != '_') && (cur != '.') && (cur != '/') &&
((cur < '0') || (cur > '9'))) ((cur < '0') || (cur > '9')))
return TRUE; return TRUE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment