include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
set @old_global_binlog_format=  @@global.binlog_format;
set @old_session_binlog_format=  @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format	@@session.binlog_format
ROW	ROW
[on slave]
set @old_global_binlog_format=  @@global.binlog_format;
set @old_session_binlog_format=  @@session.binlog_format;
SET GLOBAL binlog_format = 'ROW';
SET SESSION binlog_format = 'ROW';
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format	@@session.binlog_format
ROW	ROW
include/stop_slave.inc
include/start_slave.inc
# Additional tests for WL#5217 by QA, testplan 1.1
CREATE TABLE t1 
(a INT NOT NULL,
b varchar (64),
INDEX ind_t1 (b,a),
PRIMARY KEY (a))
ENGINE = InnoDB
PARTITION BY RANGE (a)
SUBPARTITION BY HASH (a) SUBPARTITIONS 3
(PARTITION pNeg VALUES LESS THAN (0)
(SUBPARTITION subp0  ,
SUBPARTITION subp1  ,
SUBPARTITION subp2  ),
PARTITION `p0-29` VALUES LESS THAN (30)
(SUBPARTITION subp3  ,
SUBPARTITION subp4  ,
SUBPARTITION subp5  ),
PARTITION `p30-299` VALUES LESS THAN (300)
(SUBPARTITION subp6  ,
SUBPARTITION subp7  ,
SUBPARTITION subp8  ),
PARTITION `p300-2999` VALUES LESS THAN (3000)
(SUBPARTITION subp9  ,
SUBPARTITION subp10  ,
SUBPARTITION subp11  ),
PARTITION `p3000-299999` VALUES LESS THAN (300000)
(SUBPARTITION subp12  ,
SUBPARTITION subp13  ,
SUBPARTITION subp14  ));
INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-4, '(pNeg-)subp0');
INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-3, '(pNeg-)subp0');
INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-2, '(pNeg-)subp0');
INSERT INTO t1 PARTITION (pNeg, subp0) VALUES (-1, '(pNeg-)subp0');
INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (4, '(p0-29-)subp3');
INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (3, '(p0-29-)subp3');
INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (2, '(p0-29-)subp3');
INSERT INTO t1 PARTITION (`p0-29`, subp3) VALUES (1, '(p0-29-)subp3');
INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (24, '(p0-29-)subp5');
INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (23, '(p0-29-)subp5');
INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (22, '(p0-29-)subp5');
INSERT INTO t1 PARTITION (`p0-29`, subp5) VALUES (21, '(p0-29-)subp5');
INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (34, '(p30-299-)subp6');
INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (33, '(p30-299-)subp6');
INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (32, '(p30-299-)subp6');
INSERT INTO t1 PARTITION (`p30-299`, subp9) VALUES (31, '(p30-299-)subp6');
INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (234, '(p30-299-)subp8');
INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (233, '(p30-299-)subp8');
INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (232, '(p30-299-)subp8');
INSERT INTO t1 PARTITION (`p30-299`, subp8) VALUES (231, '(p30-299-)subp8');
INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (304, '(p300-2999-)subp8');
INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (303, '(p300-2999-)subp8');
INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (302, '(p300-2999-)subp8');
INSERT INTO t1 PARTITION (`p300-2999`, subp8) VALUES (301, '(p300-2999-)subp8');
INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3004, '(p3000-299999-)subp12');
INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3003, '(p3000-299999-)subp12');
INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3002, '(p3000-299999-)subp12');
INSERT INTO t1 PARTITION (`p3000-299999`, subp12) VALUES (3001, '(p3000-299999-)subp12');
INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299996, '(p3000-299999-)subp14');
INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299997, '(p3000-299999-)subp14');
INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299998, '(p3000-299999-)subp14');
INSERT INTO t1 PARTITION (`p3000-299999`, subp14) VALUES (299999, '(p3000-299999-)subp14');
SELECT * FROM t1 PARTITION (`p0-29`);
a	b
1	(p0-29-)subp3
2	(p0-29-)subp3
21	(p0-29-)subp5
22	(p0-29-)subp5
23	(p0-29-)subp5
24	(p0-29-)subp5
3	(p0-29-)subp3
4	(p0-29-)subp3
UPDATE t1 PARTITION (`p0-29`) SET b='p0-29-upd-1' WHERE a BETWEEN 0 AND 9;
SELECT * FROM t1 PARTITION (`p0-29`);
a	b
1	p0-29-upd-1
2	p0-29-upd-1
21	(p0-29-)subp5
22	(p0-29-)subp5
23	(p0-29-)subp5
24	(p0-29-)subp5
3	p0-29-upd-1
4	p0-29-upd-1
connection slave;
include/check_slave_is_running.inc
connection slave;
connection slave;
connection slave;
SELECT * FROM t1 PARTITION (`p0-29`);
a	b
1	p0-29-upd-1
2	p0-29-upd-1
21	(p0-29-)subp5
22	(p0-29-)subp5
23	(p0-29-)subp5
24	(p0-29-)subp5
3	p0-29-upd-1
4	p0-29-upd-1
connection master;
UPDATE t1 PARTITION (`p30-299`) SET b='p30-299-upd' WHERE a BETWEEN 30 AND 39;
SELECT * FROM t1 PARTITION (`p30-299`);
a	b
231	(p30-299-)subp8
232	(p30-299-)subp8
233	(p30-299-)subp8
234	(p30-299-)subp8
31	p30-299-upd
32	p30-299-upd
33	p30-299-upd
34	p30-299-upd
connection slave;
include/check_slave_is_running.inc
connection slave;
connection slave;
connection slave;
SELECT * FROM t1 PARTITION (`p30-299`);
a	b
231	(p30-299-)subp8
232	(p30-299-)subp8
233	(p30-299-)subp8
234	(p30-299-)subp8
31	p30-299-upd
32	p30-299-upd
33	p30-299-upd
34	p30-299-upd
connection master;
UPDATE t1 PARTITION (`p300-2999`) SET b='p300-2999-upd' WHERE a BETWEEN 300 AND 309;
SELECT * FROM t1 PARTITION (`p300-2999`);
a	b
301	p300-2999-upd
302	p300-2999-upd
303	p300-2999-upd
304	p300-2999-upd
connection slave;
include/check_slave_is_running.inc
connection slave;
connection slave;
connection slave;
SELECT * FROM t1 PARTITION (`p300-2999`);
a	b
301	p300-2999-upd
302	p300-2999-upd
303	p300-2999-upd
304	p300-2999-upd
connection master;
UPDATE t1 PARTITION (subp3) SET b='subp3-upd';
UPDATE t1 PARTITION (subp4) SET b='subp4-upd';
UPDATE t1 PARTITION (subp5) SET b='subp5-upd';
SELECT * FROM t1 PARTITION (subp4,subp5,subp3) order by b,a;
a	b
1	subp4-upd
2	subp5-upd
21	subp3-upd
22	subp4-upd
23	subp5-upd
24	subp3-upd
3	subp3-upd
4	subp4-upd
connection slave;
include/check_slave_is_running.inc
connection slave;
connection slave;
connection slave;
SELECT * FROM t1 PARTITION (subp4,subp5,subp3) order by b,a;
a	b
1	subp4-upd
2	subp5-upd
21	subp3-upd
22	subp4-upd
23	subp5-upd
24	subp3-upd
3	subp3-upd
4	subp4-upd
set @@global.binlog_format=  @old_global_binlog_format;
set @@session.binlog_format=  @old_session_binlog_format;
connection master;
set @@global.binlog_format=  @old_global_binlog_format;
set @@session.binlog_format=  @old_session_binlog_format;
DROP TABLE t1;
include/rpl_end.inc
