-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bug](function) fix is_ip_address_in_range function parse error throw…
… exception (#45657) ### What problem does this PR solve? Problem Summary: before: will be throw exception when parse NULL value, as the input is empty invalid. so need check firstly and then parse it. ``` mysql [test]>select * from ip_test; +------+------------------+ | id | data | +------+------------------+ | 54 | 2001:db8:4::/128 | | 55 | NULL | +------+------------------+ 2 rows in set (0.07 sec) mysql [test]>SELECT data, IS_IP_ADDRESS_IN_RANGE(CAST('0.0.0.1' AS STRING), data) FROM ip_test; ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.8)[INVALID_ARGUMENT][E33] The text does not contain '/': ```
- Loading branch information
1 parent
034085a
commit 0ab4eae
Showing
3 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,3 +92,11 @@ | |
-- !sql -- | ||
\N | ||
|
||
-- !sql1 -- | ||
54 2001:db8:4::/128 | ||
55 \N | ||
|
||
-- !sql2 -- | ||
\N \N | ||
2001:db8:4::/128 false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters