summaryrefslogtreecommitdiff
path: root/storage/rocksdb/ha_rocksdb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/rocksdb/ha_rocksdb.cc')
-rw-r--r--storage/rocksdb/ha_rocksdb.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 8a125e3d57d..9024e825862 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -13152,7 +13152,9 @@ bool ha_rocksdb::commit_inplace_alter_table(
#define SHOW_FNAME(name) rocksdb_show_##name
#define DEF_SHOW_FUNC(name, key) \
- static int SHOW_FNAME(name)(MYSQL_THD thd, SHOW_VAR * var, char *buff) { \
+ static int SHOW_FNAME(name)(MYSQL_THD thd, SHOW_VAR * var, void *buff, \
+ struct system_status_var *status_var, \
+ enum enum_var_type var_type) { \
rocksdb_status_counters.name = \
rocksdb_stats->getTickerCount(rocksdb::key); \
var->type = SHOW_LONGLONG; \
@@ -13161,7 +13163,7 @@ bool ha_rocksdb::commit_inplace_alter_table(
}
#define DEF_STATUS_VAR(name) \
- { "rocksdb_" #name, (char *)&SHOW_FNAME(name), SHOW_FUNC }
+ SHOW_FUNC_ENTRY( "rocksdb_" #name, &SHOW_FNAME(name))
#define DEF_STATUS_VAR_PTR(name, ptr, option) \
{ "rocksdb_" name, (char *)ptr, option }
@@ -13389,11 +13391,14 @@ static SHOW_VAR myrocks_status_variables[] = {
{NullS, NullS, SHOW_LONG}};
-static void show_myrocks_vars(THD *thd, SHOW_VAR *var, char *buff) {
+static int show_myrocks_vars(THD *thd, SHOW_VAR *var, void *buff,
+ struct system_status_var *,
+ enum enum_var_type) {
myrocks_update_status();
myrocks_update_memory_status();
var->type = SHOW_ARRAY;
var->value = reinterpret_cast<char *>(&myrocks_status_variables);
+ return 0;
}
static ulonglong io_stall_prop_value(
@@ -13474,10 +13479,13 @@ static SHOW_VAR rocksdb_stall_status_variables[] = {
// end of the array marker
{NullS, NullS, SHOW_LONG}};
-static void show_rocksdb_stall_vars(THD *thd, SHOW_VAR *var, char *buff) {
+static int show_rocksdb_stall_vars(THD *thd, SHOW_VAR *var, void *buff,
+ struct system_status_var *,
+ enum enum_var_type) {
update_rocksdb_stall_status();
var->type = SHOW_ARRAY;
var->value = reinterpret_cast<char *>(&rocksdb_stall_status_variables);
+ return 0;
}
static SHOW_VAR rocksdb_status_vars[] = {
@@ -13582,9 +13590,8 @@ static SHOW_VAR rocksdb_status_vars[] = {
// the variables generated by SHOW_FUNC are sorted only by prefix (first
// arg in the tuple below), so make sure it is unique to make sorting
// deterministic as quick sort is not stable
- {"rocksdb", reinterpret_cast<char *>(&show_myrocks_vars), SHOW_FUNC},
- {"rocksdb_stall", reinterpret_cast<char *>(&show_rocksdb_stall_vars),
- SHOW_FUNC},
+ SHOW_FUNC_ENTRY("rocksdb", &show_myrocks_vars),
+ SHOW_FUNC_ENTRY("rocksdb_stall", &show_rocksdb_stall_vars),
{NullS, NullS, SHOW_LONG}};
/*