Debian Codegraph @

mysql-test/suite/rpl/r/rpl_partition_info.result

raw
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 RANGE (store_id)
8 ( PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20), PARTITION p2 VALUES LESS THAN (30));
9 include/save_binlog_position.inc
10 INSERT INTO employees VALUES(22);
11 include/rpl_partition_info.inc
12 ALTER TABLE employees ADD PARTITION (PARTITION p3 VALUES LESS THAN (40));
13 include/save_binlog_position.inc
14 INSERT INTO employees VALUES(38);
15 include/rpl_partition_info.inc
16 include/save_binlog_position.inc
17 UPDATE employees SET store_id = 39 WHERE store_id = 38;
18 include/rpl_partition_info_update.inc
19 include/save_binlog_position.inc
20 UPDATE employees SET store_id = 28 WHERE store_id = 39;
21 include/rpl_partition_info_update.inc
22 #####2.INSERT, UPDATE, DELETE in a partitioned table affecting same and multiple partition #####
23 #####3.Verifying the number of events created when executing statements affecting same and multiple partitions #####
24 -----INSERT-----
25 include/save_binlog_position.inc
26 INSERT INTO employees VALUES(4), (5);
27 include/assert_binlog_events.inc
28 include/rpl_partition_info.inc
29 include/save_binlog_position.inc
30 INSERT INTO employees VALUES(7), (15);
31 include/assert_binlog_events.inc
32 include/rpl_partition_info.inc
33 -----UPDATE-----
34 include/save_binlog_position.inc
35 UPDATE employees SET store_id = 9 WHERE store_id < 6;
36 include/assert_binlog_events.inc
37 include/rpl_partition_info_update.inc
38 include/save_binlog_position.inc
39 UPDATE employees SET store_id = 12 WHERE store_id < 25 AND store_id > 10;
40 include/assert_binlog_events.inc
41 include/rpl_partition_info_update.inc
42 include/save_binlog_position.inc
43 UPDATE employees SET store_id = store_id + 2 WHERE store_id < 10;
44 include/assert_binlog_events.inc
45 include/rpl_partition_info_update.inc
46 -----DELETE-----
47 include/save_binlog_position.inc
48 DELETE FROM employees where store_id < 10;
49 include/assert_binlog_events.inc
50 include/rpl_partition_info.inc
51 include/save_binlog_position.inc
52 DELETE FROM employees where store_id < 40;
53 include/assert_binlog_events.inc
54 include/rpl_partition_info.inc
55 DROP TABLE employees;
56 CREATE TABLE employees (store_id INT NOT NULL);
57 ALTER TABLE employees PARTITION BY RANGE (store_id) ( PARTITION p0 VALUES LESS THAN (10),
58 PARTITION p1 VALUES LESS THAN (20),
59 PARTITION p2 VALUES LESS THAN (30));
60 include/save_binlog_position.inc
61 INSERT INTO employees VALUES(22);
62 include/rpl_partition_info.inc
63 ALTER TABLE employees ADD PARTITION (PARTITION p3 VALUES LESS THAN (40));
64 include/save_binlog_position.inc
65 INSERT INTO employees VALUES(38);
66 include/rpl_partition_info.inc
67 include/save_binlog_position.inc
68 UPDATE employees SET store_id = 39 WHERE store_id = 38;
69 include/rpl_partition_info_update.inc
70 include/save_binlog_position.inc
71 UPDATE employees SET store_id = 28 WHERE store_id = 39;
72 include/rpl_partition_info_update.inc
73 #####2.INSERT, UPDATE, DELETE in a partitioned table affecting same and multiple partition #####
74 #####3.Verifying the number of events created when executing statements affecting same and multiple partitions #####
75 -----INSERT-----
76 include/save_binlog_position.inc
77 INSERT INTO employees VALUES(4), (5);
78 include/assert_binlog_events.inc
79 include/rpl_partition_info.inc
80 include/save_binlog_position.inc
81 INSERT INTO employees VALUES(7), (15);
82 include/assert_binlog_events.inc
83 include/rpl_partition_info.inc
84 -----UPDATE-----
85 include/save_binlog_position.inc
86 UPDATE employees SET store_id = 9 WHERE store_id < 6;
87 include/assert_binlog_events.inc
88 include/rpl_partition_info_update.inc
89 include/save_binlog_position.inc
90 UPDATE employees SET store_id = 12 WHERE store_id < 25 AND store_id > 10;
91 include/assert_binlog_events.inc
92 include/rpl_partition_info_update.inc
93 include/save_binlog_position.inc
94 UPDATE employees SET store_id = store_id + 2 WHERE store_id < 10;
95 include/assert_binlog_events.inc
96 include/rpl_partition_info_update.inc
97 -----DELETE-----
98 include/save_binlog_position.inc
99 DELETE FROM employees where store_id < 10;
100 include/assert_binlog_events.inc
101 include/rpl_partition_info.inc
102 include/save_binlog_position.inc
103 DELETE FROM employees where store_id < 40;
104 include/assert_binlog_events.inc
105 include/rpl_partition_info.inc
106 DROP TABLE employees;
107 #####4.Verifying the value of partition_id written to the binary log in case of table with more than 128 partitions######
108 CREATE TABLE tp (
109 id INT primary key
110 )
111 PARTITION BY RANGE( id ) (
112 PARTITION p0 VALUES LESS THAN (0), PARTITION p1 VALUES LESS THAN (1),
113 PARTITION p2 VALUES LESS THAN (2), PARTITION p3 VALUES LESS THAN (3),
114 PARTITION p4 VALUES LESS THAN (4), PARTITION p5 VALUES LESS THAN (5),
115 PARTITION p6 VALUES LESS THAN (6), PARTITION p7 VALUES LESS THAN (7),
116 PARTITION p8 VALUES LESS THAN (8), PARTITION p9 VALUES LESS THAN (9),
117 PARTITION p10 VALUES LESS THAN (10), PARTITION p11 VALUES LESS THAN (11),
118 PARTITION p12 VALUES LESS THAN (12), PARTITION p13 VALUES LESS THAN (13),
119 PARTITION p14 VALUES LESS THAN (14), PARTITION p15 VALUES LESS THAN (15),
120 PARTITION p16 VALUES LESS THAN (16), PARTITION p17 VALUES LESS THAN (17),
121 PARTITION p18 VALUES LESS THAN (18), PARTITION p19 VALUES LESS THAN (19),
122 PARTITION p20 VALUES LESS THAN (20), PARTITION p21 VALUES LESS THAN (21),
123 PARTITION p22 VALUES LESS THAN (22), PARTITION p23 VALUES LESS THAN (23),
124 PARTITION p24 VALUES LESS THAN (24), PARTITION p25 VALUES LESS THAN (25),
125 PARTITION p26 VALUES LESS THAN (26), PARTITION p27 VALUES LESS THAN (27),
126 PARTITION p28 VALUES LESS THAN (28), PARTITION p29 VALUES LESS THAN (29),
127 PARTITION p30 VALUES LESS THAN (30), PARTITION p31 VALUES LESS THAN (31),
128 PARTITION p32 VALUES LESS THAN (32), PARTITION p33 VALUES LESS THAN (33),
129 PARTITION p34 VALUES LESS THAN (34), PARTITION p35 VALUES LESS THAN (35),
130 PARTITION p36 VALUES LESS THAN (36), PARTITION p37 VALUES LESS THAN (37),
131 PARTITION p38 VALUES LESS THAN (38), PARTITION p39 VALUES LESS THAN (39),
132 PARTITION p40 VALUES LESS THAN (40), PARTITION p41 VALUES LESS THAN (41),
133 PARTITION p42 VALUES LESS THAN (42), PARTITION p43 VALUES LESS THAN (43),
134 PARTITION p44 VALUES LESS THAN (44), PARTITION p45 VALUES LESS THAN (45),
135 PARTITION p46 VALUES LESS THAN (46), PARTITION p47 VALUES LESS THAN (47),
136 PARTITION p48 VALUES LESS THAN (48), PARTITION p49 VALUES LESS THAN (49),
137 PARTITION p50 VALUES LESS THAN (50), PARTITION p51 VALUES LESS THAN (51),
138 PARTITION p52 VALUES LESS THAN (52), PARTITION p53 VALUES LESS THAN (53),
139 PARTITION p54 VALUES LESS THAN (54), PARTITION p55 VALUES LESS THAN (55),
140 PARTITION p56 VALUES LESS THAN (56), PARTITION p57 VALUES LESS THAN (57),
141 PARTITION p58 VALUES LESS THAN (58), PARTITION p59 VALUES LESS THAN (59),
142 PARTITION p60 VALUES LESS THAN (60), PARTITION p61 VALUES LESS THAN (61),
143 PARTITION p62 VALUES LESS THAN (62), PARTITION p63 VALUES LESS THAN (63),
144 PARTITION p64 VALUES LESS THAN (64), PARTITION p65 VALUES LESS THAN (65),
145 PARTITION p66 VALUES LESS THAN (66), PARTITION p67 VALUES LESS THAN (67),
146 PARTITION p68 VALUES LESS THAN (68), PARTITION p69 VALUES LESS THAN (69),
147 PARTITION p70 VALUES LESS THAN (70), PARTITION p71 VALUES LESS THAN (71),
148 PARTITION p72 VALUES LESS THAN (72), PARTITION p73 VALUES LESS THAN (73),
149 PARTITION p74 VALUES LESS THAN (74), PARTITION p75 VALUES LESS THAN (75),
150 PARTITION p76 VALUES LESS THAN (76), PARTITION p77 VALUES LESS THAN (77),
151 PARTITION p78 VALUES LESS THAN (78), PARTITION p79 VALUES LESS THAN (79),
152 PARTITION p80 VALUES LESS THAN (80), PARTITION p81 VALUES LESS THAN (81),
153 PARTITION p82 VALUES LESS THAN (82), PARTITION p83 VALUES LESS THAN (83),
154 PARTITION p84 VALUES LESS THAN (84), PARTITION p85 VALUES LESS THAN (85),
155 PARTITION p86 VALUES LESS THAN (86), PARTITION p87 VALUES LESS THAN (87),
156 PARTITION p88 VALUES LESS THAN (88), PARTITION p89 VALUES LESS THAN (89),
157 PARTITION p90 VALUES LESS THAN (90), PARTITION p91 VALUES LESS THAN (91),
158 PARTITION p92 VALUES LESS THAN (92), PARTITION p93 VALUES LESS THAN (93),
159 PARTITION p94 VALUES LESS THAN (94), PARTITION p95 VALUES LESS THAN (95),
160 PARTITION p96 VALUES LESS THAN (96), PARTITION p97 VALUES LESS THAN (97),
161 PARTITION p98 VALUES LESS THAN (98), PARTITION p99 VALUES LESS THAN (99),
162 PARTITION p100 VALUES LESS THAN (100), PARTITION p101 VALUES LESS THAN (101),
163 PARTITION p102 VALUES LESS THAN (102), PARTITION p103 VALUES LESS THAN (103),
164 PARTITION p104 VALUES LESS THAN (104), PARTITION p105 VALUES LESS THAN (105),
165 PARTITION p106 VALUES LESS THAN (106), PARTITION p107 VALUES LESS THAN (107),
166 PARTITION p108 VALUES LESS THAN (108), PARTITION p109 VALUES LESS THAN (109),
167 PARTITION p110 VALUES LESS THAN (110), PARTITION p111 VALUES LESS THAN (111),
168 PARTITION p112 VALUES LESS THAN (112), PARTITION p113 VALUES LESS THAN (113),
169 PARTITION p114 VALUES LESS THAN (114), PARTITION p115 VALUES LESS THAN (115),
170 PARTITION p116 VALUES LESS THAN (116), PARTITION p117 VALUES LESS THAN (117),
171 PARTITION p118 VALUES LESS THAN (118), PARTITION p119 VALUES LESS THAN (119),
172 PARTITION p120 VALUES LESS THAN (120), PARTITION p121 VALUES LESS THAN (121),
173 PARTITION p122 VALUES LESS THAN (122), PARTITION p123 VALUES LESS THAN (123),
174 PARTITION p124 VALUES LESS THAN (124), PARTITION p125 VALUES LESS THAN (125),
175 PARTITION p126 VALUES LESS THAN (126), PARTITION p127 VALUES LESS THAN (127),
176 PARTITION p128 VALUES LESS THAN (128), PARTITION p129 VALUES LESS THAN (129));
177 include/save_binlog_position.inc
178 INSERT INTO tp VALUES(126), (127), (128);
179 include/rpl_partition_info.inc
180 #####5.Verifying the value of partition_id written to the binary log in case of sub-partitions######
181 CREATE TABLE sp(id INT, age INT) PARTITION BY RANGE(age) SUBPARTITION BY KEY(id) (
182 PARTITION p0 VALUES LESS THAN (30) (SUBPARTITION p0a, SUBPARTITION p0b),
183 PARTITION p1 VALUES LESS THAN (60) (SUBPARTITION p1a, SUBPARTITION p1b));
184 include/save_binlog_position.inc
185 INSERT INTO sp VALUES(101, 31);
186 include/rpl_partition_info.inc
187 include/save_binlog_position.inc
188 INSERT INTO sp VALUES (102, 32);
189 include/rpl_partition_info.inc
190 #####6.INSERTS, UPDATES, DELETES in a partitioned table affecting same and multiple sub_partition #####
191 #####7.Verifying the number of events created when executing statements affecting single and multiple sub_partitions #####
192 -----INSERT-----
193 include/save_binlog_position.inc
194 INSERT INTO sp VALUES(103, 31), (105, 32);
195 include/assert_binlog_events.inc
196 include/rpl_partition_info.inc
197 include/save_binlog_position.inc
198 INSERT INTO sp VALUES(104, 32), (105, 32);
199 include/assert_binlog_events.inc
200 include/rpl_partition_info.inc
201 -----UPDATE-----
202 include/save_binlog_position.inc
203 UPDATE sp set age=31 where id = 102 or id=104;
204 include/assert_binlog_events.inc
205 include/rpl_partition_info_update.inc
206 include/save_binlog_position.inc
207 UPDATE sp set age=29 where id = 102 or id=103;
208 include/assert_binlog_events.inc
209 include/rpl_partition_info_update.inc
210 -----DELETE-----
211 include/save_binlog_position.inc
212 DELETE FROM sp where id = 101 or id=105;
213 include/assert_binlog_events.inc
214 include/rpl_partition_info.inc
215 include/save_binlog_position.inc
216 DELETE FROM sp where id = 102 or id=103;
217 include/assert_binlog_events.inc
218 include/rpl_partition_info.inc
219 #####8.INSERT, UPDATE, DELETE in a table with no partition #####
220 #####9.Verifying the number of events created when executing the above statements #####
221 CREATE TABLE t(s int, x int);
222 INSERT INTO t VALUES (11, 2);
223 INSERT INTO t VALUES (13, 4);
224 -----INSERT-----
225 include/save_binlog_position.inc
226 INSERT INTO t VALUES (10, 1), (11, 20);
227 include/assert_binlog_events.inc
228 -----UPDATE-----
229 include/save_binlog_position.inc
230 UPDATE t SET s= 7 WHERE x > 3;
231 include/assert_binlog_events.inc
232 -----DELETE------
233 include/save_binlog_position.inc
234 DELETE from t where x < 4;
235 include/assert_binlog_events.inc
236 #####10.Sync with slave and check if all the tables are replicated correctly#####
237 include/sync_slave_sql_with_master.inc
238 include/diff_tables.inc [master:tp, slave:tp]
239 include/diff_tables.inc [master:t, slave:t]
240 include/diff_tables.inc [master:sp, slave:sp]
241 DROP TABLE tp;
242 DROP TABLE t;
243 DROP TABLE sp;
244 #####11.INSERT in a table which has both partition info and ndb_info #####
245 CREATE TABLE t1 (store_id INT NOT NULL) PARTITION BY RANGE (store_id) ( PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20));
246 include/save_binlog_position.inc
247 INSERT INTO t1 VALUES (1), (11), (15);
248 include/assert_binlog_events.inc
249 include/rpl_partition_info.inc
250 include/mysqlbinlog.inc
251 ### Extra row ndb info: data_format: 0, len: 0, data: ""
252 ### Extra row info for partitioning: partition: 0
253 ### INSERT INTO `test`.`t1`
254 ### SET
255 ### @1=1
256 ### Extra row ndb info: data_format: 1, len: 1, data: 0x01
257 ### Extra row info for partitioning: partition: 1
258 ### INSERT INTO `test`.`t1`
259 ### SET
260 ### @1=11
261 ### Extra row ndb info: data_format: 2, len: 2, data: 0x0202
262 ### Extra row info for partitioning: partition: 1
263 ### INSERT INTO `test`.`t1`
264 ### SET
265 ### @1=15
266 include/sync_slave_sql_with_master.inc
267 #####12.Test partial JSON Update #####
268 SET @@SESSION.BINLOG_ROW_VALUE_OPTIONS= PARTIAL_JSON;
269 Warnings:
270 Warning 3647 When binlog_row_image=FULL, the option binlog_row_value_options=PARTIAL_JSON will be used only for the after-image. Full values will be written in the before-image, so the saving in disk space due to binlog_row_value_options is limited to less than 50%.
271 include/save_binlog_position.inc
272 UPDATE t1 SET store_id = 8 WHERE store_id = 11;
273 include/assert_binlog_events.inc
274 include/rpl_partition_info_update.inc
275 include/save_binlog_position.inc
276 INSERT INTO t1 VALUES (2);
277 include/assert_grep.inc [The error block is working fine for ndb_info print.]
278 DROP TABLE t1;
279 RESET MASTER;
280 include/rpl_end.inc