Commit 7baa40df authored by Daniel Black's avatar Daniel Black Committed by GitHub

MDEV-21976: mtr main.udf - broaden localhost (#1543)

Localhost, depending on the platform can return any
127.0.0.1/8 address.
parent 3df29727
......@@ -30,9 +30,9 @@ lookup("127.0.0.1")
127.0.0.1
select lookup(127,0,0,1);
ERROR HY000: Can't initialize function 'lookup'; Wrong arguments to lookup; Use the source
select lookup("localhost");
lookup("localhost")
127.0.0.1
select lookup("localhost") rlike '^127\.\\d+\.\\d+.\\d+$';
lookup("localhost") rlike '^127\.\\d+\.\\d+.\\d+$'
1
select reverse_lookup();
ERROR HY000: Can't initialize function 'reverse_lookup'; Wrong number of arguments to reverse_lookup; Use the source
select reverse_lookup("127.0.0.1");
......
......@@ -47,7 +47,7 @@ select lookup();
select lookup("127.0.0.1");
--error ER_CANT_INITIALIZE_UDF
select lookup(127,0,0,1);
select lookup("localhost");
select lookup("localhost") rlike '^127\.\\d+\.\\d+.\\d+$';
--error ER_CANT_INITIALIZE_UDF
select reverse_lookup();
......
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