summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorDaniele Sciascia <daniele.sciascia@galeracluster.com>2016-05-03 16:22:01 +0200
committerNirbhay Choubey <nirbhay@mariadb.com>2016-07-19 21:06:42 -0400
commit3db92ee43358f5df256bf1b0db4955ec86bdceee (patch)
tree4debaae28328b7a98c97a527818771125c84c28b /sql/sql_class.cc
parent10880d67b95d29dc1a764f2ee5c2010dc89659df (diff)
downloadmariadb-git-3db92ee43358f5df256bf1b0db4955ec86bdceee.tar.gz
MW-265 Add support for wsrep_max_ws_rows
Variable wsrep_max_ws_rows limits the number of rows that a transaction can insert/update/delete.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 5705694208a..4873586aba5 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1213,7 +1213,8 @@ THD::THD()
wsrep_mysql_replicated = 0;
wsrep_TOI_pre_query = NULL;
wsrep_TOI_pre_query_len = 0;
- wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
+ wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
+ wsrep_affected_rows = 0;
#endif
/* Call to init() below requires fully initialized Open_tables_state. */
reset_open_tables_state(this);
@@ -1629,7 +1630,8 @@ void THD::init(void)
wsrep_mysql_replicated = 0;
wsrep_TOI_pre_query = NULL;
wsrep_TOI_pre_query_len = 0;
- wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
+ wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
+ wsrep_affected_rows = 0;
/*
@@wsrep_causal_reads is now being handled via wsrep_sync_wait, update it
@@ -2383,6 +2385,8 @@ void THD::cleanup_after_query()
#ifdef WITH_WSREP
wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
+ if (!in_active_multi_stmt_transaction())
+ wsrep_affected_rows= 0;
#endif /* WITH_WSREP */
DBUG_VOID_RETURN;