Commit ad0ee8cd authored by Yuchen Pei's avatar Yuchen Pei

MDEV-33746 [fixup] Add suggested overrides in oqgraph

parent 01289dac
...@@ -266,10 +266,10 @@ namespace open_query { ...@@ -266,10 +266,10 @@ namespace open_query {
: oqgraph_cursor(arg), no_weight(), sequence(0), results(), last() : oqgraph_cursor(arg), no_weight(), sequence(0), results(), last()
{ } { }
int fetch_row(const row &, row&); int fetch_row(const row &, row&) override;
int fetch_row(const row &, row&, const reference&); int fetch_row(const row &, row&, const reference&) override;
void current(reference& ref) const void current(reference& ref) const override
{ {
ref= last; ref= last;
} }
...@@ -286,10 +286,10 @@ namespace open_query { ...@@ -286,10 +286,10 @@ namespace open_query {
: oqgraph_cursor(arg), position(0) : oqgraph_cursor(arg), position(0)
{ } { }
int fetch_row(const row &, row&); int fetch_row(const row &, row&) override;
int fetch_row(const row &, row&, const reference&); int fetch_row(const row &, row&, const reference&) override;
void current(reference& ref) const void current(reference& ref) const override
{ {
ref= last; ref= last;
} }
...@@ -308,10 +308,10 @@ namespace open_query { ...@@ -308,10 +308,10 @@ namespace open_query {
: oqgraph_cursor(arg), position(0), last() : oqgraph_cursor(arg), position(0), last()
{ } { }
int fetch_row(const row &, row&); int fetch_row(const row &, row&) override;
int fetch_row(const row &, row&, const reference&); int fetch_row(const row &, row&, const reference&) override;
void current(reference& ref) const void current(reference& ref) const override
{ {
ref= last; ref= last;
} }
......
...@@ -58,59 +58,59 @@ class ha_oqgraph: public handler ...@@ -58,59 +58,59 @@ class ha_oqgraph: public handler
public: public:
#if MYSQL_VERSION_ID >= 50100 #if MYSQL_VERSION_ID >= 50100
ha_oqgraph(handlerton *hton, TABLE_SHARE *table); ha_oqgraph(handlerton *hton, TABLE_SHARE *table);
ulonglong table_flags() const; ulonglong table_flags() const override;
#else #else
ha_oqgraph(TABLE *table); ha_oqgraph(TABLE *table);
Table_flags table_flags() const; Table_flags table_flags() const;
#endif #endif
virtual ~ha_oqgraph(); virtual ~ha_oqgraph();
const char *index_type(uint inx) const char *index_type(uint inx) override
{ {
return "HASH"; return "HASH";
} }
/* Rows also use a fixed-size format */ /* Rows also use a fixed-size format */
enum row_type get_row_type() const { return ROW_TYPE_FIXED; } enum row_type get_row_type() const override { return ROW_TYPE_FIXED; }
ulong index_flags(uint inx, uint part, bool all_parts) const; ulong index_flags(uint inx, uint part, bool all_parts) const override;
const char **bas_ext() const; const char **bas_ext() const;
uint max_supported_keys() const { return MAX_KEY; } uint max_supported_keys() const override { return MAX_KEY; }
uint max_supported_key_part_length() const { return MAX_KEY_LENGTH; } uint max_supported_key_part_length() const override { return MAX_KEY_LENGTH; }
double scan_time() { return (double) 1000000000; } double scan_time() override { return (double) 1000000000; }
double read_time(uint index, uint ranges, ha_rows rows) double read_time(uint, uint, ha_rows) override
{ return 1; } { return 1; }
// Doesn't make sense to change the engine on a virtual table. // Doesn't make sense to change the engine on a virtual table.
virtual bool can_switch_engines() { return false; } virtual bool can_switch_engines() override { return false; }
int open(const char *name, int mode, uint test_if_locked); int open(const char *name, int mode, uint test_if_locked) override;
int close(void); int close(void) override;
int write_row(const byte * buf); int write_row(const byte * buf) override;
int update_row(const uchar * old_data, const uchar * new_data); int update_row(const uchar * old_data, const uchar * new_data) override;
int delete_row(const byte * buf); int delete_row(const byte * buf) override;
int index_read(byte * buf, const byte * key, int index_read(byte * buf, const byte * key,
uint key_len, enum ha_rkey_function find_flag); uint key_len, enum ha_rkey_function find_flag) override;
int index_read_idx(byte * buf, uint idx, const byte * key, int index_read_idx(byte * buf, uint idx, const byte * key,
uint key_len, enum ha_rkey_function find_flag); uint key_len, enum ha_rkey_function find_flag);
int index_next_same(byte * buf, const byte * key, uint key_len); int index_next_same(byte * buf, const byte * key, uint key_len) override;
int rnd_init(bool scan); int rnd_init(bool scan) override;
int rnd_next(byte *buf); int rnd_next(byte *buf) override;
int rnd_pos(byte * buf, byte *pos); int rnd_pos(byte * buf, byte *pos) override;
void position(const byte *record); void position(const byte *record) override;
int info(uint); int info(uint) override;
int extra(enum ha_extra_function operation); int extra(enum ha_extra_function operation) override;
int external_lock(THD *thd, int lock_type); int external_lock(THD *thd, int lock_type) override;
int delete_all_rows(void); int delete_all_rows(void) override;
ha_rows records_in_range(uint inx, const key_range *min_key, ha_rows records_in_range(uint inx, const key_range *min_key,
const key_range *max_key, page_range *pages); const key_range *max_key, page_range *pages) override;
int delete_table(const char *from); int delete_table(const char *from) override;
int rename_table(const char * from, const char * to); int rename_table(const char * from, const char * to) override;
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info); int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info) override;
void update_create_info(HA_CREATE_INFO *create_info); void update_create_info(HA_CREATE_INFO *create_info) override;
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); enum thr_lock_type lock_type) override;
int cmp_ref(const byte *ref1, const byte *ref2); int cmp_ref(const byte *ref1, const byte *ref2) override;
bool get_error_message(int error, String* buf); bool get_error_message(int error, String* buf) override;
void fprint_error(const char* fmt, ...); void fprint_error(const char* fmt, ...);
...@@ -123,7 +123,7 @@ class ha_oqgraph: public handler ...@@ -123,7 +123,7 @@ class ha_oqgraph: public handler
uint key_length, uint key_length,
qc_engine_callback qc_engine_callback
*engine_callback, *engine_callback,
ulonglong *engine_data) ulonglong *engine_data) override
{ {
/* /*
Do not put data from OQGRAPH tables into query cache (because there Do not put data from OQGRAPH tables into query cache (because there
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment