diff options
author | Alexander Barkov <bar@mariadb.com> | 2020-06-09 12:54:04 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2020-06-09 12:54:04 +0400 |
commit | 76cb2f9dd677d91df9ce135475a66db7048f7d8c (patch) | |
tree | 9a1447970986bee75bfab2ad1fac34477bc8c628 /sql/item_sum.h | |
parent | 01e8459d93ce69b8b540f9fb5d7e68eb68f8d3f3 (diff) | |
download | mariadb-git-76cb2f9dd677d91df9ce135475a66db7048f7d8c.tar.gz |
MDEV-21765 Possibly inconsistent behavior of BIT_xx functions with INET6 field
Disallow BIT_AND(), BIT_OR(), BIT_XOR() for data types GEOMETRY and INET6,
as they cannot return any useful integer values.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r-- | sql/item_sum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h index d3c78c245d6..d1b9303d3d6 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -1208,6 +1208,8 @@ public: const Type_handler *type_handler() const { return &type_handler_ulonglong; } bool fix_length_and_dec() { + if (args[0]->check_type_can_return_int(func_name())) + return true; decimals= 0; max_length=21; unsigned_flag= 1; maybe_null= null_value= 0; return FALSE; } |