Bug #91003 Memory leak using Procedure in Trigger
Submitted: 24 May 2018 8:21 Modified: 25 Jun 2018 2:23
Reporter: Xe Ko Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.7.21, 5.7.9 OS:CentOS
Assigned to: CPU Architecture:x86
Tags: memory leak, Memory not release

[24 May 2018 8:21] Xe Ko
Am calling procedure in trigger, most of logic I push in procedure
After I insert, I check memory using very much (around 1Gb)
If I call procedure from outsite trigger , it's using around 200Mb
But it not release memory and keep increasing

config file
skip-name-resolve = 1
performance_schema = 0
key_buffer_size = 64M
max_allowed_packet = 256M
max_connect_errors = 1000000
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 2M
thread_cache_size = 128
open_files_limit  = 65535
query_cache_size = 0
table_definition_cache = 666
table_open_cache = 512
table_open_cache_instances = 1
innodb_flush_method = O_DIRECT
innodb_log_files_in_group = 2
innodb_buffer_pool_size = 7G
innodb_buffer_pool_instances = 3
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 500M
innodb_log_buffer_size = 16M
innodb_flush_log_at_trx_commit = 2
innodb_file_per_table = 1
innodb_lock_wait_timeout = 120
innodb_thread_concurrency = 4
innodb_buffer_pool_dump_at_shutdown = ON
innodb_buffer_pool_load_at_startup = ON
log_bin_trust_function_creators = 1

How to repeat:
restart server and insert
[29 May 2018 11:57] Umesh Shastry
Hello Duc Nguyen,

Thank you for the report.
In order to proceed further and reproduce this issue at our end, may I request you to please provide complete steps and reproducible test case(logical dump of all the schema containing trigger, procedure, tables and data)? You may want to mark it as private after posting here. 

If the data you need to attach is more than 3MB, you should create a compressed archive of the data and a README file that describes the data with a filename that includes the bug number (recommended filename: mysql-bug-data-91003.zip) and upload one to sftp.oracle.com. Your Oracle Web account (trungducvcu@gmail.com) and a client that supports SFTP are required in order to access the SFTP server. More details are in the 'Files" tab of this bug report. Thank you!

[18 Jun 2018 1:54] Xe Ko
Actually, I cant give you (logical dump of all the schema containing trigger, procedure, tables and data).
Can you check for me, why memory usage keep on increasing
and not release?
[22 Jun 2018 10:34] Umesh Shastry
Thank you, but I'm not seeing any issues at my end with dummy trigger and stored procedure. If you can provide more information i.e exact reproducible test case, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.