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

Spider allows bad configuration at CREATE/ALTER TABLE

Details

    Description

      Spider allows associating the same remote table with different partitions. This certainly breaks the partitioning constraints.

      CREATE TABLE `test1_remote` (
        `id` int(11) NOT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=INNODB;
       
      CREATE TABLE `test1_local` (
        `id` int(11) NOT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=SPIDER DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED COMMENT='host "127.0.0.1",user "spider", password "spider", table "test1_remote"'
       PARTITION BY LIST  COLUMNS(`id`)
      (PARTITION `p1` VALUES IN (1) ENGINE = SPIDER,
       PARTITION `p2` VALUES IN (2) ENGINE = SPIDER,
       PARTITION `p3` VALUES IN (3) ENGINE = SPIDER,
       PARTITION `p4` VALUES IN (4) ENGINE = SPIDER);
       
      insert into test1_local values (2);
       
      select * from test1_local;
      +------------+
      | id |
      +------------+
      |          2 |
      |          2 |
      |          2 |
      |          2 |
      +------------+
      4 rows in set (0.001 sec)
      

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            holyfoot Alexey Botchkov
            nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.