diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-26 19:21:19 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-26 19:21:19 +0200 |
commit | f42e08f951642850b1b9e3c2858325d21b260223 (patch) | |
tree | 672195393e56b4e12b4802ad042e957ef46fde7c /sql | |
parent | 8c35f105d24a71fb34b83e38ed57ed02338be415 (diff) | |
parent | 0e3170e30d2a4e8f1ed6fd4bbe935355f7370a34 (diff) | |
download | mariadb-git-f42e08f951642850b1b9e3c2858325d21b260223.tar.gz |
Merge branch '10.0-galera' into 10.1
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 14 | ||||
-rw-r--r-- | sql/log_event.cc | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 490b9d8c99a..aa87da5dd44 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -5747,6 +5747,20 @@ static int binlog_log_row(TABLE* table, table->file->partition_ht()->db_type != DB_TYPE_INNODB) || (thd->wsrep_ignore_table == true)) return 0; + + /* enforce wsrep_max_ws_rows */ + if (WSREP(thd) && table->s->tmp_table == NO_TMP_TABLE) + { + thd->wsrep_affected_rows++; + if (wsrep_max_ws_rows && + 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 */ if (check_table_binlog_row_based(thd, table)) diff --git a/sql/log_event.cc b/sql/log_event.cc index bae723402e7..f098664b1ba 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7587,7 +7587,6 @@ int Xid_log_event::do_apply_event(rpl_group_info *rgi) consistent. */ #ifdef WITH_WSREP - /*Set wsrep_affected_rows = 0 */ thd->wsrep_affected_rows= 0; #endif |