mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@ -950,7 +950,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)
|
||||
{
|
||||
@ -1018,7 +1018,7 @@ public:
|
||||
/*
|
||||
This returns -1 when end of partition was reached.
|
||||
*/
|
||||
int next()
|
||||
int next() override
|
||||
{
|
||||
int res;
|
||||
if (end_of_partition)
|
||||
@ -1308,12 +1308,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);
|
||||
@ -1322,19 +1322,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;
|
||||
@ -1346,12 +1346,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;
|
||||
@ -1448,12 +1448,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);
|
||||
@ -1463,20 +1463,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;
|
||||
@ -1488,14 +1488,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.
|
||||
@ -1557,13 +1557,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();
|
||||
@ -1572,17 +1572,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
|
||||
@ -1597,7 +1597,7 @@ public:
|
||||
walk_till_non_peer();
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1654,7 +1654,7 @@ public:
|
||||
move(false)
|
||||
{}
|
||||
|
||||
void init(READ_RECORD *info)
|
||||
void init(READ_RECORD *info) override
|
||||
{
|
||||
bound_tracker.init();
|
||||
|
||||
@ -1662,23 +1662,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)
|
||||
{
|
||||
@ -1706,7 +1706,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -1728,9 +1728,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
|
||||
@ -1740,12 +1740,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;
|
||||
}
|
||||
@ -1770,17 +1770,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();
|
||||
@ -1793,12 +1793,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();
|
||||
}
|
||||
@ -1813,7 +1813,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())
|
||||
@ -1826,7 +1826,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();
|
||||
}
|
||||
@ -1853,7 +1853,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())
|
||||
@ -1869,7 +1869,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();
|
||||
}
|
||||
@ -1900,12 +1900,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
|
||||
@ -1931,13 +1931,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)
|
||||
@ -1945,7 +1945,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -2003,26 +2003,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;
|
||||
}
|
||||
@ -2079,13 +2079,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;
|
||||
|
||||
@ -2093,7 +2093,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);
|
||||
@ -2101,7 +2101,7 @@ public:
|
||||
next_part_bottom(rownum);
|
||||
}
|
||||
|
||||
void next_row()
|
||||
void next_row() override
|
||||
{
|
||||
if (is_top_bound)
|
||||
next_row_top();
|
||||
@ -2109,7 +2109,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,
|
||||
@ -2120,7 +2120,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
ha_rows get_curr_rownum() const
|
||||
ha_rows get_curr_rownum() const override
|
||||
{
|
||||
return cursor.get_rownum();
|
||||
}
|
||||
@ -2206,12 +2206,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
|
||||
@ -2221,23 +2221,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;
|
||||
}
|
||||
@ -2297,36 +2297,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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user