Skip to content

Commit

Permalink
MDEV-21976: mtr main.udf - broaden localhost (#1543)
Browse files Browse the repository at this point in the history
Localhost, depending on the platform can return any
127.0.0.1/8 address.
  • Loading branch information
grooverdan committed May 18, 2020
1 parent 3df2972 commit 7baa40d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mysql-test/r/udf.result
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/t/udf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 7baa40d

Please sign in to comment.