[MDEV-27671] No warnings on inet6_field_pkey=varchar_field Created: 2022-01-28  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: Data types, Plugin - INET6
Affects Version/s: 10.5, 10.6, 10.7, 10.8
Fix Version/s: 10.5, 10.6

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I run this script:

DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (i INET6 PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (a VARCHAR(40)) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('::'),('ffff::ffff');
INSERT INTO t2 VALUES ('garbage1'),('garbage2');
SELECT * FROM t1 JOIN t2 ON (i = a);

It correctly returns empty set, but without any warning.
The expected behaviour would be to return warnings, like in this query:

SELECT * FROM t1 WHERE i='garbage1';
SHOW WARNINGS;

+---------+------+-----------------------------------+
| Level   | Code | Message                           |
+---------+------+-----------------------------------+
| Warning | 1292 | Incorrect inet6 value: 'garbage1' |
| Warning | 1292 | Incorrect inet6 value: 'garbage1' |
+---------+------+-----------------------------------+



 Comments   
Comment by Alexander Barkov [ 2022-01-28 ]

The same problem is repeatable in 10.7 and 10.8 with the UUID data type:

DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (i UUID PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (a VARCHAR(40)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (UUID()),(UUID());
INSERT INTO t2 VALUES ('garbage1'),('garbage2');
SELECT * FROM t1 JOIN t2 ON (i = a);

Comment by Alexander Barkov [ 2022-01-28 ]

Pushed a fix to 10.5.

Now need to wait for MDEV-27018 to propagate to 10.7 and check if the same crash happens with the UUID data type.

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