From 367bcf8c40202a884ba6b9dfc8f94b7bcf2a2adc Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 14 Jan 2005 19:49:45 +0100 Subject: limit HEAP table size with max_heap_table_size, better estimation for mem_per_row --- heap/hp_write.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'heap/hp_write.c') diff --git a/heap/hp_write.c b/heap/hp_write.c index 43cee67b39c..808fe6608b1 100644 --- a/heap/hp_write.c +++ b/heap/hp_write.c @@ -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); -- cgit v1.2.1