1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Additional key segment (HA_KEYTYPE_END) creation has been moved from handler to hp_create.c

BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
This commit is contained in:
unknown
2002-10-03 14:55:02 +05:00
parent ce5696e25d
commit 1d41862975
3 changed files with 12 additions and 20 deletions

View File

@ -243,11 +243,7 @@ int ha_heap::create(const char *name, TABLE *table, HA_CREATE_INFO *create_info)
int error;
for (key= parts= 0; key < table->keys; key++)
{
parts+= table->key_info[key].key_parts;
if (table->key_info[key].algorithm == HA_KEY_ALG_BTREE)
parts++; /* additional HA_KEYTYPE_END keyseg */
}
if (!(keydef= (HP_KEYDEF*) my_malloc(table->keys * sizeof(HP_KEYDEF) +
parts * sizeof(HA_KEYSEG), MYF(MY_WME))))
@ -299,15 +295,6 @@ int ha_heap::create(const char *name, TABLE *table, HA_CREATE_INFO *create_info)
seg->null_pos= 0;
}
}
if (pos->algorithm == HA_KEY_ALG_BTREE)
{
/* additional HA_KEYTYPE_END keyseg */
seg->type= HA_KEYTYPE_END;
seg->length= sizeof(byte*);
seg->flag= 0;
seg->null_bit= 0;
seg++;
}
}
mem_per_row+= MY_ALIGN(table->reclength + 1, sizeof(char*));
max_rows= (ulong) (max_heap_table_size / mem_per_row);