1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

limit HEAP table size with max_heap_table_size, better estimation for mem_per_row

This commit is contained in:
serg@serg.mylan
2005-01-14 19:49:45 +01:00
parent 78756fe7b1
commit 367bcf8c40
4 changed files with 28 additions and 13 deletions

View File

@ -143,7 +143,8 @@ static byte *next_free_record_pos(HP_SHARE *info)
}
if (!(block_pos=(info->records % info->block.records_in_block)))
{
if (info->records > info->max_records && info->max_records)
if ((info->records > info->max_records && info->max_records) ||
(info->data_length + info->index_length >= info->max_table_size))
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(NULL);