I am using MySQL, and the temporary table engine is configured as InnoDB.
We are currently facing a serious issue in production. Our business has many large analytical queries, especially multi-table JOIN queries. When these queries generate temporary tables and the temporary tables spill to disk, they can quickly consume a large amount of disk space.
This has started to affect normal business access to regular tables, which is a major risk for our system.
Is there any way in MySQL to limit the maximum disk space used by on-disk temporary tables? Ideally, once a query exceeds this limit, MySQL should automatically kill or abort that large query, so that normal business traffic is not impacted.
I would like to know whether MySQL provides any built-in configuration, resource control mechanism, or recommended workaround for this scenario.