Commit a5170116 authored by unknown's avatar unknown

bug#16924 - ndb - insert wo/ specifying null on varsize attribute

  init both pos and len


storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  init both pos and len
parent e379b87e
...@@ -1114,9 +1114,12 @@ Dbtup::prepare_initial_insert(KeyReqStruct *req_struct, ...@@ -1114,9 +1114,12 @@ Dbtup::prepare_initial_insert(KeyReqStruct *req_struct,
ptr= ALIGN_WORD(dst->m_data_ptr+regTabPtr->m_offsets[MM].m_max_var_offset); ptr= ALIGN_WORD(dst->m_data_ptr+regTabPtr->m_offsets[MM].m_max_var_offset);
order += regTabPtr->m_attributes[MM].m_no_of_fixsize; order += regTabPtr->m_attributes[MM].m_no_of_fixsize;
Uint32 pos= 0; Uint32 pos= 0;
Uint16 *pos_ptr = req_struct->var_pos_array;
Uint16 *len_ptr = pos_ptr + cnt1;
for(Uint32 i= 0; i<cnt1; i++) for(Uint32 i= 0; i<cnt1; i++)
{ {
dst->m_offset_array_ptr[i]= pos; * pos_ptr++ = pos;
* len_ptr++ = pos;
pos += AttributeDescriptor::getSizeInBytes(tab_descr[*order++].tabDescr); pos += AttributeDescriptor::getSizeInBytes(tab_descr[*order++].tabDescr);
} }
} }
......
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