summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/heap/ha_heap.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc
index 345ebb8419f..259e54bfc59 100644
--- a/storage/heap/ha_heap.cc
+++ b/storage/heap/ha_heap.cc
@@ -100,7 +100,15 @@ const char **ha_heap::bas_ext() const
int ha_heap::open(const char *name, int mode, uint test_if_locked)
{
- set_if_bigger(table->s->reclength, sizeof (uchar*));
+ 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= test(test_if_locked & HA_OPEN_INTERNAL_TABLE);
if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT))
{