forked from facebook/mysql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FB8-56: Create a new mode SEMI_STRICT for slave_exec_mode (facebook#941)
Summary: JIRA: https://jira.percona.com/browse/FB8-56 Reference Patch: facebook@9d97282 Create a new mode SEMI_STRICT which ignores HA_ERR_RECORD_CHANGED and HA_ERR_KEY_NOT_FOUND errors. A new status counter will track the usage of this new mode. Logging a warning/error message may cause error log to get flooded with same error message, so I decided against it. Pull Request resolved: facebook#941 Test Plan: mtr Reviewed By: lth Differential Revision: D13924607 Pulled By: lth fbshipit-source-id: 2df9681
- Loading branch information
1 parent
31f6bcc
commit aeca17f
Showing
8 changed files
with
58 additions
and
5 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
mysql-test/suite/rpl/r/rpl_slave_exec_mode_semi_strict.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
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] | ||
CREATE TABLE t1 (a INT PRIMARY KEY, b int) ENGINE=Innodb; | ||
INSERT INTO t1 VALUES(1, 2); | ||
include/sync_slave_sql_with_master.inc | ||
DELETE FROM t1 WHERE a=1; | ||
DELETE FROM t1 WHERE a=1; | ||
include/sync_slave_sql_with_master.inc | ||
include/assert.inc [Check if Rbr_unsafe_queries is increased by 1] | ||
DROP TABLE t1; | ||
include/rpl_end.inc |
1 change: 1 addition & 0 deletions
1
mysql-test/suite/rpl/t/rpl_slave_exec_mode_semi_strict-slave.opt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--slave_exec_mode=SEMI_STRICT |
23 changes: 23 additions & 0 deletions
23
mysql-test/suite/rpl/t/rpl_slave_exec_mode_semi_strict.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
source include/have_binlog_format_row.inc; | ||
source include/master-slave.inc; | ||
connection master; | ||
|
||
CREATE TABLE t1 (a INT PRIMARY KEY, b int) ENGINE=Innodb; | ||
INSERT INTO t1 VALUES(1, 2); | ||
|
||
--source include/sync_slave_sql_with_master.inc | ||
--let $unsafe_queries_before= query_get_value(SHOW GLOBAL STATUS LIKE 'Rbr_unsafe_queries', Value, 1) | ||
DELETE FROM t1 WHERE a=1; | ||
|
||
connection master; | ||
DELETE FROM t1 WHERE a=1; | ||
--source include/sync_slave_sql_with_master.inc | ||
|
||
--let $unsafe_queries_after= query_get_value(SHOW GLOBAL STATUS LIKE 'Rbr_unsafe_queries', Value, 1) | ||
--let $assert_text= Check if Rbr_unsafe_queries is increased by 1 | ||
--let $assert_cond= $unsafe_queries_after - $unsafe_queries_before = 1 | ||
--source include/assert.inc | ||
|
||
connection master; | ||
DROP TABLE t1; | ||
source include/rpl_end.inc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters