[MDEV-20826] Wrong result of MIN(inet6) with GROUP BY Created: 2019-10-14  Updated: 2019-10-14  Resolved: 2019-10-14

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: Alexander Barkov 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   

CREATE OR REPLACE TABLE t1 (id INT, a INET6) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1, 'fff::'),(1, '8888::');
SELECT MIN(a), MAX(a) FROM t1 GROUP BY id;

+--------+--------+
| MIN(a) | MAX(a) |
+--------+--------+
| 8888:: | fff::  |
+--------+--------+

Looks wrong. The INET6 value '8888::' is greater than 'fff::'.


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