From d04c883b1114f903022e8d772bc2c21db9af329a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 23 Apr 2009 09:35:46 +0200 Subject: [PATCH] mysql plugin: Use `strlen ("Table_locks_")' rather than `12'. --- src/mysql.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mysql.c b/src/mysql.c index ca364b6c..b700ff02 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -794,12 +794,12 @@ static int mysql_read (user_data_t *ud) else if (strcmp (key, "Threads_created") == 0) threads_created = val; } - else if (strncmp (key, "Table_locks_", 12) == 0) + else if (strncmp (key, "Table_locks_", + strlen ("Table_locks_")) == 0) { - if (val == 0ULL) - continue; - - counter_submit ("mysql_locks", key + 12, val, db); + counter_submit ("mysql_locks", + key + strlen ("Table_locks_"), + val, db); } } mysql_free_result (res); res = NULL; -- 2.11.0