Created
July 19, 2016 21:36
-
-
Save nirbhayc/bf43a3172a690b9fbf4ac2175c1a19f4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
diff --git a/sql/handler.cc b/sql/handler.cc | |
index 6fa937f..d1f8380 100644 | |
--- a/sql/handler.cc | |
+++ b/sql/handler.cc | |
@@ -6100,8 +6100,7 @@ int handler::ha_write_row(uchar *buf) | |
DBUG_RETURN(error); /* purecov: inspected */ | |
#ifdef WITH_WSREP | |
current_thd->wsrep_affected_rows++; | |
- if (wsrep_max_ws_rows && | |
- current_thd->wsrep_exec_mode != REPL_RECV && | |
+ if (current_thd->wsrep_exec_mode != REPL_RECV && | |
current_thd->wsrep_affected_rows > wsrep_max_ws_rows) | |
{ | |
current_thd->transaction_rollback_request= TRUE; | |
@@ -6144,8 +6143,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) | |
return error; | |
#ifdef WITH_WSREP | |
current_thd->wsrep_affected_rows++; | |
- if (wsrep_max_ws_rows && | |
- current_thd->wsrep_exec_mode != REPL_RECV && | |
+ if (current_thd->wsrep_exec_mode != REPL_RECV && | |
current_thd->wsrep_affected_rows > wsrep_max_ws_rows) | |
{ | |
current_thd->transaction_rollback_request= TRUE; | |
@@ -6182,8 +6180,7 @@ int handler::ha_delete_row(const uchar *buf) | |
return error; | |
#ifdef WITH_WSREP | |
current_thd->wsrep_affected_rows++; | |
- if (wsrep_max_ws_rows && | |
- current_thd->wsrep_exec_mode != REPL_RECV && | |
+ if (current_thd->wsrep_exec_mode != REPL_RECV && | |
current_thd->wsrep_affected_rows > wsrep_max_ws_rows) | |
{ | |
current_thd->transaction_rollback_request= TRUE; | |
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc | |
index 0bfa0bf..c49a5de 100644 | |
--- a/sql/sys_vars.cc | |
+++ b/sql/sys_vars.cc | |
@@ -4694,7 +4694,7 @@ static Sys_var_ulong Sys_wsrep_max_ws_size ( | |
static Sys_var_ulong Sys_wsrep_max_ws_rows ( | |
"wsrep_max_ws_rows", "Max number of rows in write set", | |
GLOBAL_VAR(wsrep_max_ws_rows), CMD_LINE(REQUIRED_ARG), | |
- VALID_RANGE(0, 1048576), DEFAULT(0), BLOCK_SIZE(1)); | |
+ VALID_RANGE(1, 1048576), DEFAULT(131072), BLOCK_SIZE(1)); | |
static Sys_var_charptr Sys_wsrep_notify_cmd( | |
"wsrep_notify_cmd", "", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment