bug#31552 manual merge and post-make-test-run changes.

parent 62d87757
...@@ -248,12 +248,17 @@ connection master; ...@@ -248,12 +248,17 @@ connection master;
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
--echo **** On Master **** --echo **** On Master ****
sync_slave_with_master; sync_slave_with_master;
# since bug#31552/31609 idempotency is not default any longer. In order
# the following test DELETE FROM t1 to pass the mode is switched
# temprorarily
set @@global.slave_exec_mode= 'IDEMPOTENT';
DELETE FROM t1 WHERE C1 = 'L'; DELETE FROM t1 WHERE C1 = 'L';
connection master; connection master;
DELETE FROM t1; DELETE FROM t1;
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2; query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
sync_slave_with_master; sync_slave_with_master;
set @@global.slave_exec_mode= default;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1); let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
disable_query_log; disable_query_log;
eval SELECT "$last_error" AS Last_SQL_Error; eval SELECT "$last_error" AS Last_SQL_Error;
......
...@@ -115,6 +115,7 @@ GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltes ...@@ -115,6 +115,7 @@ GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltes
show grants for mysqltest4@localhost; show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
set global slave_exec_mode='IDEMPOTENT';
drop table t1, t4, mysqltest2.t2; drop table t1, t4, mysqltest2.t2;
drop database mysqltest2; drop database mysqltest2;
delete from mysql.user where user like "mysqltest%"; delete from mysql.user where user like "mysqltest%";
...@@ -132,6 +133,7 @@ INSERT INTO t5 (word) VALUES ('TEST’'); ...@@ -132,6 +133,7 @@ INSERT INTO t5 (word) VALUES ('TEST’');
SELECT HEX(word) FROM t5; SELECT HEX(word) FROM t5;
HEX(word) HEX(word)
54455354E28099 54455354E28099
set @@global.slave_exec_mode= default;
SELECT HEX(word) FROM t5; SELECT HEX(word) FROM t5;
HEX(word) HEX(word)
54455354E28099 54455354E28099
......
...@@ -430,10 +430,12 @@ START SLAVE; ...@@ -430,10 +430,12 @@ START SLAVE;
**** On Master **** **** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master **** **** On Master ****
set @@global.slave_exec_mode= 'IDEMPOTENT';
DELETE FROM t1 WHERE C1 = 'L'; DELETE FROM t1 WHERE C1 = 'L';
DELETE FROM t1; DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0 COUNT(*) 0
set @@global.slave_exec_mode= default;
Last_SQL_Error Last_SQL_Error
0 0
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
......
...@@ -430,10 +430,12 @@ START SLAVE; ...@@ -430,10 +430,12 @@ START SLAVE;
**** On Master **** **** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master **** **** On Master ****
set @@global.slave_exec_mode= 'IDEMPOTENT';
DELETE FROM t1 WHERE C1 = 'L'; DELETE FROM t1 WHERE C1 = 'L';
DELETE FROM t1; DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0 COUNT(*) 0
set @@global.slave_exec_mode= default;
Last_SQL_Error Last_SQL_Error
0 0
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
......
...@@ -119,6 +119,13 @@ show grants for mysqltest3@localhost; ...@@ -119,6 +119,13 @@ show grants for mysqltest3@localhost;
show grants for mysqltest4@localhost; show grants for mysqltest4@localhost;
# Cleanup # Cleanup
# connection slave;
# BUG31552 changes idempotency is not default any longer
# In order the following `delete from mysql.user',
# where mysqltest1 does not exist on slave,
# to succeed on slave the mode is temporarily changed
set global slave_exec_mode='IDEMPOTENT';
connection master; connection master;
drop table t1, t4, mysqltest2.t2; drop table t1, t4, mysqltest2.t2;
drop database mysqltest2; drop database mysqltest2;
...@@ -129,7 +136,10 @@ delete from mysql.db where user like "mysqltest%"; ...@@ -129,7 +136,10 @@ delete from mysql.db where user like "mysqltest%";
# move it to slave instead # move it to slave instead
#delete from mysql.tables_priv where user like "mysqltest%"; #delete from mysql.tables_priv where user like "mysqltest%";
delete from mysql.columns_priv where user like "mysqltest%"; delete from mysql.columns_priv where user like "mysqltest%";
sync_slave_with_master; sync_slave_with_master;
# bug#31552: do not restore the mode here but later in order
# to succeed with yet the following delete from mysql.tables_priv
#BUG27606 #BUG27606
delete from mysql.tables_priv where user like "mysqltest%"; delete from mysql.tables_priv where user like "mysqltest%";
...@@ -155,6 +165,7 @@ CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY; ...@@ -155,6 +165,7 @@ CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY;
INSERT INTO t5 (word) VALUES ('TEST’'); INSERT INTO t5 (word) VALUES ('TEST’');
SELECT HEX(word) FROM t5; SELECT HEX(word) FROM t5;
sync_slave_with_master; sync_slave_with_master;
set @@global.slave_exec_mode= default; # bug#31552 comments above
connection slave; connection slave;
SELECT HEX(word) FROM t5; SELECT HEX(word) FROM t5;
--error 1146 --error 1146
......
...@@ -301,7 +301,6 @@ SELECT COUNT(*) FROM history; ...@@ -301,7 +301,6 @@ SELECT COUNT(*) FROM history;
COUNT(*) COUNT(*)
400 400
*** DUMP MASTER & SLAVE FOR COMPARE ******** *** DUMP MASTER & SLAVE FOR COMPARE ********
set @@global.slave_exec_mode='IDEMPOTENT' /* to ignore missed records in mysql.proc */;
*************** TEST 2 CLEANUP SECTION ******************** *************** TEST 2 CLEANUP SECTION ********************
DROP PROCEDURE IF EXISTS tpcb.load; DROP PROCEDURE IF EXISTS tpcb.load;
DROP PROCEDURE IF EXISTS tpcb.trans; DROP PROCEDURE IF EXISTS tpcb.trans;
......
...@@ -378,7 +378,7 @@ C1 C2 ...@@ -378,7 +378,7 @@ C1 C2
1 2 1 2
2 4 2 4
3 6 3 6
set @@global.slave_exec_mode= 'STRICT'; set @@global.slave_exec_mode= default;
--- on slave: old values should be overwritten by replicated values --- --- on slave: old values should be overwritten by replicated values ---
SELECT * FROM t7 ORDER BY C1; SELECT * FROM t7 ORDER BY C1;
C1 C2 C1 C2
...@@ -430,10 +430,12 @@ START SLAVE; ...@@ -430,10 +430,12 @@ START SLAVE;
**** On Master **** **** On Master ****
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M'); INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
**** On Master **** **** On Master ****
set @@global.slave_exec_mode= 'IDEMPOTENT';
DELETE FROM t1 WHERE C1 = 'L'; DELETE FROM t1 WHERE C1 = 'L';
DELETE FROM t1; DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0 COUNT(*) 0
set @@global.slave_exec_mode= default;
Last_SQL_Error Last_SQL_Error
0 0
SELECT COUNT(*) FROM t1 ORDER BY c1,c2; SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
......
...@@ -122,7 +122,6 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error, ...@@ -122,7 +122,6 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error,
thd->net.last_error[0] != 0 ? ";" : "", thd->net.last_error[0] != 0 ? ";" : "",
handler_error == NULL? "<unknown>" : handler_error, handler_error == NULL? "<unknown>" : handler_error,
log_name, pos); log_name, pos);
>>>>>>>
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment