X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmysql.c;h=1048511ce568cb266413519e9c56709ef60092b3;hb=0a73779531039d715e8ca405658c65ba03fad408;hp=f243c5001f912d38c34db31caa4f60130a85e4ed;hpb=5a7145dd5626503f411a4aed87f30fc0f9689c90;p=collectd.git diff --git a/src/mysql.c b/src/mysql.c index f243c500..1048511c 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -363,7 +363,11 @@ static MYSQL *getconnection (mysql_database_t *db) int err; if ((err = mysql_ping (db->con)) != 0) { - WARNING ("mysql_ping failed: %s", mysql_error (db->con)); + WARNING ("mysql_ping failed for %s: %s", + (db->instance != NULL) + ? db->instance + : "", + mysql_error (db->con)); db->state = 0; } else