[MDEV-29825] ER_SQL_DISCOVER_ERROR from Federated engine, when table has columns of geometry types Created: 2022-10-19  Updated: 2022-10-24  Resolved: 2022-10-24

Status: Closed
Project: MariaDB Server
Component/s: Documentation, Storage Engine - Federated
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: None


 Description   

error after POINT, POLYGON, etc.

--source include/have_innodb.inc 
--source include/have_sequence.inc 
 
INSTALL SONAME 'ha_federatedx';
eval CREATE SERVER fedlink FOREIGN DATA WRAPPER mysql OPTIONS (USER 'root', HOST '127.0.0.1', DATABASE 'test', PORT $MASTER_MYPORT);
 
CREATE TABLE t ( a linestring);
CREATE TABLE t_fed ENGINE=FEDERATED CONNECTION='fedlink/t';
 
show create table t_fed;
 
DROP TABLE t_fed, t;
UNINSTALL SONAME 'ha_federatedx';

 query 'CREATE TABLE t_fed ENGINE=FEDERATED CONNECTION='fedlink/t'' failed: ER_SQL_DISCOVER_ERROR (1939): Engine FEDERATED failed to discover table `test`.`t_fed` with 'CREATE TABLE `t` (
  `a` linestring DEFAULT NULL
) CONNECTION='fedlink/t''

Should it be documented currently as a limitation in FederatedX?



 Comments   
Comment by Sergei Golubchik [ 2022-10-21 ]

It is a limitation of FederatedX, it does not support GEOMETRY columns. Such tables cannot be created explicitly and discovery fails too.

Technically, ha_federatedx::table_flags() is

  ulonglong table_flags() const
  {
    /* fix server to be able to get remote server table flags */
    return (HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED
            | HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
            HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE | HA_CAN_REPAIR |
            HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
            HA_PARTIAL_COLUMN_READ | HA_NULL_IN_KEY);
  }

which does not include HA_CAN_GEOMETRY

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