maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #00850
Re: New Question: Aria Max Table Size for internal on-disk temporary tables
Hi!
>>>>> "MARK" == MARK CALLAGHAN <mdcallag@xxxxxxxxx> writes:
MARK> Not sure this was the right way to do it, but it prevented many full-disk
MARK> problems.
MARK> http://bazaar.launchpad.net/~mysqlatfacebook/mysqlatfacebook/5.1/revision/3652
MARK> Port tmp_table_max_file_size option from the Google patch to limit max size of
MARK> on-disk temp tables. This adds the my.cnf option and session variable
MARK> "tmp_table_max_file_size" to limit the max size of an on-disk (MyISAM)
MARK> temp table.
MARK> The error ER_TMP_TABLE_MAX_FILE_SIZE_EXCEEDED is raised when the limit
MARK> is exceeded.
This code sets te same size for implicate and internal tmp tables.
Mark, do you think we should have both variables availble?
(It's similar amount of work to add two variables instead of one).
I looked at the above patch (thanks for the link) and most of if looks
good, but there is a few ways we can improve it when we apply it.
- Reuse 'record file full' error.
- No need to add THD argument to some functions; One can access THD
trough the TABLE object.
- We need to add same limits to the Aria engine (no big deal)
- I prefer to have MAX_UNSIGNED_LONGLONG as the default value for the variable
instead of 0. (no reason to make 0 a special case).
- I prefer to send the information of the max file length through the
...CREATE_INFO, like with all other parameters.
Svoj, any chance you can do this in 5.5 the incoming week?
What I would also like to fix, which is a bit harder so we have to do
this a later:
- If we get disk full when writing to an internal temporary aria file,
we should mark the file as 'crashed' and next access to the file
should give a 'could-not-write-as-disk-was-full' error.
This is a bit complex as the write is done in the background by
another process, but in practice this should be easy to add and
detect.
The main thing to do for temporary files:
- Add file specific flag to my_pwrite() for ma_pagecache.c that it
should not wait for file full.
- The file will automaticly be marked as crashed. We should however
detect this case and ensure that we get a proper error message
("ABORTED_AS_FILE_SYSTEM_WAS_FULL" ?) for this case.
Still, the later is not more than 3-4 hours of work...
Regards,
Monty
Follow ups
References