mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-5146 : Bulk loads into partitioned table not working
When wsrep is enabled, for any update on innodb tables, the corresponding keys are appended to galera's transaction writeset (wsrep_append_keys()). However, for LOAD DATA, this got skipped if binary logging was disabled or it was non-ROW based. As a result, while the updates from LOAD DATA on non-partitioned tables replicated fine as wsrep implicitly enables binary logging (if not enabled, explicitly), the same did not work on partitioned tables as for partitioned tables the binary logging gets disabled temporarily (ha_partition::write_row()). Fixed by removing the unwanted conditions from the check. Also backported some changes from 10.0-galera to make sure wsrep_load_data_splitting affects LOAD DATA commands only.
This commit is contained in:
@@ -20,4 +20,40 @@ pk i
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-5146: Bulk loads into partitioned table not working
|
||||
#
|
||||
# Case 1: wsrep_load_data_splitting = ON & LOAD DATA with 20002
|
||||
# entries.
|
||||
SET GLOBAL wsrep_load_data_splitting = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY)
|
||||
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
SELECT COUNT(*) = 20002 FROM t1;
|
||||
COUNT(*) = 20002
|
||||
1
|
||||
wsrep_last_committed_diff
|
||||
1
|
||||
DROP TABLE t1;
|
||||
# Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries.
|
||||
SET GLOBAL wsrep_load_data_splitting = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY)
|
||||
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
SELECT COUNT(*) = 101 FROM t1;
|
||||
COUNT(*) = 101
|
||||
1
|
||||
wsrep_last_committed_diff
|
||||
1
|
||||
DROP TABLE t1;
|
||||
# Case 3: wsrep_load_data_splitting = OFF & LOAD DATA with 20002
|
||||
# entries.
|
||||
SET GLOBAL wsrep_load_data_splitting = OFF;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY)
|
||||
ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
SELECT COUNT(*) = 20002 FROM t1;
|
||||
COUNT(*) = 20002
|
||||
1
|
||||
wsrep_last_committed_diff
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL wsrep_load_data_splitting = 1;;
|
||||
# End of test
|
||||
|
Reference in New Issue
Block a user