diff options
Diffstat (limited to 'src/mysqlstat.c')
-rw-r--r-- | src/mysqlstat.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/mysqlstat.c b/src/mysqlstat.c index 2d32137..f599193 100644 --- a/src/mysqlstat.c +++ b/src/mysqlstat.c @@ -1,5 +1,5 @@ /* This file is part of Mysqlstat - * Copyright (C) 2014-2016 Sergey Poznyakoff + * Copyright (C) 2016 Sergey Poznyakoff * * Mysqlstat is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with Mysqlstat. If not, see <http://www.gnu.org/licenses/>. */ - #include <mysqlstat.h> #include <mysql/mysql.h> #undef NDEBUG @@ -133,7 +132,7 @@ get_process_list(struct process_list **p) plist.res = NULL; plist.total = plist.active = plist.slaves = 0; } - DEBUGMSGTL(("mysqlstat", "Getting process list\n")); + DEBUGMSGTL(("mysqlstat:sql", "Getting process list\n")); conn = mysqlstat_connect(); if (!conn) @@ -304,7 +303,7 @@ replSlaveStatusTable_load(netsnmp_cache *cache, void *vmagic) if (!conn) return SNMP_ERR_NOSUCHNAME; - DEBUGMSGTL(("mysqlstat", "Getting slave status\n")); + DEBUGMSGTL(("mysqlstat:sql", "Getting slave status\n")); if (mysql_query(&conn->mysql, "SHOW SLAVE STATUS")) { snmp_log(LOG_ERR, "can't get slave status: %s\n", mysql_error(&conn->mysql)); @@ -469,40 +468,6 @@ process_slave_count(void) } -#if 0 -unsigned replSlaveTable_timeout = CACHE_TIMEOUT; - -static void -replSlaveTable_entry_free(struct replSlaveTable_entry *ent) -{ -} - -int -replSlaveTable_load(netsnmp_cache *cache, void *vmagic) -{ -} - -void -replSlaveTable_free(netsnmp_cache *cache, void *vmagic) -{ - netsnmp_tdata *table = (netsnmp_tdata *) vmagic; - netsnmp_tdata_row *row; - - DEBUGMSGTL(("mysqlstat", "freeing table\n")); - while ((row = netsnmp_tdata_row_first(table))) { - struct replSlaveTable_entry *entry = row->data; - free(ent->replSlaveHost); - free(ent->replSlaveUser); - free(ent->replSlaveCommand); - free(ent->replSlaveState); - free(ent->replSlaveInfo); - SNMP_FREE(ent); - netsnmp_tdata_remove_and_delete_row(table, row); - } -} -#endif - - |