Bug #70822 Per user space limit for internal on disk tmp tables
Submitted: 5 Nov 2013 16:50 Modified: 7 Nov 2013 23:50
Reporter: Jan Ksta Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[5 Nov 2013 16:50] Jan Ksta
Description:
Mysql creatse on disk internal tmp tables http://dev.mysql.com/doc/refman/5.1/en/internal-temporary-tables.html
There is no way to limit size of this table per user or per database. That means that any mysql server user can easily fill up disk and cause normal mysql operations (that not require internal on disk tmp tables) to halt.
Also I think there is no way to tell which user actualy filled up disk with tmp tables and there is defenetly no way to tell who did that an hour ago...

How to repeat:
---
[5 Nov 2013 21:32] Jan Ksta
I;ve suggested partial walkaround with new feature suggestion http://bugs.mysql.com/bug.php?id=70826 - however this does not make per user limits not needed...
[7 Nov 2013 18:14] Jan Ksta
Maybe at least there should be optionaly enabled log entry when on disk tmp is created with information for which user. 
Also mad on disk tmp tables could have in their names user name or query id instead of mad filename #sql_a6c_0.MAD
[7 Nov 2013 21:25] Jan Ksta
I find it strange that there is limit on memory tmp tables (tmp_table_size) while there is no limit on on disk tables. There should be option to set this limit. Many administrators whould like this to actualy disable on disk tables completly (with an error on query that would require one)
[7 Nov 2013 23:50] Jan Ksta
Replaced it with all in one feature request http://bugs.mysql.com/bug.php?id=70857