MXS-1506: Use correct buffer

The GWBUF passed to RWBackend::write must be treated as freed memory if
the write succeeds. This means that the original buffer should be stored,
not the clone.
This commit is contained in:
Markus Mäkelä
2018-04-05 16:51:39 +03:00
parent e1e01c029c
commit 4786d88413

View File

@ -961,7 +961,7 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool
{
if (store)
{
set_query(send_buf);
set_query(querybuf);
}
atomic_add_uint64(&m_router->stats().n_queries, 1);