Skip to content

Commit

Permalink
Only apply wsrep_trx_fragment_size to InnoDB tables
Browse files Browse the repository at this point in the history
MDEV-22617 Galera node crashes when trying to log to slow_log table in
streaming replication mode

Other things:
- Changed name of wsrep_after_row(two arguments) to
  wsrep_after_row_internal(one argument) to not depended on the
  function signature with unused arguments.
  • Loading branch information
montywi committed May 23, 2020
1 parent c4bf4b7 commit f4ddde0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion sql/handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6596,7 +6596,7 @@ static int wsrep_after_row(THD *thd)
my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0));
DBUG_RETURN(ER_ERROR_DURING_COMMIT);
}
else if (wsrep_after_row(thd, false))
else if (wsrep_after_row_internal(thd))
{
DBUG_RETURN(ER_LOCK_DEADLOCK);
}
Expand Down Expand Up @@ -6997,6 +6997,7 @@ int handler::ha_write_row(const uchar *buf)
}
#ifdef WITH_WSREP
if (WSREP_NNULL(ha_thd()) && table_share->tmp_table == NO_TMP_TABLE &&
ht->flags & HTON_WSREP_REPLICATION &&
!error && (error= wsrep_after_row(ha_thd())))
{
DBUG_RETURN(error);
Expand Down Expand Up @@ -7047,6 +7048,7 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
}
#ifdef WITH_WSREP
if (WSREP_NNULL(ha_thd()) && table_share->tmp_table == NO_TMP_TABLE &&
ht->flags & HTON_WSREP_REPLICATION &&
!error && (error= wsrep_after_row(ha_thd())))
return error;
#endif /* WITH_WSREP */
Expand Down Expand Up @@ -7110,6 +7112,7 @@ int handler::ha_delete_row(const uchar *buf)
}
#ifdef WITH_WSREP
if (WSREP_NNULL(ha_thd()) && table_share->tmp_table == NO_TMP_TABLE &&
ht->flags & HTON_WSREP_REPLICATION &&
!error && (error= wsrep_after_row(ha_thd())))
{
return error;
Expand Down
2 changes: 1 addition & 1 deletion sql/wsrep_trans_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static inline int wsrep_start_trx_if_not_started(THD* thd)
Return zero on succes, non-zero on failure.
*/
static inline int wsrep_after_row(THD* thd, bool)
static inline int wsrep_after_row_internal(THD* thd)
{
if (thd->wsrep_cs().state() != wsrep::client_state::s_none &&
wsrep_thd_is_local(thd))
Expand Down

0 comments on commit f4ddde0

Please sign in to comment.