First of all, I apologize if a similar question has been asked, but I am very not familiar with mySql and did my best to get used to some terms by reading wiki pages, etc and also look up topics on StackExchange.
We have a database running on MariaDB v10 (on Windows 10) We recently backed up a database full of experimental data and decided to run "Optimize Table ...", because after deleting many temporary data, fetching data became much slower and we suspected disk fragmentation. So we ran the query on HeidiSql client. But we realized that the remaining space in the drive was not enough for "Optimize Table", when it tries to copy the remaining data, so we killed the query. However, we noticed the disk space kept reducing, and noticed that the temporary #sql-... file was still increasing in size!
We tried things like "mysqladmin shutdown" to no avail, so ended up just killing the "mysqld" process on Windows Task Manager.
What I would like to understand is, why does the temporary #sql file keeps building up, even when I killed the query that started it?
EDIT: I found this blog post saying that the "kill" command does not always happen immediately. It does consider the example of altering table. But in my case, it was not happening for at least half an hour, and that seems extreme.