-#if COLLECT_LIBMYSQL
-# define MYSQL_HAVE_READ 1
-#else
-# define MYSQL_HAVE_READ 0
-#endif
-
-#define BUFSIZE 512
-
-static char *host = "localhost";
-static char *user;
-static char *pass;
-static char *db = NULL;
-
-/* TODO
- * understand `Select_*' and possibly do that stuff as well..
- */
-
-static char *commands_file = "mysql/mysql_commands-%s.rrd";
-static char *handler_file = "mysql/mysql_handler-%s.rrd";
-static char *qcache_file = "mysql/mysql_qcache.rrd";
-static char *threads_file = "mysql/mysql_threads.rrd";
-static char *traffic_file = "traffic-mysql.rrd";
-
-static char *commands_ds_def[] =
-{
- "DS:value:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- NULL
-};
-static int commands_ds_num = 1;
-
-static char *handler_ds_def[] =
-{
- "DS:value:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- NULL
-};
-static int handler_ds_num = 1;
-
-static char *qcache_ds_def[] =
-{
- "DS:hits:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- "DS:inserts:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- "DS:not_cached:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- "DS:lowmem_prunes:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- "DS:queries_in_cache:GAUGE:"COLLECTD_HEARTBEAT":0:U",
- NULL
-};
-static int qcache_ds_num = 5;
-
-static char *threads_ds_def[] =
-{
- "DS:running:GAUGE:"COLLECTD_HEARTBEAT":0:U",
- "DS:connected:GAUGE:"COLLECTD_HEARTBEAT":0:U",
- "DS:cached:GAUGE:"COLLECTD_HEARTBEAT":0:U",
- "DS:created:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- NULL
-};
-static int threads_ds_num = 4;
-
-static char *traffic_ds_def[] =
-{
- "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:U",
- NULL
-};
-static int traffic_ds_num = 2;
-
-static char *config_keys[] =