summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-02-05 18:14:48 +0100
committerunknown <monty@mysql.com>2004-02-05 18:14:48 +0100
commit44289ba6587b7a2151b4bd3aa7bd5f3b282454d5 (patch)
treedbb4c85840636d99a9d0ab51a698645946f49c1e /sql/item_func.cc
parente5ab70702c082c77401052f940b18b5f6d50a8c3 (diff)
parent0db0b601abb3be2fdafa612583f4e03360876236 (diff)
downloadmariadb-git-44289ba6587b7a2151b4bd3aa7bd5f3b282454d5.tar.gz
merge
mysql-test/r/subselect.result: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_class.cc: Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index e49980af733..efeb0d456ef 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2648,9 +2648,15 @@ longlong Item_func_inet_aton::val_int()
}
if (c != '.') // IP number can't end on '.'
{
+ /*
+ Handle short-forms addresses according to standard. Examples:
+ 127 -> 0.0.0.127
+ 127.1 -> 127.0.0.1
+ 127.2.1 -> 127.2.0.1
+ */
switch (dot_count) {
- case 1: result<<= 8; /* fall through */
- case 2: result<<= 8; /* fall through */
+ case 1: result<<= 8; /* Fall through */
+ case 2: result<<= 8; /* Fall through */
}
return (result << 8) + (ulonglong) byte_result;
}