Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-04-13 14:53:00 +03:00
19 changed files with 457 additions and 80 deletions

View File

@ -607,7 +607,7 @@ private:
if (m_pI != m_pEnd)
{
MXS_WARNING("Non-space data found after semi-colon: '%.*s'.",
MXS_INFO("Non-space data found after semi-colon: '%.*s'.",
(int)(m_pEnd - m_pI), m_pI);
}

View File

@ -1071,6 +1071,21 @@ int modutil_count_statements(GWBUF* buffer)
return num;
}
int modutil_count_packets(GWBUF* buffer)
{
int packets = 0;
size_t offset = 0;
uint8_t len[3];
while (gwbuf_copy_data(buffer, offset, 3, len) == 3)
{
++packets;
offset += gw_mysql_get_byte3(len) + MYSQL_HEADER_LEN;
}
return packets;
}
/**
* Initialize the PCRE2 patterns used when converting MySQL wildcards to PCRE syntax.
*/

View File

@ -941,7 +941,7 @@ uint32_t QueryClassifier::get_target_type(QueryClassifier::current_target_t curr
route_target = get_route_target(*command, *type, buffer->hint);
}
}
else
else if (load_data_state() == QueryClassifier::LOAD_DATA_ACTIVE)
{
/** Empty packet signals end of LOAD DATA LOCAL INFILE, send it to master*/
set_load_data_state(QueryClassifier::LOAD_DATA_END);