Commit 06083cdc authored by unknown's avatar unknown
Browse files

Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-telco-gca-single-user

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-single-user


ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
ndb/include/kernel/signaldata/DictTabInfo.hpp:
  manual merge
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  manual merge
parents 201af2d8 a80c9cce
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ public:
    MinRowsLow         = 143,
    MinRowsHigh        = 144,

    SingleUserMode     = 152,

    TableEnd           = 999,
    
    AttributeName          = 1000, // String, Mandatory
@@ -273,6 +275,7 @@ public:
    Uint32 MaxRowsHigh;
    Uint32 MinRowsLow;
    Uint32 MinRowsHigh;
    Uint32 SingleUserMode;
    
    Table() {}
    void init();
+7 −0
Original line number Diff line number Diff line
@@ -68,4 +68,11 @@

#define NDB_TYPE_MAX                    31
 
/*
 * Table single user mode
 */
#define NDB_SUM_LOCKED       0
#define NDB_SUM_READONLY     1
#define NDB_SUM_READ_WRITE   2

#endif
+16 −0
Original line number Diff line number Diff line
@@ -497,6 +497,15 @@ public:
   */
  class Table : public Object {
  public:
    /*
     * Single user mode specifies access rights to table during single user mode
     */
    enum SingleUserMode {
      SingleUserModeLocked    = NDB_SUM_LOCKED,
      SingleUserModeReadOnly  = NDB_SUM_READONLY,
      SingleUserModeReadWrite = NDB_SUM_READ_WRITE
    };

    /** 
     * @name General
     * @{
@@ -735,6 +744,13 @@ public:
    void setMinRows(Uint64 minRows);
    Uint64 getMinRows() const;

    /**
     * Set/Get SingleUserMode
     */
    void setSingleUserMode(enum SingleUserMode);
    enum SingleUserMode getSingleUserMode() const;


    /** @} *******************************************************************/

#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
+3 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ DictTabInfo::TableMapping[] = {
  DTIMAP(Table, MaxRowsHigh, MaxRowsHigh),
  DTIMAP(Table, MinRowsLow, MinRowsLow),
  DTIMAP(Table, MinRowsHigh, MinRowsHigh),
  DTIMAP(Table, SingleUserMode, SingleUserMode),
  DTIBREAK(AttributeName)
};

@@ -131,6 +132,8 @@ DictTabInfo::Table::init(){
  MaxRowsHigh = 0;
  MinRowsLow = 0;
  MinRowsHigh = 0;

  SingleUserMode = 0;
}

void
+6 −3
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ Dbdict::packTableIntoPagesImpl(SimpleProperties::Writer & w,
  w.add(DictTabInfo::MaxRowsHigh, tablePtr.p->maxRowsHigh);
  w.add(DictTabInfo::MinRowsLow, tablePtr.p->minRowsLow);
  w.add(DictTabInfo::MinRowsHigh, tablePtr.p->minRowsHigh);
  
  w.add(DictTabInfo::SingleUserMode, tablePtr.p->singleUserMode);
  if(!signal)
  {
    w.add(DictTabInfo::FragmentCount, tablePtr.p->fragmentCount);
@@ -1500,6 +1500,7 @@ void Dbdict::initialiseTableRecord(TableRecordPtr tablePtr)
  tablePtr.p->maxRowsHigh = 0;
  tablePtr.p->minRowsLow = 0;
  tablePtr.p->minRowsHigh = 0;
  tablePtr.p->singleUserMode = 0;
  tablePtr.p->storedTable = true;
  tablePtr.p->tableType = DictTabInfo::UserTable;
  tablePtr.p->primaryTableId = RNIL;
@@ -4714,8 +4715,9 @@ Dbdict::execTAB_COMMITCONF(Signal* signal){
    signal->theData[4] = (Uint32)tabPtr.p->tableType;
    signal->theData[5] = createTabPtr.p->key;
    signal->theData[6] = (Uint32)tabPtr.p->noOfPrimkey;
    signal->theData[7] = (Uint32)tabPtr.p->singleUserMode;

    sendSignal(DBTC_REF, GSN_TC_SCHVERREQ, signal, 7, JBB);
    sendSignal(DBTC_REF, GSN_TC_SCHVERREQ, signal, 8, JBB);
    return;
  }
  
@@ -5080,6 +5082,7 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
  tablePtr.p->maxRowsHigh = tableDesc.MaxRowsHigh;
  tablePtr.p->minRowsLow = tableDesc.MinRowsLow;
  tablePtr.p->minRowsHigh = tableDesc.MinRowsHigh;
  tablePtr.p->singleUserMode = tableDesc.SingleUserMode;

  tablePtr.p->frmLen = tableDesc.FrmLen;
  memcpy(tablePtr.p->frmData, tableDesc.FrmData, tableDesc.FrmLen);  
Loading