MXS-2007: Check for no rows
If the query returns no rows, a NULL row is returned.
This commit is contained in:
parent
66061be58b
commit
f499b22a9e
@ -71,7 +71,7 @@ void update_server_status(MXS_MONITOR *monitor, MXS_MONITORED_SERVER *database)
|
||||
int status = SERVER_SLAVE;
|
||||
|
||||
/** The master will return a row with two identical non-NULL fields */
|
||||
if (row[0] && row[1] && strcmp(row[0], row[1]) == 0)
|
||||
if (row && row[0] && row[1] && strcmp(row[0], row[1]) == 0)
|
||||
{
|
||||
status = SERVER_MASTER;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user