mirror of
https://github.com/sogou/workflow.git
synced 2026-02-08 01:33:17 +08:00
Fix mysql parser.
This commit is contained in:
@@ -206,12 +206,21 @@ static int parse_ok_packet(const void *buf, size_t len, mysql_parser_t *parser)
|
||||
{
|
||||
const unsigned char *tmp_str;
|
||||
unsigned long long tmp_len;
|
||||
|
||||
|
||||
if (decode_string(&str, &info_len, &p, buf_end) == 0)
|
||||
return -2;
|
||||
|
||||
if (decode_string(&tmp_str, &tmp_len, &p, buf_end) == 0)
|
||||
return -2;
|
||||
|
||||
} else if (p != buf_end &&
|
||||
*p != MYSQL_PACKET_HEADER_OK &&
|
||||
*p != MYSQL_PACKET_HEADER_NULL &&
|
||||
*p != MYSQL_PACKET_HEADER_EOF &&
|
||||
*p != MYSQL_PACKET_HEADER_ERROR)
|
||||
{
|
||||
if (decode_string(&str, &info_len, &p, buf_end) == 0)
|
||||
return -2;
|
||||
} else {
|
||||
str = p;
|
||||
info_len = 0;
|
||||
|
||||
Reference in New Issue
Block a user