summaryrefslogtreecommitdiff
path: root/sql/rpl_utility.cc
diff options
context:
space:
mode:
authorunknown <mkindahl@dl145h.mysql.com>2007-08-03 17:12:00 +0200
committerunknown <mkindahl@dl145h.mysql.com>2007-08-03 17:12:00 +0200
commita04dff19f397148e0ddd28aeff02a3706a4e8e19 (patch)
treea78e176fca2cdf23574d3ded165cfc748280b734 /sql/rpl_utility.cc
parent6df75c85fdc68afc24fa8dea876062dc174b887e (diff)
downloadmariadb-git-a04dff19f397148e0ddd28aeff02a3706a4e8e19.tar.gz
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.
Diffstat (limited to 'sql/rpl_utility.cc')
-rw-r--r--sql/rpl_utility.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index 9c0eb9891a0..85ed6089f56 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -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;
}