summaryrefslogtreecommitdiff
path: root/storage/heap/ha_heap.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-22 14:15:24 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-22 16:46:02 +0100
commite4a73acc63baa2180bf63f43be0f6c4ede335789 (patch)
treeb564956be0d27354acbeccb45e23b54df676fdfc /storage/heap/ha_heap.cc
parente119799a920e8096886a51ded305bf06609438a4 (diff)
parenta04e4f531a7d0574171cc49e42a8fbd289e9c6c1 (diff)
downloadmariadb-git-e4a73acc63baa2180bf63f43be0f6c4ede335789.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'storage/heap/ha_heap.cc')
-rw-r--r--storage/heap/ha_heap.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 162943cca17..e03b3bb7646 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -91,15 +91,6 @@ ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg)
int ha_heap::open(const char *name, int mode, uint test_if_locked)
{
- if (table->s->reclength < sizeof (char*))
- {
- MEM_UNDEFINED(table->s->default_values + table->s->reclength,
- sizeof(char*) - table->s->reclength);
- table->s->reclength= sizeof(char*);
- MEM_UNDEFINED(table->record[0], table->s->reclength);
- MEM_UNDEFINED(table->record[1], table->s->reclength);
- }
-
internal_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE);
if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT))
{
@@ -714,7 +705,7 @@ heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
}
}
}
- mem_per_row+= MY_ALIGN(share->reclength + 1, sizeof(char*));
+ mem_per_row+= MY_ALIGN(MY_MAX(share->reclength, sizeof(char*)) + 1, sizeof(char*));
if (table_arg->found_next_number_field)
{
keydef[share->next_number_index].flag|= HA_AUTO_KEY;