projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f40ae90
)
mysql plugin: Use `strlen ("Table_locks_")' rather than `12'.
author
Florian Forster
<octo@huhu.verplant.org>
Thu, 23 Apr 2009 07:35:46 +0000
(09:35 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Thu, 23 Apr 2009 07:35:46 +0000
(09:35 +0200)
src/mysql.c
patch
|
blob
|
history
diff --git
a/src/mysql.c
b/src/mysql.c
index
ca364b6
..
b700ff0
100644
(file)
--- 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;