-#if MYSQL_HAVE_READ
-static void commands_submit (unsigned long long insert,
- unsigned long long select,
- unsigned long long show,
- unsigned long long update,
- unsigned long long other)
+ vl.values = values;
+ vl.values_len = 1;
+ vl.time = time (NULL);
+ strcpy (vl.host, hostname_g);
+ strcpy (vl.plugin, "mysql");
+ strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+
+ plugin_dispatch_values (type, &vl);
+} /* void counter_submit */
+
+static void qcache_submit (counter_t hits, counter_t inserts,
+ counter_t not_cached, counter_t lowmem_prunes,
+ gauge_t queries_in_cache)
+{
+ value_t values[5];
+ value_list_t vl = VALUE_LIST_INIT;
+
+ values[0].counter = hits;
+ values[1].counter = inserts;
+ values[2].counter = not_cached;
+ values[3].counter = lowmem_prunes;
+ values[4].gauge = queries_in_cache;
+
+ vl.values = values;
+ vl.values_len = 5;
+ vl.time = time (NULL);
+ strcpy (vl.host, hostname_g);
+ strcpy (vl.plugin, "mysql");
+
+ plugin_dispatch_values ("mysql_qcache", &vl);
+} /* void qcache_submit */
+
+static void threads_submit (gauge_t running, gauge_t connected, gauge_t cached,
+ counter_t created)