Commit 86b74da6 authored by unknown's avatar unknown
Browse files

ndb -

  Fix error handling when out of diskspace


storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Fix error handling when out of diskspace
parent 4a90a658
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1382,8 +1382,9 @@ int Dbtup::handleInsertReq(Signal* signal,
			regOperPtr.p->userpointer,
			&regOperPtr.p->m_tuple_location);
    
    ((Tuple_header*)ptr)->m_operation_ptr_i= regOperPtr.i;
    ((Tuple_header*)ptr)->m_header_bits= Tuple_header::ALLOC | 
    base = (Tuple_header*)ptr;
    base->m_operation_ptr_i= regOperPtr.i;
    base->m_header_bits= Tuple_header::ALLOC | 
      (varsize ? Tuple_header::CHAINED_ROW : 0);
    regOperPtr.p->m_tuple_location.m_page_no = real_page_id;
  }
@@ -1471,7 +1472,7 @@ int Dbtup::handleInsertReq(Signal* signal,
size_change_error:
  jam();
  terrorCode = ZMEM_NOMEM_ERROR;
  goto disk_prealloc_error;
  goto exit_error;
  
undo_buffer_error:
  jam();
@@ -1505,9 +1506,13 @@ int Dbtup::handleInsertReq(Signal* signal,
    regOperPtr.p->op_struct.in_active_list = false;
    regOperPtr.p->m_tuple_location.setNull();
  }
disk_prealloc_error:
exit_error:
  tupkeyErrorLab(signal);
  return -1;

disk_prealloc_error:
  base->m_header_bits |= Tuple_header::FREED;
  goto exit_error;
}

/* ---------------------------------------------------------------- */