diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-01 14:55:46 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-01 14:55:46 +0200 |
commit | 81ab9ea63f5d3ad4909bb75552008d6b035a371b (patch) | |
tree | 6e65113d85d36c9f488da15540ddd601e7641fee /sql/rpl_injector.cc | |
parent | c537576495e1e651bf3dc63e5a569fcddd9fbec8 (diff) | |
parent | e6b3e38d62d13206ae982fc7b740d5d8024b207a (diff) | |
download | mariadb-git-81ab9ea63f5d3ad4909bb75552008d6b035a371b.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'sql/rpl_injector.cc')
-rw-r--r-- | sql/rpl_injector.cc | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index 597a357e4e2..442d28fceb3 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -68,34 +68,34 @@ injector::transaction::~transaction() */ int injector::transaction::commit() { - DBUG_ENTER("injector::transaction::commit()"); - int error= m_thd->binlog_flush_pending_rows_event(true); - /* - Cluster replication does not preserve statement or - transaction boundaries of the master. Instead, a new - transaction on replication slave is started when a new GCI - (global checkpoint identifier) is issued, and is committed - when the last event of the check point has been received and - processed. This ensures consistency of each cluster in - cluster replication, and there is no requirement for stronger - consistency: MySQL replication is asynchronous with other - engines as well. - - A practical consequence of that is that row level replication - stream passed through the injector thread never contains - COMMIT events. - Here we should preserve the server invariant that there is no - outstanding statement transaction when the normal transaction - is committed by committing the statement transaction - explicitly. - */ - trans_commit_stmt(m_thd); - if (!trans_commit(m_thd)) - { - close_thread_tables(m_thd); - m_thd->mdl_context.release_transactional_locks(); - } - DBUG_RETURN(error); + DBUG_ENTER("injector::transaction::commit()"); + int error= m_thd->binlog_flush_pending_rows_event(true); + /* + Cluster replication does not preserve statement or + transaction boundaries of the master. Instead, a new + transaction on replication slave is started when a new GCI + (global checkpoint identifier) is issued, and is committed + when the last event of the check point has been received and + processed. This ensures consistency of each cluster in + cluster replication, and there is no requirement for stronger + consistency: MySQL replication is asynchronous with other + engines as well. + + A practical consequence of that is that row level replication + stream passed through the injector thread never contains + COMMIT events. + Here we should preserve the server invariant that there is no + outstanding statement transaction when the normal transaction + is committed by committing the statement transaction + explicitly. + */ + trans_commit_stmt(m_thd); + if (!trans_commit(m_thd)) + { + close_thread_tables(m_thd); + m_thd->release_transactional_locks(); + } + DBUG_RETURN(error); } |