summaryrefslogtreecommitdiff
path: root/storage/heap/ha_heap.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-22 09:22:03 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-22 09:22:03 +0100
commitb728641e862df46b97616ce965cfa78ebf3f14aa (patch)
treecd335135d6b576551a43147d1e220f47868700aa /storage/heap/ha_heap.cc
parent88d1c1c5514dc922699e69d64877b7788c74ffcc (diff)
parent7bd258c44c00f232ecf4ec448179f114b878227b (diff)
downloadmariadb-git-b728641e862df46b97616ce965cfa78ebf3f14aa.tar.gz
Merge branch '5.5' into 10.0
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 c1dad6a9943..29bf924dc26 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))
{
@@ -723,7 +714,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;