Skip to content

Commit 66fa355

Browse files
committed
Add ddst_dict_init api support for rocksdb dd
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 5fdafcc commit 66fa355

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

storage/rocksdb/ha_rocksdb.cc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include "sql/dd/dictionary.h" // dd::Dictionary
5757
#include "sql/debug_sync.h"
5858
#include "sql/json_dom.h"
59+
#include "sql/plugin_table.h"
5960
#include "sql/sql_audit.h"
6061
#include "sql/sql_class.h"
6162
#include "sql/sql_lex.h"
@@ -3257,6 +3258,11 @@ std::string dump_ingest_external_file_options(
32573258
return s.str();
32583259
}
32593260

3261+
static bool rocksdb_ddse_dict_init(dict_init_mode_t dict_init_mode,
3262+
uint version,
3263+
List<const dd::Object_table> *tables,
3264+
List<const Plugin_tablespace> *tablespaces);
3265+
32603266
/*
32613267
Very short (functor-like) interface to be passed to
32623268
Rdb_transaction::walk_tx_list()
@@ -7432,6 +7438,8 @@ static int rocksdb_init_internal(void *const p) {
74327438
rocksdb_hton->clone_interface.clone_apply = rocksdb_clone_apply;
74337439
rocksdb_hton->clone_interface.clone_apply_end = rocksdb_clone_apply_end;
74347440

7441+
rocksdb_hton->ddse_dict_init = rocksdb_ddse_dict_init;
7442+
74357443
rocksdb_hton->flags = HTON_SUPPORTS_EXTENDED_KEYS | HTON_CAN_RECREATE;
74367444

74377445
rocksdb_hton->partition_flags = rocksdb_partition_flags;
@@ -19020,6 +19028,22 @@ static bool parse_fault_injection_params(
1902019028
return false;
1902119029
}
1902219030

19031+
static bool rocksdb_ddse_dict_init(
19032+
dict_init_mode_t dict_init_mode, [[maybe_unused]] uint version,
19033+
[[maybe_unused]] List<const dd::Object_table> *tables,
19034+
List<const Plugin_tablespace> *tablespaces) {
19035+
assert(tables && tables->is_empty());
19036+
assert(tablespaces && tablespaces->is_empty());
19037+
19038+
assert(dict_init_mode == DICT_INIT_CREATE_FILES ||
19039+
dict_init_mode == DICT_INIT_CHECK_FILES);
19040+
19041+
static Plugin_tablespace dd_space("mysql", "", "", "", rocksdb_hton_name);
19042+
tablespaces->push_back(&dd_space);
19043+
19044+
return false;
19045+
}
19046+
1902319047
} // namespace myrocks
1902419048

1902519049
/*

0 commit comments

Comments
 (0)