@@ -6109,14 +6109,17 @@ int handler::ha_write_row(uchar *buf)
6109
6109
if (unlikely (error= binlog_log_row (table, 0 , buf, log_func)))
6110
6110
DBUG_RETURN (error); /* purecov: inspected */
6111
6111
#ifdef WITH_WSREP
6112
- current_thd->wsrep_affected_rows ++;
6113
- if (wsrep_max_ws_rows &&
6114
- current_thd->wsrep_exec_mode != REPL_RECV &&
6115
- current_thd->wsrep_affected_rows > wsrep_max_ws_rows)
6112
+ if (WSREP (current_thd))
6116
6113
{
6117
- trans_rollback_stmt (current_thd) || trans_rollback (current_thd);
6118
- my_message (ER_ERROR_DURING_COMMIT, " wsrep_max_ws_rows exceeded" , MYF (0 ));
6119
- DBUG_RETURN (ER_ERROR_DURING_COMMIT);
6114
+ current_thd->wsrep_affected_rows ++;
6115
+ if (wsrep_max_ws_rows &&
6116
+ current_thd->wsrep_exec_mode != REPL_RECV &&
6117
+ current_thd->wsrep_affected_rows > wsrep_max_ws_rows)
6118
+ {
6119
+ trans_rollback_stmt (current_thd) || trans_rollback (current_thd);
6120
+ my_message (ER_ERROR_DURING_COMMIT, " wsrep_max_ws_rows exceeded" , MYF (0 ));
6121
+ DBUG_RETURN (ER_ERROR_DURING_COMMIT);
6122
+ }
6120
6123
}
6121
6124
#endif /* WITH_WSREP */
6122
6125
@@ -6153,14 +6156,17 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data)
6153
6156
if (unlikely (error= binlog_log_row (table, old_data, new_data, log_func)))
6154
6157
return error;
6155
6158
#ifdef WITH_WSREP
6156
- current_thd->wsrep_affected_rows ++;
6157
- if (wsrep_max_ws_rows &&
6158
- current_thd->wsrep_exec_mode != REPL_RECV &&
6159
- current_thd->wsrep_affected_rows > wsrep_max_ws_rows)
6159
+ if (WSREP (current_thd))
6160
6160
{
6161
- trans_rollback_stmt (current_thd) || trans_rollback (current_thd);
6162
- my_message (ER_ERROR_DURING_COMMIT, " wsrep_max_ws_rows exceeded" , MYF (0 ));
6163
- return ER_ERROR_DURING_COMMIT;
6161
+ current_thd->wsrep_affected_rows ++;
6162
+ if (wsrep_max_ws_rows &&
6163
+ current_thd->wsrep_exec_mode != REPL_RECV &&
6164
+ current_thd->wsrep_affected_rows > wsrep_max_ws_rows)
6165
+ {
6166
+ trans_rollback_stmt (current_thd) || trans_rollback (current_thd);
6167
+ my_message (ER_ERROR_DURING_COMMIT, " wsrep_max_ws_rows exceeded" , MYF (0 ));
6168
+ return ER_ERROR_DURING_COMMIT;
6169
+ }
6164
6170
}
6165
6171
#endif /* WITH_WSREP */
6166
6172
return 0 ;
@@ -6191,14 +6197,17 @@ int handler::ha_delete_row(const uchar *buf)
6191
6197
if (unlikely (error= binlog_log_row (table, buf, 0 , log_func)))
6192
6198
return error;
6193
6199
#ifdef WITH_WSREP
6194
- current_thd->wsrep_affected_rows ++;
6195
- if (wsrep_max_ws_rows &&
6196
- current_thd->wsrep_exec_mode != REPL_RECV &&
6197
- current_thd->wsrep_affected_rows > wsrep_max_ws_rows)
6198
- {
6199
- trans_rollback_stmt (current_thd) || trans_rollback (current_thd);
6200
- my_message (ER_ERROR_DURING_COMMIT, " wsrep_max_ws_rows exceeded" , MYF (0 ));
6201
- return ER_ERROR_DURING_COMMIT;
6200
+ if (WSREP (current_thd))
6201
+ {
6202
+ current_thd->wsrep_affected_rows ++;
6203
+ if (wsrep_max_ws_rows &&
6204
+ current_thd->wsrep_exec_mode != REPL_RECV &&
6205
+ current_thd->wsrep_affected_rows > wsrep_max_ws_rows)
6206
+ {
6207
+ trans_rollback_stmt (current_thd) || trans_rollback (current_thd);
6208
+ my_message (ER_ERROR_DURING_COMMIT, " wsrep_max_ws_rows exceeded" , MYF (0 ));
6209
+ return ER_ERROR_DURING_COMMIT;
6210
+ }
6202
6211
}
6203
6212
#endif /* WITH_WSREP */
6204
6213
return 0 ;
0 commit comments