Comments - Inquire about mysql memory leak
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
You write that it is the memory of the shell script that continues to grow.
This is unlikely to be related to the mysql client program (or mysql/mariadb server) in any way, since the /bin/mysql program runs in a separate process from the shell script.
Memory associated with the process running the shell script can only be allocated from within that process, it cannot be affected by processes spawned by the shell script.