Commit 3f24fa2c authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #5674 merge expand bug fix to mainline

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@49796 c7de825b-a66e-492c-adef-691d508d4ae1
parent 271e1cf6
...@@ -653,13 +653,13 @@ tokudb_expand_variable_offsets( ...@@ -653,13 +653,13 @@ tokudb_expand_variable_offsets(
extra_pos += sizeof offset_start; extra_pos += sizeof offset_start;
assert(extra_pos == (uchar *)extra->data + extra->size); assert(extra_pos == (uchar *)extra->data + extra->size);
assert(offset_start + number_of_offsets < old_val->size);
DBT new_val; memset(&new_val, 0, sizeof new_val); DBT new_val; memset(&new_val, 0, sizeof new_val);
if (old_val != NULL) { if (old_val != NULL) {
assert(offset_start + number_of_offsets < old_val->size);
// compute the new val from the old val // compute the new val from the old val
uchar *old_val_ptr = (uchar *)old_val->data; uchar *old_val_ptr = (uchar *)old_val->data;
// allocate space for the new val's data // allocate space for the new val's data
...@@ -737,11 +737,12 @@ tokudb_expand_int_field( ...@@ -737,11 +737,12 @@ tokudb_expand_int_field(
assert(extra_pos == (uchar *)extra->data + extra->size); // consumed the entire message assert(extra_pos == (uchar *)extra->data + extra->size); // consumed the entire message
assert(new_length >= old_length); // expand only assert(new_length >= old_length); // expand only
assert(the_offset + old_length <= old_val->size); // old field within the old val
DBT new_val; memset(&new_val, 0, sizeof new_val); DBT new_val; memset(&new_val, 0, sizeof new_val);
if (old_val != NULL) { if (old_val != NULL) {
assert(the_offset + old_length <= old_val->size); // old field within the old val
// compute the new val from the old val // compute the new val from the old val
uchar *old_val_ptr = (uchar *)old_val->data; uchar *old_val_ptr = (uchar *)old_val->data;
...@@ -835,11 +836,12 @@ tokudb_expand_char_field( ...@@ -835,11 +836,12 @@ tokudb_expand_char_field(
assert(extra_pos == (uchar *)extra->data + extra->size); // consumed the entire message assert(extra_pos == (uchar *)extra->data + extra->size); // consumed the entire message
assert(new_length >= old_length); // expand only assert(new_length >= old_length); // expand only
assert(the_offset + old_length <= old_val->size); // old field within the old val
DBT new_val; memset(&new_val, 0, sizeof new_val); DBT new_val; memset(&new_val, 0, sizeof new_val);
if (old_val != NULL) { if (old_val != NULL) {
assert(the_offset + old_length <= old_val->size); // old field within the old val
// compute the new val from the old val // compute the new val from the old val
uchar *old_val_ptr = (uchar *)old_val->data; uchar *old_val_ptr = (uchar *)old_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