mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed LP bug #925985.
If the flag 'optimize_join_buffer_size' is set to 'off' and the value of the system variable 'join_buffer_size' is greater than the value of the system variable 'join_buffer_space_limit' than no join cache can be employed to join tables of the executed query. A bug in the function JOIN_CACHE::alloc_buffer allowed to use join buffer even in this case while another bug in the function revise_cache_usage could cause a crash of the server in this case if the chosen execution plan for the query contained outer join or semi-join operation.
This commit is contained in:
@ -898,6 +898,8 @@ int JOIN_CACHE::alloc_buffer()
|
||||
curr_buff_space_sz+= cache->get_join_buffer_size();
|
||||
}
|
||||
}
|
||||
curr_min_buff_space_sz+= min_buff_size;
|
||||
curr_buff_space_sz+= buff_size;
|
||||
|
||||
if (curr_min_buff_space_sz > join_buff_space_limit ||
|
||||
(curr_buff_space_sz > join_buff_space_limit &&
|
||||
|
Reference in New Issue
Block a user