Read correct parameter for causal_reads

The configuration used the wrong parameter name. The test also did not
explicitly enable tracking of the last_gtid variable which caused it to
fail if it wasn't already on.
This commit is contained in:
Markus Mäkelä
2018-07-22 11:35:05 +03:00
parent 823efffb00
commit d7a3980308
4 changed files with 12 additions and 8 deletions

View File

@ -363,9 +363,7 @@ GWBUF* RWSplitSession::handle_causal_read_reply(GWBUF *writebuf, SRWBackend& bac
{
if (GWBUF_IS_REPLY_OK(writebuf) && backend == m_current_master)
{
/** Save gtid position */
char *tmp = gwbuf_get_property(writebuf, MXS_LAST_GTID);
if (tmp)
if (char *tmp = gwbuf_get_property(writebuf, MXS_LAST_GTID))
{
m_gtid_pos = std::string(tmp);
}