maria:bb-11.0-jan23-rebase-try2

Last commit made on 2023-01-30
Get this branch:
git clone -b bb-11.0-jan23-rebase-try2 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-11.0-jan23-rebase-try2
Repository:
lp:maria

Recent commits

7d0bef6... by Monty <email address hidden>

Fixed bug in SQL_SELECT_LIMIT

We where comparing costs when we should be comparing number of rows
that will be examined

fc0c157... by Monty <email address hidden>

Simple optimization to speed up some handler functions when checking killed

- Avoid checking for has_transactions if killed flag is not checked
- Simplify code (Have checked with gcc -O3 that there is improvements)
- Added handler::fast_increment_statstics() to be used when a handler
  functions wants to increase two statistics for one row access.
- Made check_limit_rows_examened() inline (even if it didn't make any
  difference for gcc 7.5.0), still the right thing to do

07b0d1a... by Monty <email address hidden>

Adjusted Range_rowid_filter_cost_info lookup cost slightly.

If the array size would be 1, the cost would be 0 which is wrong.
Fixed by adding a small (0.001) base value to the lookup cost.

This causes not changes in any result files.

987fcf9... by Vicențiu Ciorbaru

cleanup: Typo fix appliccable -> applicable

bcd5454... by Monty <email address hidden>

Change class variable names in rowid_filter to longer, more clear names

No code logic changes was done

a -> gain
b -> cost_of_building_range_filter
a_adj -> gain_adj
r -> row_combinations

Other things:
- Optimized the layout of class Range_rowid_filter_cost_info.
  One effect was that I moved key_no to the private section to get
  better alignment and had to introduce a get_key_no() function.
- Indentation changes in rowid_filter.cc to avoid long rows.

2cc5750... by Monty <email address hidden>

Updated convert-debug-for-diff

4062fc2... by Monty <email address hidden>

Optimizer code cleanups, no logic changes

- Updated comments
- Added some extra DEBUG
- Indentation changes and break long lines
- Trivial code changes like:
  - Combining 2 statements in one
  - Reorder DBUG lines
  - Use a variable to store a pointer that is used multiple times
- Moved declaration of variables to start of loop/function
- Removed dead or commented code
- Removed wrong DBUG_EXECUTE code in best_extension_by_limited_search()

87d4d72... by Monty <email address hidden>

Limit calculated rows to the number of rows in the table

The result file changes are mainly that number of rows is one smaller
for some queries with DISTINCT or GROUP BY

c443dbf... by Monty <email address hidden>

Ensure that test_quick_select doesn't return more rows than in the table

Other changes:
- In test_quick_select(), assume that if table->used_stats_records is 0
  then the table has 0 rows.
- Fixed prepare_simple_select() to populate table->used_stat_records
- Enusre that set_statistics_for_tables() doesn't cause used_stats_records
  to be 0 when using stat_tables.
- To get blackhole to work with replication, set stats.records to 2 so
  that test_quick_select() doesn't assume the table is empty.

8b977a6... by Monty <email address hidden>

MDEV-14907 FEDERATEDX doesn't respect DISTINCT

This is a minor cleanup of the original commit