mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@ -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.
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user