[MDEV-29923] Unknown error 1430 on selecting from federated table for which the base table was changed, and 'Got an error writing communication packets' on shutdown Created: 2022-11-01  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Federated
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: shutdown

Issue Links:
Relates

 Description   

If we run this SQL:

INSTALL SONAME 'ha_federatedx.so';
CREATE USER federatedx@localhost IDENTIFIED BY '';
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'federatedx',PASSWORD'');
CREATE TABLE t2 (c INT,c2 BLOB) ENGINE=InnoDB;
CREATE TABLE t CONNECTION='srv/t2' ENGINE=FEDERATED;
DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (c INT) ENGINE=InnoDB;
INSERT INTO t2 VALUES();
SELECT * FROM t WHERE c>0;

We get:

10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug)

10.11.1-dbg>SELECT * FROM t WHERE c>0;
ERROR 1296 (HY000): Got error 10000 'Error on remote system: 1054: Unknown column 'c2' in 'field list'' from FEDERATE

If we add only a key to column c in table t2, i.e.

CREATE TABLE t2 (c INT KEY,c2 BLOB) ENGINE=InnoDB;

And rerun the full testcase, we get:

10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug)

10.11.1-dbg>SELECT * FROM t WHERE c>0;
ERROR 1030 (HY000): Got error 1430 "Unknown error 1430" from storage engine FEDERATED

In the error log we only see:

10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug)

2022-11-01 15:14:22 0 [ERROR] mysqld: Got an error writing communication packets

And this on shutdown (delayed).



 Comments   
Comment by Roel Van de Paar [ 2022-11-01 ]

MTR testcase:

--source include/have_innodb.inc
--let $SOCKET= `SELECT @@global.socket`
INSTALL SONAME 'ha_federatedx.so';
CREATE USER federatedx@localhost IDENTIFIED BY '';
eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$SOCKET",DATABASE 'test',user 'federatedx',PASSWORD'');
CREATE TABLE t2 (c INT KEY,c2 BLOB) ENGINE=InnoDB;
CREATE TABLE t CONNECTION='srv/t2' ENGINE=FEDERATED;
DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (c INT) ENGINE=InnoDB;
INSERT INTO t2 VALUES();
SELECT * FROM t WHERE c>0;

Generated at Thu Feb 08 10:12:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.