Eliminating some valgrind warnings resulting from that some

storage engines do not set the unused null bits (i.e., the
filler bits and the X bit) correctly. Also adding some casts
to debug printouts to eliminate compiler warnings.
parent bcef0be8
This diff is collapsed.
...@@ -55,6 +55,7 @@ static int rr_index(READ_RECORD *info); ...@@ -55,6 +55,7 @@ static int rr_index(READ_RECORD *info);
void init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table, void init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
bool print_error, uint idx) bool print_error, uint idx)
{ {
empty_record(table);
bzero((char*) info,sizeof(*info)); bzero((char*) info,sizeof(*info));
info->table= table; info->table= table;
info->file= table->file; info->file= table->file;
...@@ -161,6 +162,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, ...@@ -161,6 +162,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
} }
else else
{ {
empty_record(table);
info->record= table->record[0]; info->record= table->record[0];
info->ref_length= table->file->ref_length; info->ref_length= table->file->ref_length;
} }
......
...@@ -105,7 +105,8 @@ pack_row(TABLE *table, MY_BITMAP const* cols, ...@@ -105,7 +105,8 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
DBUG_PRINT("debug", ("field: %s; pack_ptr: 0x%lx;" DBUG_PRINT("debug", ("field: %s; pack_ptr: 0x%lx;"
" pack_ptr':0x%lx; bytes: %d", " pack_ptr':0x%lx; bytes: %d",
field->field_name, (ulong) old_pack_ptr, field->field_name, (ulong) old_pack_ptr,
(ulong) pack_ptr, pack_ptr - old_pack_ptr)); (ulong) pack_ptr,
(int) (pack_ptr - old_pack_ptr)));
} }
null_mask <<= 1; null_mask <<= 1;
...@@ -239,7 +240,7 @@ unpack_row(Relay_log_info const *rli, ...@@ -239,7 +240,7 @@ unpack_row(Relay_log_info const *rli,
" pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d", " pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d",
f->field_name, metadata, f->field_name, metadata,
(ulong) old_pack_ptr, (ulong) pack_ptr, (ulong) old_pack_ptr, (ulong) pack_ptr,
pack_ptr - old_pack_ptr)); (int) (pack_ptr - old_pack_ptr)));
} }
null_mask <<= 1; null_mask <<= 1;
......
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