maria:bb-10.6-refactor-limit

Last commit made on 2021-03-22
Get this branch:
git clone -b bb-10.6-refactor-limit https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.6-refactor-limit
Repository:
lp:maria

Recent commits

8fc9dcd... by Vicențiu Ciorbaru

Post review fix

d1689f6... by Vicențiu Ciorbaru

DO NOT PUSH! Fix remove_const with window functions

cf2e494... by Vicențiu Ciorbaru

MDEV-23908: Implement SELECT ... OFFSET ... FETCH ...

This commit implements the standard SQL extension
OFFSET start { ROW | ROWS }
FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } { ONLY | WITH TIES }

To achieve this a resered keyword OFFSET is introduced.

The general logic for WITH TIES implies:
1. The number of rows a query returns is no longer known during optimize
   phase. Adjust optimizations to no longer consider this.
2. During end_send make use of an "order Cached_item" to compare if the
   ORDER BY columns changed. Keep returning rows until there is a
   change. This happens only after we reached the row limit.

17ac421... by Vicențiu Ciorbaru

cleanup: make_aggr_tables_info pass parameters from local variables

Local variables such as keep_row_order are semantically clearer on the
intent, rather than using an or condition twice.

95be567... by Vicențiu Ciorbaru

cleanup: remove table_options and corresponding accessor function

The variable is never used and only takes up SELECT_LEX space.

341fa8b... by Vicențiu Ciorbaru

cleanup: test_if_subpart documented to highlight side effect

Also document (through function parameters names) which ORDER must be passed
to the function: first GROUP BY, then ORDER BY.

27d08ba... by Vicențiu Ciorbaru

cleanup: reduce indentation of end_send

Reorder end_send to exit via return instead of large if-else block.

0e7c9d6... by Vicențiu Ciorbaru

cleanup: Delete unused function

707dd9f... by Vicențiu Ciorbaru

cleanup: Refactor select_limit in select lex

This commit moves
* select_lex::offset_limit
* select_lex::select_limit
* select_lex::explicit_limit

Inside the already existing class Lex_select_limit.

This commit is in preparation for FETCH FIRST implementation, as it
simplifies a lot of the code.

Additionally, the parser is simplified by making use of the stack to
return Lex_select_limit objects.

30dc428... by Marko Mäkelä

Merge 10.5 into 10.6