19
19
#include "config.h"
20
20
#include "drizzled/plugin/table_function.h"
22
#if defined(HAVE_HAILDB_H)
25
# include <embedded_innodb-1.0/innodb.h>
26
#endif /* HAVE_HAILDB_H */
24
28
#include "status_table_function.h"
62
static const char* libinnodb_status_var_names[] = {
69
"bytes_total_written",
72
"buffer_pool_current_size",
73
"buffer_pool_data_pages",
74
"buffer_pool_dirty_pages",
75
"buffer_pool_misc_pages",
76
"buffer_pool_free_pages",
77
"buffer_pool_read_reqs",
79
"buffer_pool_waited_for_free",
80
"buffer_pool_pages_flushed",
81
"buffer_pool_write_reqs",
82
"buffer_pool_total_pages",
83
"buffer_pool_pages_read",
84
"buffer_pool_pages_written",
86
"double_write_pages_written",
87
"double_write_invoked",
89
"log_buffer_slot_waits",
91
"log_write_flush_count",
94
"log_write_req_pending",
95
"log_fsync_req_pending",
99
"lock_total_wait_time_in_secs",
100
"lock_wait_time_avg_in_secs",
101
"lock_max_wait_time_in_secs",
104
"row_total_inserted",
109
"have_atomic_builtins",
60
113
LibInnoDBStatusTool::LibInnoDBStatusTool() :
61
114
plugin::TableFunction("DATA_DICTIONARY", "HAILDB_STATUS")
68
121
plugin::TableFunction::Generator(arg),
71
ib_err_t err= ib_status_get_all(&names, &names_count);
72
assert(err == DB_SUCCESS);
75
126
LibInnoDBStatusTool::Generator::~Generator()
80
130
bool LibInnoDBStatusTool::Generator::populate()
82
if (names[names_next] != NULL)
132
if (libinnodb_status_var_names[names_next] != NULL)
84
const char* config_name= names[names_next];
134
const char* config_name= libinnodb_status_var_names[names_next];
86
136
push(config_name);