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

Create federated table does not work as expected.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.14, 10.1(EOL), 10.2(EOL)
    • 10.1.24, 10.2.7
    • None
    • Debian 8.5 - linux 3.16.0-4 on vmware

    Description

      When attempting to create a connection to a specific table using the federated storage engine, an error is thrown.

      Engine FEDERATED failed to discover table `mysql56test-cdb001`.`t_topics_indexes` with 'CREATE TABLE `t_topics_indexes` (
          `topic_indexID` bigint(20) NOT NULL AUTO_INCREMENT,
          `topicID` bigint(20) NOT NULL,
          `index_typeID` tinyint(4) NOT NULL,
          `index_value` varchar(1024) NOT NULL,
          PRIMARY KEY (`topic_indexID`),
          KEY `FK_TI_TOPICID_idx` (`topicID`),
          KEY `IDX_TYPE` (`index_typeID`),
          KEY `UIDX_TOPICTYPEVALUE` (`topicID`,`index_typeID`,`index_value`(255)),
          CONSTRAINT `FK_TI_TOPICID` FOREIGN KEY (
      

      If I remove this key

      KEY `UIDX_TOPICTYPEVALUE` (`topicID`,`index_typeID`,`index_value`(255))
      

      it works as expected.

      Here is the full create statement for the table.

      CREATE TABLE `t_topics_indexes` (   `topic_indexID` bigint(20) NOT NULL AUTO_INCREMENT,   `topicID` bigint(20) NOT NULL,   `index_typeID` tinyint(4) NOT NULL,   `index_value` varchar(1024) NOT NULL,   PRIMARY KEY (`topic_indexID`),   KEY `FK_TI_TOPICID_idx` (`topicID`),   KEY `IDX_TYPE` (`index_typeID`),   KEY `UIDX_TOPICTYPEVALUE` (`topicID`,`index_typeID`,`index_value`(255)),   CONSTRAINT `FK_TI_TOPICID` FOREIGN KEY (`topicID`) REFERENCES `t_topics` (`topicID`) ON DELETE CASCADE ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=14606 DEFAULT CHARSET=utf8;
      

      All other tables on this database are able to be added normally.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            mmiller Matt
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.