mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Fixed bug #2310 "INET_ATON handles short-forms addresses incorrectly"
mysql-test/r/func_misc.result: added new test for inet_aton (short-forms addresses) mysql-test/t/func_misc.test: added new test for inet_aton (short-forms addresses) sql/item_func.cc: Change Item_func_inet_aton::val_int to parse short-forms addresses correctly
This commit is contained in:
@@ -6,10 +6,19 @@ inet_ntoa(inet_aton("255.255.255.255.255.255.255.255"))
|
||||
NULL
|
||||
select inet_aton("255.255.255.255.255"),inet_aton("255.255.1.255"),inet_aton("0.1.255");
|
||||
inet_aton("255.255.255.255.255") inet_aton("255.255.1.255") inet_aton("0.1.255")
|
||||
1099511627775 4294902271 511
|
||||
1099511627775 4294902271 65791
|
||||
select inet_ntoa(1099511627775),inet_ntoa(4294902271),inet_ntoa(511);
|
||||
inet_ntoa(1099511627775) inet_ntoa(4294902271) inet_ntoa(511)
|
||||
NULL 255.255.1.255 0.0.1.255
|
||||
select hex(inet_aton('127'));
|
||||
hex(inet_aton('127'))
|
||||
7F
|
||||
select hex(inet_aton('127.1'));
|
||||
hex(inet_aton('127.1'))
|
||||
7F000001
|
||||
select hex(inet_aton('127.1.1'));
|
||||
hex(inet_aton('127.1.1'))
|
||||
7F010001
|
||||
select length(format('nan', 2)) > 0;
|
||||
length(format('nan', 2)) > 0
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user