mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Bug #24487 Valgrind: uninited byte in table->record[1] in binlog code for rbr + inno db
The reason of this valgrind's compaint is not a bug but rather a feature of bitwise ops: for any value of the byte x x | 1 -> 1, and x & 0 -> 0. x, being a null_byte part of record[1] can be left unassigned even after ha_innobase::index_read_idx because the above and still be correct. Addding a check memory upon the invocation of the function can detect this fact long before record[1], old record, is eventually passed to my_write. Fixed with initialization of record[1]'s null_bytes part in open_table_from_share. sql/table.cc: initialization of null-bytes for valgrind.
This commit is contained in:
parent
46fd7deccb
commit
f8d8b3db91
1 changed files with 1 additions and 0 deletions
|
@ -1396,6 +1396,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
|
|||
if (records > 1)
|
||||
{
|
||||
memcpy(outparam->record[0], share->default_values, share->rec_buff_length);
|
||||
memcpy(outparam->record[1], share->default_values, share->null_bytes);
|
||||
if (records > 2)
|
||||
memcpy(outparam->record[1], share->default_values,
|
||||
share->rec_buff_length);
|
||||
|
|
Loading…
Reference in a new issue