Skip to content

Commit

Permalink
feat(StoneDB 8.0): 'bool partitioned' parameter is added by MySQL 8.0…
Browse files Browse the repository at this point in the history
… in handlerton->create function. (stoneatom#596)

[summary]
1  Add 'bool m_partioned' in tianmu engine's handler to indicate the parameter;
  • Loading branch information
lujiashun committed Sep 29, 2022
1 parent 8abd533 commit 367196e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion storage/tianmu/handler/tianmu_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ static core::Value GetValueFromField(Field *f) {
return v;
}

TianmuHandler::TianmuHandler(handlerton *hton, TABLE_SHARE *table_arg) : handler(hton, table_arg) {
TianmuHandler::TianmuHandler(handlerton *hton, TABLE_SHARE *table_arg, bool partitioned)
: handler(hton, table_arg), m_partitioned(partitioned) {
ref_length = sizeof(uint64_t);
}

Expand Down
3 changes: 2 additions & 1 deletion storage/tianmu/handler/tianmu_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace dbhandler {
// Class definition for the storage engine
class TianmuHandler final : public handler {
public:
TianmuHandler(handlerton *hton, TABLE_SHARE *table_arg);
TianmuHandler(handlerton *hton, TABLE_SHARE *table_arg, bool partitioned);
virtual ~TianmuHandler() = default;
/* The name that will be used for display purposes */
const char *table_type() const override { return "TIANMU"; }
Expand Down Expand Up @@ -188,6 +188,7 @@ class TianmuHandler final : public handler {
std::unique_ptr<core::CompiledQuery> m_cq;
bool m_result = false;
std::vector<std::vector<uchar>> blob_buffers;
bool m_partitioned = false;
};

} // namespace dbhandler
Expand Down
5 changes: 2 additions & 3 deletions storage/tianmu/handler/tianmu_handler_com.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ static int rcbase_done_func([[maybe_unused]] void *p) {
DBUG_RETURN(0);
}

handler *rcbase_create_handler(handlerton *hton, TABLE_SHARE *table, bool partitioned,
MEM_ROOT *mem_root) { // stonedb8 TODO
return new (mem_root) TianmuHandler(hton, table);
handler *rcbase_create_handler(handlerton *hton, TABLE_SHARE *table, bool partitioned, MEM_ROOT *mem_root) {
return new (mem_root) TianmuHandler(hton, table, partitioned);
}

int rcbase_panic_func([[maybe_unused]] handlerton *hton, enum ha_panic_function flag) {
Expand Down

0 comments on commit 367196e

Please sign in to comment.