[MDEV-20808] CAST from INET6 to FLOAT does not produce an error Created: 2019-10-11  Updated: 2019-10-11  Resolved: 2019-10-11

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.5
Fix Version/s: 10.5.0

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-274 The data type for IPv6/IPv4 addresses... Closed
relates to MDEV-20784 Testing for MDEV-274 (INET6, data typ... Closed

 Description   

According to MDEV-274, CAST from INET6 to anything other than CHAR or BINARY should produce an error. It doesn't for FLOAT (while it does for DOUBLE):

create table t1 (a inet6);
insert into t1 values ('::');
select cast(a as float) from t1;

10.5 b5fae7f7

MariaDB [test]> select cast(a as float) from t1;
+------------------+
| cast(a as float) |
+------------------+
|                0 |
+------------------+
1 row in set (0.000 sec)


Generated at Thu Feb 08 09:02:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.