diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-12-13 18:24:51 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-12-13 18:24:51 +0200 |
commit | b7914f562da0d4bce7c1c26b119e7063594be974 (patch) | |
tree | df85f229a896cf3e6b24ebc34063b078774b3834 /storage/rocksdb | |
parent | 21ef68d52e13ec146dab6cf54e0d3eca87306d58 (diff) | |
parent | d7a4ce3c804334914b2431e91d6328945dce6b02 (diff) | |
download | mariadb-git-b7914f562da0d4bce7c1c26b119e7063594be974.tar.gz |
Merge 10.8 into 10.9
Diffstat (limited to 'storage/rocksdb')
-rw-r--r-- | storage/rocksdb/ha_rocksdb.cc | 21 |
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}}; /* |