mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 05:35:31 +02:00
Fixed possible access to unintialized memory in filesort when using many buffers
include/my_sys.h: Added function to call if IO_CACHE is moved mysys/mf_iocache.c: Added function to call if IO_CACHE is moved sql/filesort.cc: Tell that io_cache is moved
This commit is contained in:
parent
d3ad1a919e
commit
deac81af88
3 changed files with 38 additions and 14 deletions
|
|
@ -680,6 +680,8 @@ int merge_many_buff(SORTPARAM *param, uchar *sort_buffer,
|
|||
if (flush_io_cache(to_file))
|
||||
break; /* purecov: inspected */
|
||||
temp=from_file; from_file=to_file; to_file=temp;
|
||||
setup_io_cache(from_file);
|
||||
setup_io_cache(to_file);
|
||||
*maxbuffer= (uint) (lastbuff-buffpek)-1;
|
||||
}
|
||||
close_cached_file(to_file); // This holds old result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue