Merge pull request #313 from tiwilliam/master
[collectd.git] / src / mysql.c
index 8b660a3..a6b1e5e 100644 (file)
@@ -304,6 +304,7 @@ static void set_host (mysql_database_t *db, char *buf, size_t buflen)
                sstrncpy (buf, db->alias, buflen);
        else if ((db->host == NULL)
                        || (strcmp ("", db->host) == 0)
+                       || (strcmp ("127.0.0.1", db->host) == 0)
                        || (strcmp ("localhost", db->host) == 0))
                sstrncpy (buf, hostname_g, buflen);
        else
@@ -551,7 +552,7 @@ static int mysql_read_slave_stats (mysql_database_t *db, MYSQL *con)
                        ssnprintf (n.message, sizeof (n.message),
                                        "slave SQL thread started");
                        plugin_dispatch_notification (&n);
-                       db->slave_sql_running = 0;
+                       db->slave_sql_running = 1;
                }
        }