| 1 |
include/master-slave.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
[connection master] |
| 6 |
#####1.Verifying the value of partition_id written to the binary log ##### |
| 7 |
CREATE TABLE employees (store_id INT NOT NULL) PARTITION BY LIST (store_id) |
| 8 |
( PARTITION pEast VALUES IN (4, 8, 12), PARTITION pWest VALUES IN (3, 6, 9), |
| 9 |
PARTITION pNorth VALUES IN (5, 10, 15)); |
| 10 |
include/save_binlog_position.inc |
| 11 |
INSERT INTO employees VALUES(10); |
| 12 |
include/rpl_partition_info.inc |
| 13 |
ALTER TABLE employees ADD PARTITION (PARTITION pSouth VALUES IN (7, 14, 28)); |
| 14 |
include/save_binlog_position.inc |
| 15 |
INSERT INTO employees VALUES(28); |
| 16 |
include/rpl_partition_info.inc |
| 17 |
#####2.INSERT, UPDATE, DELETE in a partitioned table affecting same and multiple partition ##### |
| 18 |
#####3.Verifying the number of events created when executing statements affecting same and multiple partitions ##### |
| 19 |
-----INSERT----- |
| 20 |
include/save_binlog_position.inc |
| 21 |
include/save_binlog_position.inc |
| 22 |
INSERT INTO employees VALUES(4), (8); |
| 23 |
include/assert_binlog_events.inc |
| 24 |
include/rpl_partition_info.inc |
| 25 |
include/save_binlog_position.inc |
| 26 |
INSERT INTO employees VALUES(4), (6); |
| 27 |
include/assert_binlog_events.inc |
| 28 |
include/rpl_partition_info.inc |
| 29 |
-----UPDATE----- |
| 30 |
include/save_binlog_position.inc |
| 31 |
UPDATE employees SET store_id = 9 WHERE store_id = 4 OR store_id = 8 ; |
| 32 |
include/assert_binlog_events.inc |
| 33 |
include/rpl_partition_info_update.inc |
| 34 |
include/save_binlog_position.inc |
| 35 |
UPDATE employees SET store_id = 8 WHERE store_id = 6 OR store_id = 10; |
| 36 |
include/assert_binlog_events.inc |
| 37 |
include/rpl_partition_info_update.inc |
| 38 |
-----DELETE----- |
| 39 |
include/save_binlog_position.inc |
| 40 |
DELETE FROM employees where store_id = 8; |
| 41 |
include/assert_binlog_events.inc |
| 42 |
include/rpl_partition_info.inc |
| 43 |
include/save_binlog_position.inc |
| 44 |
DELETE FROM employees where store_id = 9 OR store_id = 28; |
| 45 |
include/assert_binlog_events.inc |
| 46 |
include/rpl_partition_info.inc |
| 47 |
DROP TABLE employees; |
| 48 |
CREATE TABLE employees (store_id INT NOT NULL); |
| 49 |
ALTER TABLE employees PARTITION BY LIST (store_id) ( PARTITION pEast VALUES IN (4, 8, 12), |
| 50 |
PARTITION pWest VALUES IN (3, 6, 9), |
| 51 |
PARTITION pNorth VALUES IN (5, 10, 15)); |
| 52 |
include/save_binlog_position.inc |
| 53 |
INSERT INTO employees VALUES(10); |
| 54 |
include/rpl_partition_info.inc |
| 55 |
ALTER TABLE employees ADD PARTITION (PARTITION pSouth VALUES IN (7, 14, 28)); |
| 56 |
include/save_binlog_position.inc |
| 57 |
INSERT INTO employees VALUES(28); |
| 58 |
include/rpl_partition_info.inc |
| 59 |
#####2.INSERT, UPDATE, DELETE in a partitioned table affecting same and multiple partition ##### |
| 60 |
#####3.Verifying the number of events created when executing statements affecting same and multiple partitions ##### |
| 61 |
-----INSERT----- |
| 62 |
include/save_binlog_position.inc |
| 63 |
include/save_binlog_position.inc |
| 64 |
INSERT INTO employees VALUES(4), (8); |
| 65 |
include/assert_binlog_events.inc |
| 66 |
include/rpl_partition_info.inc |
| 67 |
include/save_binlog_position.inc |
| 68 |
INSERT INTO employees VALUES(4), (6); |
| 69 |
include/assert_binlog_events.inc |
| 70 |
include/rpl_partition_info.inc |
| 71 |
-----UPDATE----- |
| 72 |
include/save_binlog_position.inc |
| 73 |
UPDATE employees SET store_id = 9 WHERE store_id = 4 OR store_id = 8 ; |
| 74 |
include/assert_binlog_events.inc |
| 75 |
include/rpl_partition_info_update.inc |
| 76 |
include/save_binlog_position.inc |
| 77 |
UPDATE employees SET store_id = 8 WHERE store_id = 6 OR store_id = 10; |
| 78 |
include/assert_binlog_events.inc |
| 79 |
include/rpl_partition_info_update.inc |
| 80 |
-----DELETE----- |
| 81 |
include/save_binlog_position.inc |
| 82 |
DELETE FROM employees where store_id = 8; |
| 83 |
include/assert_binlog_events.inc |
| 84 |
include/rpl_partition_info.inc |
| 85 |
include/save_binlog_position.inc |
| 86 |
DELETE FROM employees where store_id = 9 OR store_id = 28; |
| 87 |
include/assert_binlog_events.inc |
| 88 |
include/rpl_partition_info.inc |
| 89 |
DROP TABLE employees; |
| 90 |
#####4.Verifying the value of partition_id written to the binary log in case of sub-partitions###### |
| 91 |
CREATE TABLE sp (id INT, age INT) PARTITION BY LIST (age) SUBPARTITION BY HASH (id) |
| 92 |
SUBPARTITIONS 2 ( |
| 93 |
PARTITION p0 VALUES IN (2, 3, 5, 7, 11), |
| 94 |
PARTITION p1 VALUES IN (4, 6, 8, 10, 12)); |
| 95 |
include/save_binlog_position.inc |
| 96 |
INSERT INTO sp VALUES(101, 3); |
| 97 |
include/rpl_partition_info.inc |
| 98 |
INSERT INTO sp VALUES (102, 3); |
| 99 |
INSERT INTO sp VALUES (107, 4); |
| 100 |
INSERT INTO sp VALUES (108, 10); |
| 101 |
#####5.INSERTS, UPDATES, DELETES in a partitioned table affecting same and multiple sub_partition ##### |
| 102 |
#####6.Verifying the number of events created when executing statements affecting single and multiple sub_partitions ##### |
| 103 |
-----INSERT----- |
| 104 |
include/save_binlog_position.inc |
| 105 |
INSERT INTO sp VALUES(103, 2), (105, 5); |
| 106 |
include/assert_binlog_events.inc |
| 107 |
include/rpl_partition_info.inc |
| 108 |
include/save_binlog_position.inc |
| 109 |
INSERT INTO sp VALUES(103, 2), (104, 7); |
| 110 |
include/assert_binlog_events.inc |
| 111 |
include/rpl_partition_info.inc |
| 112 |
-----UPDATE----- |
| 113 |
include/save_binlog_position.inc |
| 114 |
UPDATE sp SET age=5 WHERE id = 102 OR id=104; |
| 115 |
include/rpl_partition_info_update.inc |
| 116 |
include/assert_binlog_events.inc |
| 117 |
include/save_binlog_position.inc |
| 118 |
UPDATE sp SET age=11 WHERE id = 102 OR id=105; |
| 119 |
include/assert_binlog_events.inc |
| 120 |
include/rpl_partition_info_update.inc |
| 121 |
-----DELETE----- |
| 122 |
include/save_binlog_position.inc |
| 123 |
DELETE FROM sp WHERE id = 101 OR id=105; |
| 124 |
include/assert_binlog_events.inc |
| 125 |
include/rpl_partition_info.inc |
| 126 |
include/save_binlog_position.inc |
| 127 |
DELETE FROM sp WHERE id = 108 OR id=107; |
| 128 |
include/assert_binlog_events.inc |
| 129 |
include/rpl_partition_info.inc |
| 130 |
#####7.Sync with slave and check if all the tables are replicated correctly##### |
| 131 |
include/sync_slave_sql_with_master.inc |
| 132 |
include/diff_tables.inc [master:sp, slave:sp] |
| 133 |
DROP TABLE sp; |
| 134 |
RESET MASTER; |
| 135 |
include/rpl_end.inc |