@@ -94,8 +94,6 @@ ALTER TABLE t1 ADD COLUMN v2 int;
9494ALTER TABLE t2 ADD COLUMN v2 int;
9595ERROR HY000: Galera replication not supported
9696INSERT INTO t1 VALUES (1,1),(2,2);
97- Warnings:
98- Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t1' is not supported in Galera
9997INSERT INTO t2 VALUES (1),(2);
10098Warnings:
10199Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t2' is not supported in Galera
@@ -104,8 +102,6 @@ ERROR HY000: Galera replication not supported
104102ALTER TABLE t2 ADD COLUMN v3 int, ENGINE=Aria;
105103ERROR HY000: Galera replication not supported
106104UPDATE t1 SET v2 = v2 + 3;
107- Warnings:
108- Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t1' is not supported in Galera
109105UPDATE t2 SET v1 = v1 + 3;
110106Warnings:
111107Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t2' is not supported in Galera
@@ -173,4 +169,61 @@ SELECT @@wsrep_mode;
173169STRICT_REPLICATION
174170ALTER TABLE t2 ENGINE=InnoDB;
175171DROP TABLE t2;
176- SET GLOBAL wsrep_mode = DEFAULT;
172+ connection node_1;
173+ #
174+ # MDEV-37373 InnoDB partition table disallow local GTIDs in galera
175+ # wsrep-mode= DISALLOW_LOCAL_GTID
176+ #
177+ SET GLOBAL wsrep_mode = "DISALLOW_LOCAL_GTID";
178+ SELECT @@wsrep_mode;
179+ @@wsrep_mode
180+ DISALLOW_LOCAL_GTID
181+ CREATE TABLE `sales` (
182+ `customer_id` int(11) NOT NULL,
183+ `customer_name` varchar(40) DEFAULT NULL,
184+ `store_id` varchar(20) NOT NULL,
185+ `bill_number` int(11) NOT NULL,
186+ `bill_date` date NOT NULL,
187+ `amount` decimal(8,2) NOT NULL,
188+ PRIMARY KEY (`bill_date`)
189+ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
190+ PARTITION BY RANGE (year(`bill_date`))
191+ (PARTITION `p0` VALUES LESS THAN (2016) ENGINE = InnoDB,
192+ PARTITION `p1` VALUES LESS THAN (2017) ENGINE = InnoDB,
193+ PARTITION `p2` VALUES LESS THAN (2018) ENGINE = InnoDB,
194+ PARTITION `p3` VALUES LESS THAN (2020) ENGINE = InnoDB);
195+ INSERT INTO sales
196+ VALUES (1, 'Michael', 'S001', 101, '2015-01-02', 125.56),
197+ (2, 'Jim', 'S003', 103, '2015-01-25', 476.50),
198+ (3, 'Dwight', 'S012', 122, '2016-02-15', 335.00),
199+ (4, 'Andy', 'S345', 121, '2016-03-26', 787.00),
200+ (5, 'Pam', 'S234', 132, '2017-04-19', 678.00),
201+ (6, 'Karen', 'S743', 111, '2017-05-31', 864.00),
202+ (7, 'Toby', 'S234', 115, '2018-06-11', 762.00),
203+ (8, 'Oscar', 'S012', 125, '2019-07-24', 300.00),
204+ (9, 'Darryl', 'S456', 119, '2019-08-02', 492.20);
205+ SELECT * FROM sales;
206+ customer_id customer_name store_id bill_number bill_date amount
207+ 1 Michael S001 101 2015-01-02 125.56
208+ 2 Jim S003 103 2015-01-25 476.50
209+ 3 Dwight S012 122 2016-02-15 335.00
210+ 4 Andy S345 121 2016-03-26 787.00
211+ 5 Pam S234 132 2017-04-19 678.00
212+ 6 Karen S743 111 2017-05-31 864.00
213+ 7 Toby S234 115 2018-06-11 762.00
214+ 8 Oscar S012 125 2019-07-24 300.00
215+ 9 Darryl S456 119 2019-08-02 492.20
216+ SET GLOBAL wsrep_mode=DEFAULT;
217+ connection node_2;
218+ SELECT * FROM sales;
219+ customer_id customer_name store_id bill_number bill_date amount
220+ 1 Michael S001 101 2015-01-02 125.56
221+ 2 Jim S003 103 2015-01-25 476.50
222+ 3 Dwight S012 122 2016-02-15 335.00
223+ 4 Andy S345 121 2016-03-26 787.00
224+ 5 Pam S234 132 2017-04-19 678.00
225+ 6 Karen S743 111 2017-05-31 864.00
226+ 7 Toby S234 115 2018-06-11 762.00
227+ 8 Oscar S012 125 2019-07-24 300.00
228+ 9 Darryl S456 119 2019-08-02 492.20
229+ DROP TABLE sales;
0 commit comments