MXS-1502: Prune session commands

The session command history is now compacted to contain only the first and
last execution of a session command. This should still allow most of the
more eccentric use-cases of user variables while keeping the session
command history smaller.

Added some convenience functions into the SessionCommand class to make the
pruning process easier.
This commit is contained in:
Markus Mäkelä
2018-03-28 15:20:28 +03:00
parent ce853d3f7f
commit e57ac4b0a3
4 changed files with 97 additions and 5 deletions

View File

@ -123,7 +123,7 @@ bool Backend::execute_session_command()
void Backend::append_session_command(GWBUF* buffer, uint64_t sequence)
{
m_session_commands.push_back(SSessionCommand(new SessionCommand(buffer, sequence)));
append_session_command(SSessionCommand(new SessionCommand(buffer, sequence)));
}
void Backend::append_session_command(const SSessionCommand& sescmd)