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
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.
- 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()
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.