Extend KILL parsing test

Added test cases for `KILL [ HARD | SOFT ] [CONNECTION | QUERY ]`.
This commit is contained in:
Markus Mäkelä
2017-09-28 22:00:57 +03:00
parent 49b179bf69
commit 4150dee952
2 changed files with 16 additions and 6 deletions

View File

@ -1798,7 +1798,8 @@ static bool parse_kill_query(char *query, uint64_t *thread_id_out, kill_type_t *
case CONN_QUERY:
if (strncasecmp(token, WORD_QUERY, sizeof(WORD_QUERY) - 1) == 0)
{
kill_type = KT_QUERY;
kill_type &= ~KT_CONNECTION;
kill_type |= KT_QUERY;
get_next = true;
}
else if (strncasecmp(token, WORD_CONNECTION, sizeof(WORD_CONNECTION) - 1) == 0)