mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
The test case was setting aria_sort_buffer_size to MAX_ULONGLONG-1 which was not handled gracefully by my_malloc() or safemalloc(). Fixed by ensuring that the malloc functions returns 0 if the size is too big. I also added some protection to Aria repair: - Limit sort_buffer_size to 16G (after that a bigger sort buffer will not help that much anyway) - Limit sort_buffer_size also according to sort file size. This will help by not allocating less memory if someone sets the buffer size too high.
16 lines
463 B
Plaintext
16 lines
463 B
Plaintext
--source include/have_sequence.inc
|
|
|
|
#
|
|
#
|
|
# MDEV-24750 Various corruptions caused by Aria subsystem asking system call
|
|
# to overwrite memory that it does not own (InnoDB stacks)
|
|
|
|
SET SESSION aria_repair_threads=128;
|
|
SET SESSION aria_sort_buffer_size=CAST(-1 AS UNSIGNED INT);
|
|
|
|
SET SESSION tmp_table_size=65535;
|
|
CREATE TABLE t1 (a VARCHAR(255));
|
|
insert into t1 (a) select seq from seq_1_to_1000;
|
|
UPDATE t1 SET a=( (SELECT MAX(a) FROM t1));
|
|
DROP TABLE t1;
|