MXS-2450: Don't discard history if it's disabled

If the session command history is not enabled, it shouldn't be discarded
when a COM_CHANGE_USER is executed.
This commit is contained in:
Markus Mäkelä
2019-04-23 20:33:28 +03:00
parent 7a5f11b752
commit 07ea6bd9ba
4 changed files with 74 additions and 1 deletions

View File

@ -0,0 +1,20 @@
/**
* MXS-2450: Crash on COM_CHANGE_USER with disable_sescmd_history=true
* https://jira.mariadb.org/browse/MXS-2450
*/
#include "testconnections.h"
int main(int argc, char *argv[])
{
TestConnections test(argc, argv);
Connection conn = test.maxscales->rwsplit();
test.expect(conn.connect(), "Connection failed: %s", conn.error());
for (int i = 0; i < 10; i++)
{
test.expect(conn.reset_connection(), "Connection reset failed: %s", conn.error());
}
return test.global_result;
}