I’m trying to get a better understanding of thread memory usage. Assuming the following buffers were allocated during a query, and the thread is to be returned to the thread cache rather than closed at the end of the query. If they were used, are the following buffers kept allocated, or are they released before the thread is put in the cache?
- The thread stack (I think this stays allocated)
- The connection buffer (This may be released or shrunk?)
- The result buffer (This may be released or shrunk?)
- The read_buffer
- The read_rnd_buffer
- The sort_buffer
- The myiasm_sort_buffer
- The bulk_insert_buffer
- The binlog cache buffer
Thanks for any assistance.