At work we have a problem that has now occurred more then once.

Problem is that query is in state of converting HEAP to MyISAM and it paralyzes our server( query in this state is not able to kill itself and kill flag is not evaluated until only after the operation which seem to take FOREVER in our case)

The following global MYSQL variables appear to us:

| tmp_table_size | 17179869184 |
| max_heap_table_size | 8589934592 |
Any ideas what we should do?

My main question is:

Do you know whether or not setting the two variables to the same value will prevent Converting HEAP to MyISAM (since there should never be a temporary table larger than the HEAP table size)... or will internal temporary tables not respect tmp_table_size

Thank you!