Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29825

ER_SQL_DISCOVER_ERROR from Federated engine, when table has columns of geometry types

Details

    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?

      Attachments

        Activity

          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

          serg Sergei Golubchik added a comment - 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

          People

            greenman Ian Gilfillan
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.