Commit 40f44b48 authored by unknown's avatar unknown
Browse files

ndb - bug#18781 lock DICT during node restart


ndb/src/kernel/main.cpp:
  signal log from start (#if 0-ed)
ndb/test/ndbapi/testDict.cpp:
  test NF/NR + dict ops
ndb/src/kernel/vm/DLFifoList.hpp:
  add hasPrev
ndb/src/kernel/vm/pc.hpp:
  ERROR_INSERTED_CLEAR(x) test and clear if set
ndb/src/common/debugger/SignalLoggerManager.cpp:
  block no fix
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  spelling
ndb/include/kernel/GlobalSignalNumbers.h:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/AlterTable.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/CreateTable.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/DictLock.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/DropTable.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/common/debugger/signaldata/SignalNames.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/ERROR_codes.txt:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/ndbapi/ndberror.c:
  locking of master DICT against schema ops, used by slave DIH under NR
parent d9590820
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -507,16 +507,12 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_TEST_ORD                    407
#define GSN_TESTSIG                     408
#define GSN_TIME_SIGNAL                 409
/* 410 unused  */
/* 411 unused  */
/* 412 unused */
#define GSN_TUP_ABORTREQ                414
#define GSN_TUP_ADD_ATTCONF             415
#define GSN_TUP_ADD_ATTRREF             416
#define GSN_TUP_ADD_ATTRREQ             417
#define GSN_TUP_ATTRINFO                418
#define GSN_TUP_COMMITREQ               419
/* 420 unused */
#define GSN_TUP_LCPCONF                 421
#define GSN_TUP_LCPREF                  422
#define GSN_TUP_LCPREQ                  423
@@ -938,4 +934,10 @@ extern const GlobalSignalNumber NO_OF_SIGNAL_NAMES;
#define GSN_ACC_LOCKREQ			711
#define GSN_READ_PSUEDO_REQ             712

/* DICT LOCK signals */
#define GSN_DICT_LOCK_REQ               410
#define GSN_DICT_LOCK_CONF              411
#define GSN_DICT_LOCK_REF               412
#define GSN_DICT_UNLOCK_ORD             420

#endif
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ public:
    InvalidTableVersion = 241,
    DropInProgress      = 283,
    Busy = 701,
    BusyWithNR = 711,
    NotMaster = 702,
    InvalidFormat = 703,
    AttributeNameTooLong = 704,
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ public:
  enum ErrorCode {
    NoError = 0,
    Busy = 701,
    BusyWithNR = 711,
    NotMaster = 702,
    InvalidFormat = 703,
    AttributeNameTooLong = 704,
+76 −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 DICT_LOCK_HPP
#define DICT_LOCK_HPP

#include "SignalData.hpp"

// see comments in Dbdict.hpp

class DictLockReq {
  friend class Dbdict;
  friend class Dbdih;
public:
  STATIC_CONST( SignalLength = 3 );
  enum LockType {
    NoLock = 0,
    NodeRestartLock = 1
  };
private:
  Uint32 userPtr;
  Uint32 lockType;
  Uint32 userRef;
};

class DictLockConf {
  friend class Dbdict;
  friend class Dbdih;
public:
  STATIC_CONST( SignalLength = 3 );
private:
  Uint32 userPtr;
  Uint32 lockType;
  Uint32 lockPtr;
};

class DictLockRef {
  friend class Dbdict;
  friend class Dbdih;
public:
  STATIC_CONST( SignalLength = 3 );
  enum ErrorCode {
    NotMaster = 1,
    InvalidLockType = 2,
    TooManyRequests = 3
  };
private:
  Uint32 userPtr;
  Uint32 lockType;
  Uint32 errorCode;
};

class DictUnlockOrd {
  friend class Dbdict;
  friend class Dbdih;
public:
  STATIC_CONST( SignalLength = 2 );
private:
  Uint32 lockPtr;
  Uint32 lockType;
};

#endif
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ public:
  
  enum ErrorCode {
    Busy = 701,
    BusyWithNR = 711,
    NotMaster = 702,
    NoSuchTable         = 709,
    InvalidTableVersion = 241,
Loading