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);
void init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
bool print_error, uint idx)
{
empty_record(table);
bzero((char*) info,sizeof(*info));
info->table= table;
info->file= table->file;
......@@ -161,6 +162,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
}
else
{
empty_record(table);
info->record= table->record[0];
info->ref_length= table->file->ref_length;
}
......
......@@ -105,7 +105,8 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
DBUG_PRINT("debug", ("field: %s; pack_ptr: 0x%lx;"
" pack_ptr':0x%lx; bytes: %d",
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;
......@@ -239,7 +240,7 @@ unpack_row(Relay_log_info const *rli,
" pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d",
f->field_name, metadata,
(ulong) old_pack_ptr, (ulong) pack_ptr,
pack_ptr - old_pack_ptr));
(int) (pack_ptr - old_pack_ptr)));
}
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