mariadb/mysql-test/suite/galera/t/galera_partition_key.test
Jan Lindström 0172887980 MDEV-34269 : 10.11.8 cluster becomes inconsistent when using composite primary key and partitioning
This is regression from commit 3228c08fa8. Problem is that
when table storage engine is determined there should be
check is table partitioned and if it is then determine
partition implementing storage engine.

Reported bug is reproducible only with --log-bin so make
sure tests changed by 3228c08fa8 and new test are run
with --log-bin and binlog disabled.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-06-07 18:26:08 +02:00

55 lines
1.1 KiB
Text

--source include/galera_cluster.inc
--source include/have_partition.inc
--source include/log_bin.inc
--connection node_1
CREATE TABLE `t1` (
`id` int(10) unsigned NOT NULL,
`other_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`,`other_id`)
) ENGINE=InnoDB
PARTITION BY LIST (`id` MOD 2)
(PARTITION `p0` VALUES IN (0) ENGINE = InnoDB,
PARTITION `p1` VALUES IN (1) ENGINE = InnoDB);
INSERT INTO t1 VALUES (1, 0);
CREATE TABLE t2 LIKE t1;
START TRANSACTION;
INSERT INTO t2(SELECT * FROM t1 WHERE id = 1);
DELETE FROM t1 WHERE id = 1;
COMMIT;
--connection node_2
SELECT * from t1;
SELECT * from t2;
DROP TABLE t1, t2;
--connection node_1
CREATE TABLE `t1` (
`id` int(10) unsigned NOT NULL,
`other_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB
PARTITION BY LIST (`id` MOD 2)
(PARTITION `p0` VALUES IN (0) ENGINE = InnoDB,
PARTITION `p1` VALUES IN (1) ENGINE = InnoDB);
INSERT INTO t1 VALUES (1, 0);
CREATE TABLE t2 LIKE t1;
START TRANSACTION;
INSERT INTO t2(SELECT * FROM t1 WHERE id = 1);
DELETE FROM t1 WHERE id = 1;
COMMIT;
--connection node_2
SELECT * from t1;
SELECT * from t2;
DROP TABLE t1, t2;