From 7db61ce021642bb3bbee1c341d94f3539037df80 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Jan 2004 00:32:25 +0400 Subject: 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 --- mysql-test/r/func_misc.result | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mysql-test/r/func_misc.result') diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index d51bea020ed..ec5f76409e7 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -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 -- cgit v1.2.1