X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fmysql.c;h=7d5eddd17bce73fd85ff84420b27b159569cad43;hb=e30c4b09f2ba06ed279d7ddfdc3714e1b3ab3a06;hp=df1e7b67c66c12a6535fde52db15e4f1a5a9f237;hpb=bfd449eb7f6aaccdd3a9ccd1b816f551563a1ef6;p=collectd.git diff --git a/src/mysql.c b/src/mysql.c index df1e7b67..7d5eddd1 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -38,8 +38,6 @@ #include #endif -/* TODO: Understand `Select_*' and possibly do that stuff as well.. */ - struct mysql_database_s /* {{{ */ { char *instance; @@ -738,6 +736,16 @@ static int mysql_read (user_data_t *ud) else if (strcmp (key, "Innodb_rows_updated") == 0) counter_submit ("mysql_innodb_rows", "updated", val, db); } + else if (strncmp (key, "Select_", strlen ("Select_")) == 0) + { + counter_submit ("mysql_select", key + strlen ("Select_"), + val, db); + } + else if (strncmp (key, "Sort_", strlen ("Sort_")) == 0) + { + counter_submit ("mysql_sort", key + strlen ("Sort_"), + val, db); + } } mysql_free_result (res); res = NULL;