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

Table discovery hides the real problem behind ER_SQL_DISCOVER_ERROR

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
    • 10.5, 10.6
    • None

    Description

      INSTALL SONAME 'ha_federatedx'; 
      eval create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT);
       
      CREATE TABLE t (a INT, g POINT);
      --error ER_SQL_DISCOVER_ERROR
      CREATE TABLE t_fed ENGINE=FEDERATED CONNECTION="s/t";
      SHOW WARNINGS;
       
      # Cleanup
      DROP TABLE t;
      DROP SERVER s;
      UNINSTALL SONAME 'ha_federatedx';
      

      The table discovery fails because Federated does not support GIS. The problem is the error message. To avoid suspicion that it's MTR-induced truncation, here is the output from the client:

      10.10 a27bfb2a872

      MariaDB [test]> CREATE TABLE t_fed ENGINE=FEDERATED CONNECTION="s/t";
      ERROR 1939 (HY000): Engine FEDERATED failed to discover table `test`.`t_fed` with 'CREATE TABLE `t` (
        `a` int(11) DEFAULT NULL,
        `g` point DEFAULT NULL
      ) CONNECTION='s/t''
      

      SHOW WARNINGS show four errors, the first being ER_CHECK_NOT_IMPLEMENTED and the above ER_SQL_DISCOVER_ERROR being the second, so it's not quite clear why it ends up in the client. On the bright side, it's better than the other two which are even more generic.

      MariaDB [test]> show warnings;
      +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Level | Code | Message                                                                                                                                                    |
      +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Error | 1178 | The storage engine for the table doesn't support GEOMETRY                                                                                                  |
      | Error | 1939 | Engine FEDERATED failed to discover table `test`.`t_fed` with 'CREATE TABLE `t` (
        `a` int(11) DEFAULT NULL,
        `g` point DEFAULT NULL
      ) CONNECTION='s/t'' |
      | Error | 1429 | Unable to connect to foreign data source:                                                                                                                  |
      | Error | 1030 | Got error 168 "Unknown (generic) error from engine" from storage engine FEDERATED                                                                          |
      +-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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