Commit 09b2a2a0 authored by svoj@mysql.com/april.(none)'s avatar svoj@mysql.com/april.(none)

Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines

into  mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-engines
parents 6a1a765b 1e82044c
...@@ -249,9 +249,22 @@ void ha_myisammrg::info(uint flag) ...@@ -249,9 +249,22 @@ void ha_myisammrg::info(uint flag)
if (flag & HA_STATUS_CONST) if (flag & HA_STATUS_CONST)
{ {
if (table->key_parts && info.rec_per_key) if (table->key_parts && info.rec_per_key)
{
#ifdef HAVE_purify
/*
valgrind may be unhappy about it, because optimizer may access values
between file->keys and table->key_parts, that will be uninitialized.
It's safe though, because even if opimizer will decide to use a key
with such a number, it'll be an error later anyway.
*/
bzero((char*) table->key_info[0].rec_per_key,
sizeof(table->key_info[0].rec_per_key) * table->key_parts);
#endif
memcpy((char*) table->key_info[0].rec_per_key, memcpy((char*) table->key_info[0].rec_per_key,
(char*) info.rec_per_key, (char*) info.rec_per_key,
sizeof(table->key_info[0].rec_per_key)*table->key_parts); sizeof(table->key_info[0].rec_per_key) *
min(file->keys, table->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