[MDEV-27376] Spider allows bad configuration at CREATE/ALTER TABLE Created: 2021-12-28  Updated: 2022-02-14

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Alexey Botchkov
Resolution: Unresolved Votes: 0
Labels: None


 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)


Generated at Thu Feb 08 09:52:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.