Commit b77c0add authored by Rich Prohaska's avatar Rich Prohaska

#190 zero out new null bytes to force valgrind to quit complaining about uninitialized bytes

parent 3fbd54a9
...@@ -511,7 +511,6 @@ static int tokudb_hcad_update_fun( ...@@ -511,7 +511,6 @@ static int tokudb_hcad_update_fun(
old_null_bytes = (uchar *)old_val->data; old_null_bytes = (uchar *)old_val->data;
new_null_bytes = new_val_data; new_null_bytes = new_val_data;
memcpy(&curr_old_null_pos, extra_pos, sizeof(uint32_t)); memcpy(&curr_old_null_pos, extra_pos, sizeof(uint32_t));
extra_pos += sizeof(uint32_t); extra_pos += sizeof(uint32_t);
...@@ -520,6 +519,8 @@ static int tokudb_hcad_update_fun( ...@@ -520,6 +519,8 @@ static int tokudb_hcad_update_fun(
memcpy(&num_columns, extra_pos, sizeof(num_columns)); memcpy(&num_columns, extra_pos, sizeof(num_columns));
extra_pos += sizeof(num_columns); extra_pos += sizeof(num_columns);
memset(new_null_bytes, 0, new_num_null_bytes); // shut valgrind up
// //
// now go through and apply the change into new_val_data // now go through and apply the change into new_val_data
......
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