MXS-1329: Only parse text protocol statements

The query classifier should only be used to parse text protocol
statements. The insertstream filter exploited the fact that any statements
that the filter did not expect would be classified as an unknown
commands. This led to repetitive error messages with binary protocol
statements.
This commit is contained in:
Markus Mäkelä
2017-07-26 22:25:36 +03:00
parent fc81a8097f
commit e26ec4f8b9

View File

@ -574,7 +574,8 @@ static bool extract_insert_target(GWBUF *buffer, char* target, int len)
{
bool rval = false;
if (qc_get_operation(buffer) == QUERY_OP_INSERT &&
if (MYSQL_GET_COMMAND(GWBUF_DATA(buffer)) == MYSQL_COM_QUERY &&
qc_get_operation(buffer) == QUERY_OP_INSERT &&
only_implicit_values(buffer))
{
int n_tables = 0;