1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Alexander Barkov
2020-06-09 12:54:04 +04:00
parent 01e8459d93
commit 76cb2f9dd6
5 changed files with 52 additions and 0 deletions

View File

@ -5315,5 +5315,16 @@ SELECT EXTRACT(DAY FROM a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'extract(day)'
DROP TABLE t1;
#
# MDEV-21765 Possibly inconsistent behavior of BIT_xx functions with INET6 field
#
CREATE TABLE t1 (a GEOMETRY);
SELECT BIT_AND(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'bit_and('
SELECT BIT_OR(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'bit_or('
SELECT BIT_XOR(a) FROM t1;
ERROR HY000: Illegal parameter data type geometry for operation 'bit_xor('
DROP TABLE t1;
#
# End of 10.5 tests
#