You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
chore(codestyle): mark virtual methods as override
This commit is contained in:
committed by
Leonid Fedorov
parent
ad80ab40aa
commit
0ab03c7258
@ -58,9 +58,7 @@ class ha_mcs : public handler
|
||||
|
||||
public:
|
||||
ha_mcs(handlerton* hton, TABLE_SHARE* table_arg);
|
||||
virtual ~ha_mcs()
|
||||
{
|
||||
}
|
||||
virtual ~ha_mcs() = default;
|
||||
|
||||
/** @brief
|
||||
The name that will be used for display purposes.
|
||||
@ -121,22 +119,22 @@ class ha_mcs : public handler
|
||||
/** @brief
|
||||
Called in test_quick_select to determine if indexes should be used.
|
||||
*/
|
||||
virtual IO_AND_CPU_COST scan_time() override
|
||||
{
|
||||
IO_AND_CPU_COST cost;
|
||||
cost.io= 0.0;
|
||||
/*
|
||||
For now, assume all cost is CPU cost.
|
||||
The numbers are also very inadequate for the new cost model.
|
||||
*/
|
||||
cost.cpu= (double)(stats.records + stats.deleted) / 20.0 + 10;
|
||||
return cost;
|
||||
}
|
||||
virtual IO_AND_CPU_COST scan_time() override
|
||||
{
|
||||
IO_AND_CPU_COST cost;
|
||||
cost.io = 0.0;
|
||||
/*
|
||||
For now, assume all cost is CPU cost.
|
||||
The numbers are also very inadequate for the new cost model.
|
||||
*/
|
||||
cost.cpu = (double)(stats.records + stats.deleted) / 20.0 + 10;
|
||||
return cost;
|
||||
}
|
||||
#else
|
||||
/** @brief
|
||||
Called in test_quick_select to determine if indexes should be used.
|
||||
*/
|
||||
virtual double scan_time() override
|
||||
double scan_time() override
|
||||
{
|
||||
return (double)(stats.records + stats.deleted) / 20.0 + 10;
|
||||
}
|
||||
@ -324,7 +322,7 @@ class ha_mcs_cache : public ha_mcs
|
||||
ha_mcs_cache_share* share;
|
||||
|
||||
ha_mcs_cache(handlerton* hton, TABLE_SHARE* table_arg, MEM_ROOT* mem_root);
|
||||
~ha_mcs_cache();
|
||||
~ha_mcs_cache() override;
|
||||
|
||||
/*
|
||||
The following functions duplicates calls to derived handler and
|
||||
|
@ -113,7 +113,7 @@ class StoreFieldMariaDB : public StoreField
|
||||
return m_field->store(static_cast<int64_t>(val), 1);
|
||||
}
|
||||
|
||||
int store_float(float dl) override
|
||||
int store_float(float dl)
|
||||
{
|
||||
if (dl == std::numeric_limits<float>::infinity())
|
||||
{
|
||||
@ -128,7 +128,7 @@ class StoreFieldMariaDB : public StoreField
|
||||
return m_field->store(dl);
|
||||
}
|
||||
|
||||
int store_double(double dl) override
|
||||
int store_double(double dl)
|
||||
{
|
||||
if (dl == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
@ -461,11 +461,9 @@ class WriteBatchFieldMariaDB : public WriteBatchField
|
||||
}
|
||||
else
|
||||
{
|
||||
int32_t tmp = (
|
||||
(*const_cast<uint8_t*>(buf) << 8) |
|
||||
(*const_cast<uint8_t*>(buf+1) << 16) |
|
||||
(*const_cast<uint8_t*>(buf+2) << 24)
|
||||
) >> 8;
|
||||
int32_t tmp = ((*const_cast<uint8_t*>(buf) << 8) | (*const_cast<uint8_t*>(buf + 1) << 16) |
|
||||
(*const_cast<uint8_t*>(buf + 2) << 24)) >>
|
||||
8;
|
||||
fprintf(ci.filePtr(), "%d%c", tmp, ci.delimiter());
|
||||
}
|
||||
return 3;
|
||||
@ -477,11 +475,8 @@ class WriteBatchFieldMariaDB : public WriteBatchField
|
||||
fprintf(ci.filePtr(), "%c", ci.delimiter());
|
||||
else
|
||||
{
|
||||
uint32_t tmp = (
|
||||
(*const_cast<uint8_t*>(buf)) |
|
||||
(*const_cast<uint8_t*>(buf+1) << 8) |
|
||||
(*const_cast<uint8_t*>(buf+2) << 16)
|
||||
);
|
||||
uint32_t tmp = ((*const_cast<uint8_t*>(buf)) | (*const_cast<uint8_t*>(buf + 1) << 8) |
|
||||
(*const_cast<uint8_t*>(buf + 2) << 16));
|
||||
fprintf(ci.filePtr(), "%u%c", tmp, ci.delimiter());
|
||||
}
|
||||
return 3;
|
||||
|
@ -205,14 +205,14 @@ struct gp_walk_info
|
||||
, internalDecimalScale(4)
|
||||
, thd(0)
|
||||
, subSelectType(uint64_t(-1))
|
||||
, subQuery(0)
|
||||
, subQuery(nullptr)
|
||||
, clauseType(INIT)
|
||||
, implicitExplicitGroupBy(false)
|
||||
, disableWrapping(false)
|
||||
, aggOnSelect(false)
|
||||
, hasWindowFunc(false)
|
||||
, hasSubSelect(false)
|
||||
, lastSub(0)
|
||||
, lastSub(nullptr)
|
||||
, derivedTbCnt(0)
|
||||
, recursionLevel(-1)
|
||||
, recursionHWM(0)
|
||||
@ -277,9 +277,7 @@ struct cal_group_info
|
||||
, groupByDistinct(false)
|
||||
{
|
||||
}
|
||||
~cal_group_info()
|
||||
{
|
||||
}
|
||||
~cal_group_info() = default;
|
||||
|
||||
List<Item>* groupByFields; // MCOL-1052 SELECT
|
||||
TABLE_LIST* groupByTables; // MCOL-1052 FROM
|
||||
@ -303,7 +301,7 @@ struct cal_connection_info
|
||||
ALTER_FIRST_RENAME
|
||||
};
|
||||
cal_connection_info()
|
||||
: cal_conn_hndl(0)
|
||||
: cal_conn_hndl(nullptr)
|
||||
, queryState(0)
|
||||
, currentTable(0)
|
||||
, traceFlags(0)
|
||||
@ -313,7 +311,7 @@ struct cal_connection_info
|
||||
, singleInsert(true)
|
||||
, isLoaddataInfile(false)
|
||||
, isCacheInsert(false)
|
||||
, dmlProc(0)
|
||||
, dmlProc(nullptr)
|
||||
, rowsHaveInserted(0)
|
||||
, rc(0)
|
||||
, tableOid(0)
|
||||
@ -322,7 +320,7 @@ struct cal_connection_info
|
||||
, expressionId(0)
|
||||
, mysqld_pid(getpid())
|
||||
, cpimport_pid(0)
|
||||
, filePtr(0)
|
||||
, filePtr(nullptr)
|
||||
, headerLength(0)
|
||||
, useXbit(false)
|
||||
, useCpimport(mcs_use_import_for_batchinsert_mode_t::ON)
|
||||
@ -429,7 +427,7 @@ void setError(THD* thd, uint32_t errcode, const std::string errmsg);
|
||||
void gp_walk(const Item* item, void* arg);
|
||||
void clearDeleteStacks(gp_walk_info& gwi);
|
||||
void parse_item(Item* item, std::vector<Item_field*>& field_vec, bool& hasNonSupportItem, uint16& parseInfo,
|
||||
gp_walk_info* gwip = NULL);
|
||||
gp_walk_info* gwip = nullptr);
|
||||
const std::string bestTableName(const Item_field* ifp);
|
||||
bool isMCSTable(TABLE* table_ptr);
|
||||
bool isForeignTableUpdate(THD* thd);
|
||||
|
@ -38,10 +38,10 @@ enum mcs_handler_types_t
|
||||
|
||||
struct mcs_handler_info
|
||||
{
|
||||
mcs_handler_info() : hndl_ptr(NULL), hndl_type(LEGACY){};
|
||||
mcs_handler_info(mcs_handler_types_t type) : hndl_ptr(NULL), hndl_type(type){};
|
||||
mcs_handler_info() : hndl_ptr(nullptr), hndl_type(LEGACY){};
|
||||
mcs_handler_info(mcs_handler_types_t type) : hndl_ptr(nullptr), hndl_type(type){};
|
||||
mcs_handler_info(void* ptr, mcs_handler_types_t type) : hndl_ptr(ptr), hndl_type(type){};
|
||||
~mcs_handler_info(){};
|
||||
~mcs_handler_info() = default;
|
||||
void* hndl_ptr;
|
||||
mcs_handler_types_t hndl_type;
|
||||
};
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#undef LOG_INFO
|
||||
// #undef LOG_INFO
|
||||
#include <my_config.h>
|
||||
#include "idb_mysql.h"
|
||||
#include "ha_mcs_impl_if.h"
|
||||
@ -48,9 +48,7 @@ class SubQuery
|
||||
next = *gwip.subQueriesChain;
|
||||
*gwip.subQueriesChain = this;
|
||||
}
|
||||
virtual ~SubQuery()
|
||||
{
|
||||
}
|
||||
virtual ~SubQuery() = default;
|
||||
virtual gp_walk_info& gwip() const
|
||||
{
|
||||
return fGwip;
|
||||
@ -111,9 +109,7 @@ class WhereSubQuery : public SubQuery
|
||||
WhereSubQuery(gp_walk_info& gwip, Item_subselect* sub) : SubQuery(gwip), fSub(sub)
|
||||
{
|
||||
} // for exists
|
||||
virtual ~WhereSubQuery()
|
||||
{
|
||||
}
|
||||
~WhereSubQuery() override = default;
|
||||
|
||||
/** Accessors and mutators */
|
||||
virtual Item_subselect* sub() const
|
||||
@ -150,8 +146,8 @@ class ScalarSub : public WhereSubQuery
|
||||
ScalarSub(gp_walk_info& gwip, Item_func* func);
|
||||
ScalarSub(gp_walk_info& gwip, const execplan::SRCP& column, Item_subselect* sub, Item_func* func);
|
||||
ScalarSub(const ScalarSub& rhs);
|
||||
~ScalarSub();
|
||||
execplan::ParseTree* transform();
|
||||
~ScalarSub() override;
|
||||
execplan::ParseTree* transform() override;
|
||||
execplan::ParseTree* transform_between();
|
||||
execplan::ParseTree* transform_in();
|
||||
execplan::ParseTree* buildParseTree(execplan::PredicateOperator* op);
|
||||
@ -177,10 +173,10 @@ class InSub : public WhereSubQuery
|
||||
InSub(gp_walk_info& gwip);
|
||||
InSub(gp_walk_info& gwip, Item_func* func);
|
||||
InSub(const InSub& rhs);
|
||||
~InSub();
|
||||
execplan::ParseTree* transform();
|
||||
~InSub() override;
|
||||
execplan::ParseTree* transform() override;
|
||||
void handleFunc(gp_walk_info* gwip, Item_func* func);
|
||||
void handleNot();
|
||||
void handleNot() override;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -191,9 +187,9 @@ class ExistsSub : public WhereSubQuery
|
||||
public:
|
||||
ExistsSub(gp_walk_info&); // not complete. just for compile
|
||||
ExistsSub(gp_walk_info&, Item_subselect* sub);
|
||||
~ExistsSub();
|
||||
execplan::ParseTree* transform();
|
||||
void handleNot();
|
||||
~ExistsSub() override;
|
||||
execplan::ParseTree* transform() override;
|
||||
void handleNot() override;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -211,7 +207,7 @@ class FromSubQuery : public SubQuery
|
||||
public:
|
||||
FromSubQuery(gp_walk_info&);
|
||||
FromSubQuery(gp_walk_info&, SELECT_LEX* fromSub);
|
||||
~FromSubQuery();
|
||||
~FromSubQuery() override;
|
||||
const SELECT_LEX* fromSub() const
|
||||
{
|
||||
return fFromSub;
|
||||
@ -240,7 +236,7 @@ class SelectSubQuery : public SubQuery
|
||||
public:
|
||||
SelectSubQuery(gp_walk_info&);
|
||||
SelectSubQuery(gp_walk_info&, Item_subselect* sel);
|
||||
~SelectSubQuery();
|
||||
~SelectSubQuery() override;
|
||||
execplan::SCSEP transform();
|
||||
Item_subselect* selSub()
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#undef LOG_INFO
|
||||
// #undef LOG_INFO
|
||||
#include "ha_mcs_impl_if.h"
|
||||
#include "idb_mysql.h"
|
||||
|
||||
@ -42,9 +42,7 @@ class View
|
||||
View(SELECT_LEX& select, gp_walk_info* parentGwip) : fSelect(select), fParentGwip(parentGwip)
|
||||
{
|
||||
}
|
||||
~View()
|
||||
{
|
||||
}
|
||||
~View() = default;
|
||||
|
||||
execplan::CalpontSystemCatalog::TableAliasName& viewName();
|
||||
void viewName(execplan::CalpontSystemCatalog::TableAliasName& viewName);
|
||||
|
@ -60,14 +60,14 @@ const int SQL_NOT_FOUND = -1000;
|
||||
const int SQL_KILLED = -1001;
|
||||
const int CALPONT_INTERNAL_ERROR = -1007;
|
||||
|
||||
//#if IDB_SM_DEBUG
|
||||
// extern std::ofstream smlog;
|
||||
//#define SMDEBUGLOG smlog
|
||||
//#else
|
||||
// #if IDB_SM_DEBUG
|
||||
// extern std::ofstream smlog;
|
||||
// #define SMDEBUGLOG smlog
|
||||
// #else
|
||||
#define SMDEBUGLOG \
|
||||
if (false) \
|
||||
std::cout
|
||||
//#endif
|
||||
// #endif
|
||||
extern const std::string DEFAULT_SAVE_PATH;
|
||||
|
||||
typedef uint64_t tableid_t;
|
||||
@ -84,9 +84,7 @@ typedef struct Column
|
||||
Column() : tableID(-1)
|
||||
{
|
||||
}
|
||||
~Column()
|
||||
{
|
||||
}
|
||||
~Column() = default;
|
||||
int tableID;
|
||||
int colPos;
|
||||
int dataType;
|
||||
@ -132,7 +130,14 @@ struct Profiler
|
||||
struct cpsm_tplsch_t
|
||||
{
|
||||
cpsm_tplsch_t()
|
||||
: tableid(0), rowsreturned(0), rowGroup(0), traceFlags(0), bandID(0), saveFlag(0), bandsReturned(0), ctp(0)
|
||||
: tableid(0)
|
||||
, rowsreturned(0)
|
||||
, rowGroup(nullptr)
|
||||
, traceFlags(0)
|
||||
, bandID(0)
|
||||
, saveFlag(0)
|
||||
, bandsReturned(0)
|
||||
, ctp(0)
|
||||
{
|
||||
}
|
||||
~cpsm_tplsch_t()
|
||||
@ -172,7 +177,7 @@ struct cpsm_tplsch_t
|
||||
|
||||
uint16_t getStatus()
|
||||
{
|
||||
idbassert(rowGroup != 0);
|
||||
idbassert(rowGroup != nullptr);
|
||||
return rowGroup->getStatus();
|
||||
}
|
||||
|
||||
@ -295,7 +300,7 @@ extern status_t sm_cleanup(cpsm_conhdl_t*);
|
||||
|
||||
extern status_t tpl_open(tableid_t, sp_cpsm_tplh_t&, cpsm_conhdl_t*);
|
||||
extern status_t tpl_scan_open(tableid_t, sp_cpsm_tplsch_t&, cpsm_conhdl_t*);
|
||||
extern status_t tpl_scan_fetch(sp_cpsm_tplsch_t&, cpsm_conhdl_t*, int* k = 0);
|
||||
extern status_t tpl_scan_fetch(sp_cpsm_tplsch_t&, cpsm_conhdl_t*, int* k = nullptr);
|
||||
extern status_t tpl_scan_close(sp_cpsm_tplsch_t&);
|
||||
extern status_t tpl_close(sp_cpsm_tplh_t&, cpsm_conhdl_t**, querystats::QueryStats& stats, bool ask_4_stats,
|
||||
bool clear_scan_ctx = false);
|
||||
|
Reference in New Issue
Block a user