Commit c8a7b791 authored by Sergey Glukhov's avatar Sergey Glukhov

5.0-bugteam->5.1-bugteam merge

parents d31b6e47 f54beb2d
...@@ -779,7 +779,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, ...@@ -779,7 +779,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
strpos=disk_buff+6; strpos=disk_buff+6;
if (!(rec_per_key= (ulong*) alloc_root(&share->mem_root, if (!(rec_per_key= (ulong*) alloc_root(&share->mem_root,
sizeof(ulong*)*key_parts))) sizeof(ulong)*key_parts)))
goto err; goto err;
for (i=0 ; i < keys ; i++, keyinfo++) for (i=0 ; i < keys ; i++, keyinfo++)
......
...@@ -925,11 +925,11 @@ int ha_myisammrg::info(uint flag) ...@@ -925,11 +925,11 @@ int ha_myisammrg::info(uint flag)
with such a number, it'll be an error later anyway. with such a number, it'll be an error later anyway.
*/ */
bzero((char*) table->key_info[0].rec_per_key, bzero((char*) table->key_info[0].rec_per_key,
sizeof(table->key_info[0].rec_per_key) * table->s->key_parts); sizeof(table->key_info[0].rec_per_key[0]) * table->s->key_parts);
#endif #endif
memcpy((char*) table->key_info[0].rec_per_key, memcpy((char*) table->key_info[0].rec_per_key,
(char*) mrg_info.rec_per_key, (char*) mrg_info.rec_per_key,
sizeof(table->key_info[0].rec_per_key) * sizeof(table->key_info[0].rec_per_key[0]) *
min(file->keys, table->s->key_parts)); min(file->keys, table->s->key_parts));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment