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

Cleanup of sql_join_cache code (no logic changes)

- Remove virtual from get_min_join_buffer_size() and
  get_max_join_buffer_size().
- Avoid some calls to get_min_buffer_size()
- Simply cache usage in get_..._join_buffer_size()
- Simplify get_max_join_buffer_size() when using optimize_buff_size
- Reindented some long comments

Reviewer: Sergei Petrunia <sergey@mariadb.com>
This commit is contained in:
Monty
2023-05-04 13:06:39 +03:00
parent 5fd46be5a7
commit e74390d94f
2 changed files with 85 additions and 82 deletions

View File

@ -602,9 +602,10 @@ public:
void set_join_buffer_size(size_t sz) { buff_size= sz; }
/* Get the minimum possible size of the cache join buffer */
virtual size_t get_min_join_buffer_size();
size_t get_min_join_buffer_size();
/* Get the maximum possible size of the cache join buffer */
virtual size_t get_max_join_buffer_size(bool optimize_buff_size);
size_t get_max_join_buffer_size(bool optimize_buff_size,
size_t min_buffer_size_arg);
/* Shrink the size if the cache join buffer in a given ratio */
bool shrink_join_buffer_in_ratio(ulonglong n, ulonglong d);