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

Create federated table does not work as expected.

    Details

      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

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              mmiller Matt
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: