mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
MDEV-22590 SIGSEGV in flush_all_key_blocks when changing key_buffer_size / ASAN: heap-use-after-free in flush_all_key_blocks
Take into account that in preparation of a simple key cache for resizing no disk blocks might be assigned to it. Reviewer: IgorBabaev <igor@mariadb.com>
This commit is contained in:
parent
3e09c6199d
commit
5feb60ce18
3 changed files with 44 additions and 1 deletions
|
|
@ -701,7 +701,7 @@ int prepare_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
|
|||
keycache->in_resize= 1;
|
||||
|
||||
/* Need to flush only if keycache is enabled. */
|
||||
if (keycache->can_be_used)
|
||||
if (keycache->can_be_used && keycache->disk_blocks != -1)
|
||||
{
|
||||
/* Start the flush phase. */
|
||||
keycache->resize_in_flush= 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue