sammler/plugins/mysql_helper.h

36 lines
824 B
C
Raw Normal View History

2007-04-01 14:56:14 +02:00
#ifndef _MYSQL_HELPER_H_
#define _MYSQL_HELPER_H_
2006-10-08 01:58:01 +02:00
#include <stdint.h>
struct mysql_stats {
uint64_t bytes_received;
uint64_t bytes_sent;
uint64_t com_delete;
uint64_t com_insert;
uint64_t com_select;
uint64_t com_update;
uint64_t connections;
uint64_t qc_free_blocks;
uint64_t qc_free_memory;
uint64_t qc_hits;
uint64_t qc_inserts;
uint64_t qc_lowmem_prunes;
2006-10-09 14:40:38 +02:00
uint64_t qc_not_cached;
2006-10-08 01:58:01 +02:00
uint64_t qc_queries_in_cache;
uint64_t qc_total_blocks;
uint64_t questions;
uint64_t threads_cached;
uint64_t threads_connected;
uint64_t threads_created;
uint64_t threads_running;
};
2007-03-31 22:31:07 +02:00
void * init_connection(const char *host, const char *user, const char *pass);
2006-10-08 01:58:01 +02:00
int ping_connection(void *mysql);
2006-10-08 16:33:07 +02:00
int close_connection(void *mysql);
2006-10-08 01:58:01 +02:00
int get_stats(void *mysql, struct mysql_stats *stats);
2007-04-01 14:56:14 +02:00
#endif /* _MYSQL_HELPER_H_ */