Commit 8029838f authored by unknown's avatar unknown
Browse files

Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb

into  perch.ndb.mysql.com:/home/jonas/src/51-work


storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Auto merged
storage/ndb/test/include/HugoTransactions.hpp:
  Auto merged
storage/ndb/test/src/HugoTransactions.cpp:
  Auto merged
parents d0baba61 785de403
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -8529,11 +8529,20 @@ void Dbdih::openingTableErrorLab(Signal* signal, FileRecordPtr filePtr)
  /*    WE FAILED IN OPENING A FILE. IF THE FIRST FILE THEN TRY WITH THE    */
  /*    DUPLICATE FILE, OTHERWISE WE REPORT AN ERROR IN THE SYSTEM RESTART. */
  /* ---------------------------------------------------------------------- */
  ndbrequire(filePtr.i == tabPtr.p->tabFile[0]);
  if (filePtr.i == tabPtr.p->tabFile[0])
  {
    filePtr.i = tabPtr.p->tabFile[1];
    ptrCheckGuard(filePtr, cfileFileSize, fileRecord);
    openFileRw(signal, filePtr);
    filePtr.p->reqStatus = FileRecord::OPENING_TABLE;
  }
  else
  {
    char buf[256];
    BaseString::snprintf(buf, "Error opening DIH schema files for table: %d",
			 tabPtr.i);
    progError(__LINE__, NDBD_EXIT_AFS_NO_SUCH_FILE, buf);
  }
}//Dbdih::openingTableErrorLab()
void Dbdih::readingTableLab(Signal* signal, FileRecordPtr filePtr) 
+1 −3
Original line number Diff line number Diff line
@@ -12789,19 +12789,17 @@ void Dblqh::lastWriteInFileLab(Signal* signal)
void Dblqh::writePageZeroLab(Signal* signal) 
{
  if (false && logPartPtr.p->logPartState == LogPartRecord::FILE_CHANGE_PROBLEM) 
  if (logPartPtr.p->logPartState == LogPartRecord::FILE_CHANGE_PROBLEM) 
  {
    if (logPartPtr.p->firstLogQueue == RNIL) 
    {
      jam();
      logPartPtr.p->logPartState = LogPartRecord::IDLE;
      ndbout_c("resetting logPartState to IDLE");
    } 
    else 
    {
      jam();
      logPartPtr.p->logPartState = LogPartRecord::ACTIVE;
      ndbout_c("resetting logPartState to ACTIVE");
    }
  }
  
+1015 −0

File added.

Preview size limit exceeded, changes collapsed.

+79 −0
Original line number Diff line number Diff line
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#ifndef DYNARR256_HPP
#define DYNARR256_HPP

#include "Pool.hpp"

class DynArr256;
struct DA256Page;

class DynArr256Pool
{
  friend class DynArr256;
public:
  DynArr256Pool();
  
  void init(Uint32 type_id, const Pool_context& pc);
  
protected:
  Uint32 m_type_id;
  Uint32 m_first_free;
  Pool_context m_ctx;
  struct DA256Page* m_memroot;
  
private:
  Uint32 seize();
  void release(Uint32);
};

class DynArr256
{
public:
  struct Head
  {
    Head() { m_ptr_i = RNIL; m_sz = 0;}
    
    Uint32 m_ptr_i;
    Uint32 m_sz;
  };
  
  DynArr256(DynArr256Pool & pool, Head& head) : 
    m_head(head), m_pool(pool){}
  
  Uint32* set(Uint32 pos);
  Uint32* get(Uint32 pos) const ;
  
  struct ReleaseIterator
  {
    Uint32 m_sz;
    Uint32 m_pos;
    Uint32 m_ptr_i[4];
  };
  
  void init(ReleaseIterator&);
  bool release(ReleaseIterator&);
  
protected:
  Head & m_head;
  DynArr256Pool & m_pool;
  
  bool expand(Uint32 pos);
  void handle_invalid_ptr(Uint32 pos, Uint32 ptrI, Uint32 p0);
};

#endif
+14 −3

File changed.

Preview size limit exceeded, changes collapsed.

Loading