[MDEV-20806] Federated does not work with INET6, returns NULL with warning ER_TRUNCATED_WRONG_VALUE Created: 2019-10-11  Updated: 2019-10-12  Resolved: 2019-10-12

Status: Closed
Project: MariaDB Server
Component/s: Data types, Storage Engine - Federated
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   

install soname 'ha_federatedx';
 
create table t1 (a inet6);
insert into t1 values ('::'),('f::f');
 
eval create table t2 (a inet6) engine=federated connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1';
select * from t2;
 
# cleanup
drop table t1, t2;
uninstall soname 'ha_federatedx';

10.5 5e17b1f7

select * from t2;
a
NULL
NULL
Warnings:
Warning	1292	Incorrect inet6 value: '::' for column `test`.`t2`.`a` at row 1
Warning	1292	Incorrect inet6 value: 'f::f' for column `test`.`t2`.`a` at row 2

It works with binary instead of inet6:

create table t1 (a binary(16));
insert into t1 values ('::'),('f::f');
create table t2 (a binary(16)) engine=federated connection='mysql://root@127.0.0.1:16000/test/t1';
select * from t2;
a
::
f::f


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