static int mysql_read (user_data_t *ud);
void mysql_read_default_options(struct st_mysql_options *options,
- const char *filename,const char *group);
+ const char *filename, const char *group);
static void mysql_database_free (void *arg) /* {{{ */
{
MYSQL_RES *res;
MYSQL_ROW row;
- char *query;
- int field_num;
+ const char *query;
+ int field_num;
unsigned long long position;
query = "SHOW MASTER STATUS";
MYSQL_RES *res;
MYSQL_ROW row;
- char *query;
- int field_num;
+ const char *query;
+ int field_num;
/* WTF? libmysqlclient does not seem to provide any means to
* translate a column name to a column index ... :-/ */
MYSQL_RES *res;
MYSQL_ROW row;
- char *query;
+ const char *query;
struct {
- char *key;
- char *type;
+ const char *key;
+ const char *type;
int ds_type;
} metrics[] = {
{ "metadata_mem_pool_size", "bytes", DS_TYPE_GAUGE },
static int mysql_read (user_data_t *ud)
{
mysql_database_t *db;
- MYSQL *con;
- MYSQL_RES *res;
- MYSQL_ROW row;
- char *query;
+ MYSQL *con;
+ MYSQL_RES *res;
+ MYSQL_ROW row;
+ const char *query;
derive_t qcache_hits = 0;
derive_t qcache_inserts = 0;