mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Merge mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-engines
into mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.0-engines sql/ha_myisammrg.cc: Manual merge.
This commit is contained in:
commit
12fb87ac28
1 changed files with 14 additions and 1 deletions
|
@ -326,9 +326,22 @@ void ha_myisammrg::info(uint flag)
|
|||
if (flag & HA_STATUS_CONST)
|
||||
{
|
||||
if (table->s->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,
|
||||
(char*) info.rec_per_key,
|
||||
sizeof(table->key_info[0].rec_per_key)*table->s->key_parts);
|
||||
sizeof(table->key_info[0].rec_per_key) *
|
||||
min(file->keys, table->s->key_parts));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue