1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-33746 Supply missing override markings

Find and fix missing virtual override markings.  Updates cmake
maintainer flags to include -Wsuggest-override and
-Winconsistent-missing-override.
This commit is contained in:
Dave Gosselin
2024-06-12 09:46:26 -04:00
committed by Dave Gosselin
parent ab448d4b34
commit db0c28eff8
306 changed files with 8808 additions and 8781 deletions

View File

@ -954,7 +954,7 @@ protected:
class Table_read_cursor : public Rowid_seq_cursor
{
public:
virtual ~Table_read_cursor() = default;
~Table_read_cursor() override = default;
void init(READ_RECORD *info)
{
@ -1022,7 +1022,7 @@ public:
/*
This returns -1 when end of partition was reached.
*/
int next()
int next() override
{
int res;
if (end_of_partition)
@ -1312,12 +1312,12 @@ public:
item_add->fix_fields(thd, &item_add);
}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
// Save the value of FUNC(current_row)
range_expr->fetch_value_from(item_add);
@ -1326,19 +1326,19 @@ public:
end_of_partition= false;
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
walk_till_non_peer();
}
void pre_next_row()
void pre_next_row() override
{
if (end_of_partition)
return;
range_expr->fetch_value_from(item_add);
}
void next_row()
void next_row() override
{
if (end_of_partition)
return;
@ -1350,12 +1350,12 @@ public:
walk_till_non_peer();
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
bool is_outside_computation_bounds() const
bool is_outside_computation_bounds() const override
{
if (end_of_partition)
return true;
@ -1452,12 +1452,12 @@ public:
item_add->fix_fields(thd, &item_add);
}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
// Save the value of FUNC(current_row)
range_expr->fetch_value_from(item_add);
@ -1467,20 +1467,20 @@ public:
added_values= false;
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
cursor.move_to(rownum);
walk_till_non_peer();
}
void pre_next_row()
void pre_next_row() override
{
if (end_of_partition)
return;
range_expr->fetch_value_from(item_add);
}
void next_row()
void next_row() override
{
if (end_of_partition)
return;
@ -1492,14 +1492,14 @@ public:
walk_till_non_peer();
}
bool is_outside_computation_bounds() const
bool is_outside_computation_bounds() const override
{
if (!added_values)
return true;
return false;
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
if (end_of_partition)
return cursor.get_rownum(); // Cursor does not pass over partition bound.
@ -1561,13 +1561,13 @@ public:
{
}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
peer_tracker.init();
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
// Save the value of the current_row
peer_tracker.check_if_next_group();
@ -1576,17 +1576,17 @@ public:
add_value_to_items();
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
walk_till_non_peer();
}
void pre_next_row()
void pre_next_row() override
{
dont_move= !peer_tracker.check_if_next_group();
}
void next_row()
void next_row() override
{
// Check if our cursor is pointing at a peer of the current row.
// If not, move forward until that becomes true
@ -1601,7 +1601,7 @@ public:
walk_till_non_peer();
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -1658,7 +1658,7 @@ public:
move(false)
{}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
bound_tracker.init();
@ -1666,23 +1666,23 @@ public:
peer_tracker.init();
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
// Fetch the value from the first row
peer_tracker.check_if_next_group();
cursor.move_to(rownum);
}
void next_partition(ha_rows rownum) {}
void next_partition(ha_rows rownum) override {}
void pre_next_row()
void pre_next_row() override
{
// Check if the new current_row is a peer of the row that our cursor is
// pointing to.
move= peer_tracker.check_if_next_group();
}
void next_row()
void next_row() override
{
if (move)
{
@ -1710,7 +1710,7 @@ public:
}
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -1732,9 +1732,9 @@ public:
SQL_I_List<ORDER> *order_list)
{}
void init(READ_RECORD *info) {}
void init(READ_RECORD *info) override {}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
/*
UNBOUNDED PRECEDING frame end just stays on the first row of the
@ -1744,12 +1744,12 @@ public:
curr_rownum= rownum;
}
void next_row()
void next_row() override
{
/* Do nothing, UNBOUNDED PRECEDING frame end doesn't move. */
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return curr_rownum;
}
@ -1774,17 +1774,17 @@ public:
SQL_I_List<ORDER> *order_list) :
cursor(thd, partition_list) {}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
cursor.on_next_partition(rownum);
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
/* Activate the first row */
cursor.fetch();
@ -1797,12 +1797,12 @@ public:
}
}
void next_row()
void next_row() override
{
/* Do nothing, UNBOUNDED FOLLOWING frame end doesn't move */
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -1817,7 +1817,7 @@ public:
SQL_I_List<ORDER> *partition_list, SQL_I_List<ORDER> *order_list) :
Frame_unbounded_following(thd, partition_list, order_list) {}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
ha_rows num_rows_in_partition= 0;
if (cursor.fetch())
@ -1830,7 +1830,7 @@ public:
set_win_funcs_row_count(num_rows_in_partition);
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -1857,7 +1857,7 @@ public:
{
order_item= order_list->first->item[0];
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
ha_rows num_rows_in_partition= 0;
if (cursor.fetch())
@ -1873,7 +1873,7 @@ public:
set_win_funcs_row_count(num_rows_in_partition);
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -1904,12 +1904,12 @@ public:
is_top_bound(is_top_bound_arg), n_rows(n_rows_arg), n_rows_behind(0)
{}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
/*
Position our cursor to point at the first row in the new partition
@ -1935,13 +1935,13 @@ public:
}
void next_row()
void next_row() override
{
n_rows_behind++;
move_cursor_if_possible();
}
bool is_outside_computation_bounds() const
bool is_outside_computation_bounds() const override
{
/* As a bottom boundary, rows have not yet been added. */
if (!is_top_bound && n_rows - n_rows_behind)
@ -1949,7 +1949,7 @@ public:
return false;
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -2007,26 +2007,26 @@ public:
Frame_rows_current_row_bottom() : curr_rownum(0) {}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
add_value_to_items();
curr_rownum= rownum;
}
void next_partition(ha_rows rownum) {}
void next_partition(ha_rows rownum) override {}
void pre_next_row()
void pre_next_row() override
{
/* Temp table's current row is current_row. Add it to the window func */
add_value_to_items();
}
void next_row()
void next_row() override
{
curr_rownum++;
};
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return curr_rownum;
}
@ -2083,13 +2083,13 @@ public:
{
}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
at_partition_end= false;
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
at_partition_end= false;
@ -2097,7 +2097,7 @@ public:
}
/* Move our cursor to be n_rows ahead. */
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
if (is_top_bound)
next_part_top(rownum);
@ -2105,7 +2105,7 @@ public:
next_part_bottom(rownum);
}
void next_row()
void next_row() override
{
if (is_top_bound)
next_row_top();
@ -2113,7 +2113,7 @@ public:
next_row_bottom();
}
bool is_outside_computation_bounds() const
bool is_outside_computation_bounds() const override
{
/*
The top bound can go over the current partition. In this case,
@ -2124,7 +2124,7 @@ public:
return false;
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return cursor.get_rownum();
}
@ -2210,12 +2210,12 @@ public:
const Frame_cursor &bottom_bound) :
top_bound(top_bound), bottom_bound(bottom_bound) {}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
/* TODO(cvicentiu) Sum functions get cleared on next partition anyway during
the window function computation algorithm. Either perform this only in
@ -2225,23 +2225,23 @@ public:
clear_sum_functions();
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
compute_values_for_current_row();
}
void pre_next_row()
void pre_next_row() override
{
clear_sum_functions();
}
void next_row()
void next_row() override
{
curr_rownum++;
compute_values_for_current_row();
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return curr_rownum;
}
@ -2301,36 +2301,36 @@ class Frame_positional_cursor : public Frame_cursor
bottom_bound(&bottom_bound), offset(&offset),
negative_offset(negative_offset) {}
void init(READ_RECORD *info)
void init(READ_RECORD *info) override
{
cursor.init(info);
}
void pre_next_partition(ha_rows rownum)
void pre_next_partition(ha_rows rownum) override
{
/* The offset is dependant on the current row values. We can only get
* it here accurately. When fetching other rows, it changes. */
save_offset_value();
}
void next_partition(ha_rows rownum)
void next_partition(ha_rows rownum) override
{
save_positional_value();
}
void pre_next_row()
void pre_next_row() override
{
/* The offset is dependant on the current row values. We can only get
* it here accurately. When fetching other rows, it changes. */
save_offset_value();
}
void next_row()
void next_row() override
{
save_positional_value();
}
ha_rows get_curr_rownum() const
ha_rows get_curr_rownum() const override
{
return position_cursor.get_curr_rownum();
}