diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-01-25 14:25:48 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-11 18:36:54 +0100 |
commit | 7c6cf7fefe68a1a3f68e7d6436da4689ec302bca (patch) | |
tree | 86754b8b68a03cb6569d675944919452f6142c05 /storage/heap/ha_heap.cc | |
parent | 7a63ffab71644118223aefe66094366a7b7f115e (diff) | |
download | mariadb-git-7c6cf7fefe68a1a3f68e7d6436da4689ec302bca.tar.gz |
bug: ha_heap was unilaterally increasing reclength
proper fix replacing the hack from b80fa4000d6
don't confuse length of the data area (reclength) with the
offset to the "deleted" mark.
Diffstat (limited to 'storage/heap/ha_heap.cc')
-rw-r--r-- | storage/heap/ha_heap.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 259e54bfc59..ec76d08bf97 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -100,15 +100,6 @@ const char **ha_heap::bas_ext() const 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= test(test_if_locked & HA_OPEN_INTERNAL_TABLE); if (internal_table || (!(file= heap_open(name, mode)) && my_errno == ENOENT)) { @@ -736,7 +727,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(max(share->reclength, sizeof(char*)) + 1, sizeof(char*)); if (table_arg->found_next_number_field) { keydef[share->next_number_index].flag|= HA_AUTO_KEY; |