mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixes to eliminate valgrind warnings.
sql/rpl_record.cc: Factoring out expression and putting it in an auto variable. sql/rpl_utility.cc: Removing a check that causes compile warnings. sql/rpl_utility.h: Ensuring that there is enough memory for the metadata, to avoid reads from uninitialized memory. Initializing the memory to keep valgrind quiet.
This commit is contained in:
@ -97,7 +97,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data)
|
||||
{
|
||||
uint from_len= (m_field_metadata[col] >> 8U) & 0x00ff;
|
||||
uint from_bit_len= m_field_metadata[col] & 0x00ff;
|
||||
DBUG_ASSERT(from_bit_len >= 0 && from_bit_len <= 7);
|
||||
DBUG_ASSERT(from_bit_len <= 7);
|
||||
length= from_len + ((from_bit_len > 0) ? 1 : 0);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user