summaryrefslogtreecommitdiff
path: root/sql/wsrep_client_service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_client_service.cc')
-rw-r--r--sql/wsrep_client_service.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/wsrep_client_service.cc b/sql/wsrep_client_service.cc
index 5f73f9f714f..20bb7748a95 100644
--- a/sql/wsrep_client_service.cc
+++ b/sql/wsrep_client_service.cc
@@ -138,7 +138,8 @@ void Wsrep_client_service::cleanup_transaction()
}
-int Wsrep_client_service::prepare_fragment_for_replication(wsrep::mutable_buffer& buffer)
+int Wsrep_client_service::prepare_fragment_for_replication(
+ wsrep::mutable_buffer& buffer, size_t& log_position)
{
DBUG_ASSERT(m_thd == current_thd);
THD* thd= m_thd;
@@ -152,7 +153,7 @@ int Wsrep_client_service::prepare_fragment_for_replication(wsrep::mutable_buffer
}
const my_off_t saved_pos(my_b_tell(cache));
- if (reinit_io_cache(cache, READ_CACHE, thd->wsrep_sr().bytes_certified(), 0, 0))
+ if (reinit_io_cache(cache, READ_CACHE, thd->wsrep_sr().log_position(), 0, 0))
{
DBUG_RETURN(1);
}
@@ -186,6 +187,7 @@ int Wsrep_client_service::prepare_fragment_for_replication(wsrep::mutable_buffer
while (cache->file >= 0 && (length= my_b_fill(cache)));
}
DBUG_ASSERT(total_length == buffer.size());
+ log_position= saved_pos;
cleanup:
if (reinit_io_cache(cache, WRITE_CACHE, saved_pos, 0, 0))
{