Commit a96a0cd6 authored by unknown's avatar unknown
Browse files

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

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


storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
parents 9fb4f3cd cee179c1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -140,6 +140,8 @@ public:
    RowGCIFlag         = 150,
    RowChecksumFlag    = 151,
    
    SingleUserMode     = 152,

    TableEnd           = 999,
    
    AttributeName          = 1000, // String, Mandatory
@@ -344,6 +346,7 @@ public:
    
    Uint32 RowGCIFlag;
    Uint32 RowChecksumFlag;
    Uint32 SingleUserMode;
    
    Table() {}
    void init();
+7 −0
Original line number Diff line number Diff line
@@ -90,4 +90,11 @@
#define NDB_TEMP_TAB_PERMANENT          0
#define NDB_TEMP_TAB_TEMPORARY          1
 
/*
 * 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
@@ -576,6 +576,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
     * @{
@@ -895,6 +904,13 @@ public:
    void setMinRows(Uint64 minRows);
    Uint64 getMinRows() const;

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


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

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

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

  SingleUserMode = 0;
}

void
+6 −1
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ Dbdict::packTableIntoPages(SimpleProperties::Writer & w,
  w.add(DictTabInfo::FragmentCount, tablePtr.p->fragmentCount);
  w.add(DictTabInfo::MinRowsLow, tablePtr.p->minRowsLow);
  w.add(DictTabInfo::MinRowsHigh, tablePtr.p->minRowsHigh);
  w.add(DictTabInfo::SingleUserMode, tablePtr.p->singleUserMode);

  if(signal)
  {
@@ -1871,6 +1872,7 @@ void Dbdict::initialiseTableRecord(TableRecordPtr tablePtr)
  tablePtr.p->m_bits = 0;
  tablePtr.p->minRowsLow = 0;
  tablePtr.p->minRowsHigh = 0;
  tablePtr.p->singleUserMode = 0;
  tablePtr.p->tableType = DictTabInfo::UserTable;
  tablePtr.p->primaryTableId = RNIL;
  // volatile elements
@@ -5698,7 +5700,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;
    sendSignal(DBTC_REF, GSN_TC_SCHVERREQ, signal, 7, JBB);
    signal->theData[7] = (Uint32)tabPtr.p->singleUserMode;

    sendSignal(DBTC_REF, GSN_TC_SCHVERREQ, signal, 8, JBB);
    return;
  }
  
@@ -6128,6 +6132,7 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
  tablePtr.p->minRowsHigh = c_tableDesc.MinRowsHigh;
  tablePtr.p->defaultNoPartFlag = c_tableDesc.DefaultNoPartFlag; 
  tablePtr.p->linearHashFlag = c_tableDesc.LinearHashFlag; 
  tablePtr.p->singleUserMode = c_tableDesc.SingleUserMode;
  
  {
    Rope frm(c_rope_pool, tablePtr.p->frmData);
Loading