Add missing initialization in readwritesplit

A value was not always initialized for all queries when info level logging
was enabled.
This commit is contained in:
Markus Mäkelä
2017-11-15 13:18:35 +02:00
parent e0b8ab0b9c
commit db61ec0d7e

View File

@ -160,8 +160,11 @@ log_transaction_status(RWSplitSession *rses, GWBUF *querybuf, uint32_t qtype)
unsigned char command = packet[4];
int len = 0;
char* sql;
modutil_extract_SQL(querybuf, &sql, &len);
char *qtypestr = qc_typemask_to_string(qtype);
if (!modutil_extract_SQL(querybuf, &sql, &len))
{
sql = (char*)"<non-SQL>";
}
if (len > RWSPLIT_TRACE_MSG_LEN)
{