diff options
author | Daniele Sciascia <daniele.sciascia@galeracluster.com> | 2018-03-09 10:20:19 +0100 |
---|---|---|
committer | Daniele Sciascia <daniele.sciascia@galeracluster.com> | 2018-03-13 11:21:28 +0100 |
commit | 9ee39d2b9b915a837fae966a95a565f3a0cc018b (patch) | |
tree | b099488cd0c647caf71023f8f1ac2dc47e27e864 /sql/handler.cc | |
parent | 8ef727b3d072c13788553f2174fd8bd70481f658 (diff) | |
download | mariadb-git-9ee39d2b9b915a837fae966a95a565f3a0cc018b.tar.gz |
MDEV-13549 Fix for test galera.galera_var_max_ws_rows
This patch re-enables test galera.galera_var_max_ws_rows.
The test did not work because there were two distinct places where
the server was incrementing member THD::wsrep_affected_rows before
enforcing wsrep_max_ws_rows. Essentially, the test would fail because
every inserted row was counted twice.
The patch removes the extra code.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index b2a00e48d65..a570638fc1a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -5769,8 +5769,6 @@ static int write_locked_table_maps(THD *thd) typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*); -static int check_wsrep_max_ws_rows(); - static int binlog_log_row(TABLE* table, const uchar *before_record, const uchar *after_record, @@ -5824,13 +5822,6 @@ static int binlog_log_row(TABLE* table, bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE || table->file->has_transactions(); error= (*log_func)(thd, table, has_trans, before_record, after_record); - - /* - Now that the record has been logged, increment wsrep_affected_rows and - also check whether its within the allowable limits (wsrep_max_ws_rows). - */ - if (error == 0) - error= check_wsrep_max_ws_rows(); } } return error ? HA_ERR_RBR_LOGGING_FAILED : 0; @@ -5941,30 +5932,6 @@ int handler::ha_reset() } -static int check_wsrep_max_ws_rows() -{ -#ifdef WITH_WSREP - if (wsrep_max_ws_rows) - { - THD *thd= current_thd; - - if (!WSREP(thd)) - return 0; - - thd->wsrep_affected_rows++; - if (thd->wsrep_exec_mode != REPL_RECV && - thd->wsrep_affected_rows > wsrep_max_ws_rows) - { - trans_rollback_stmt(thd) || trans_rollback(thd); - my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0)); - return ER_ERROR_DURING_COMMIT; - } - } -#endif /* WITH_WSREP */ - return 0; -} - - int handler::ha_write_row(uchar *buf) { int error; |