Details
-
Bug
-
Status: Needs Feedback (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Tested with 10.11.9-MariaDB-log on openSUSE Leap 15.6.
I use the following global variables to make this possible:
innodb_buffer_pool_size = 1073741824
|
max_heap_table_size = 10737418240
|
Create a schema and a table to test memory allocation and deallocation:
drop schema if exists memtest;
|
create schema if not exists memtest; use memtest;
|
CREATE TABLE `BIGMEMORY`(`col1` int(11) NOT NULL AUTO_INCREMENT,`col2` varchar(1024) DEFAULT NULL,PRIMARY KEY (`col1`)) ENGINE=MEMORY;
|
Insert ROWS:
insert into memtest.BIGMEMORY (col2)
|
select concat(md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()),md5(rand()))
|
from seq_1_to_358400;
|
View memory usage with top comand. Examples:
top -b -n 1 -p $(pidof mariadbd) | tail -2
|
top -b -n 1 -p $(pidof mysqld) | tail -2
|
top -b -n 1 -p 21111 | tail -2
|
Truncate or drop the table. This should deallocate memory used by instance.
View memory usage with top command again.