mirror of
https://github.com/MariaDB/server.git
synced 2026-05-04 14:15:33 +02:00
Fixed calculation of JOIN_CACHE::max_records
The old code did set max_records to either number_of_rows (partial_join_cardinality) or memory size (join_buffer_space_limit) which did not make sense. Fixed by setting max_records to number of rows that fits into join_buffer_size. Other things: - Initialize buffer cache values in JOIN_CACHE constructors (safety) Reviewer: Sergei Petrunia <sergey@mariadb.com>
This commit is contained in:
parent
08a4732860
commit
5fd46be5a7
3 changed files with 18 additions and 18 deletions
|
|
@ -248,9 +248,6 @@ protected:
|
|||
/* The expected size of the space per record in the auxiliary buffer */
|
||||
size_t avg_aux_buffer_incr;
|
||||
|
||||
/* Expected join buffer space used for one record */
|
||||
size_t space_per_record;
|
||||
|
||||
/* Pointer to the beginning of the join buffer */
|
||||
uchar *buff;
|
||||
/*
|
||||
|
|
@ -272,11 +269,6 @@ protected:
|
|||
the minimal size equal to min_buff_size
|
||||
*/
|
||||
size_t min_records;
|
||||
/*
|
||||
The maximum expected number of records to be put in the join buffer
|
||||
at one refill
|
||||
*/
|
||||
size_t max_records;
|
||||
|
||||
/*
|
||||
Pointer to the current position in the join buffer.
|
||||
|
|
@ -542,6 +534,7 @@ protected:
|
|||
join_tab= tab;
|
||||
prev_cache= next_cache= 0;
|
||||
buff= 0;
|
||||
min_buff_size= max_buff_size= 0; // Caches
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -557,6 +550,7 @@ protected:
|
|||
next_cache= 0;
|
||||
prev_cache= prev;
|
||||
buff= 0;
|
||||
min_buff_size= max_buff_size= 0; // Caches
|
||||
if (prev)
|
||||
prev->next_cache= this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue