~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
    Uint8 tckeyrec; // �ndrad fr�n R
711
711
    Uint8 tcindxrec;
712
712
    Uint8 apiFailState; // �ndrad fr�n R
 
713
    Uint8 singleUserMode;
713
714
    ReturnSignal returnsignal;
714
715
    Uint8 timeOutCounter;
715
716
    
961
962
  struct TableRecord {
962
963
    TableRecord() {}
963
964
    Uint32 currentSchemaVersion;
964
 
    Uint8 enabled;
965
 
    Uint8 dropping;
 
965
    Uint16 m_flags;
966
966
    Uint8 tableType;
967
 
    Uint8 storedTable;
 
967
    Uint8 singleUserMode;
 
968
 
 
969
    enum {
 
970
      TR_ENABLED      = 1 << 0,
 
971
      TR_DROPPING     = 1 << 1,
 
972
      TR_STORED_TABLE = 1 << 2
 
973
    };
 
974
    Uint8 get_enabled()     const { return (m_flags & TR_ENABLED)      != 0; }
 
975
    Uint8 get_dropping()    const { return (m_flags & TR_DROPPING)     != 0; }
 
976
    Uint8 get_storedTable() const { return (m_flags & TR_STORED_TABLE) != 0; }
 
977
    void set_enabled(Uint8 f)     { f ? m_flags |= (Uint16)TR_ENABLED      : m_flags &= ~(Uint16)TR_ENABLED; }
 
978
    void set_dropping(Uint8 f)    { f ? m_flags |= (Uint16)TR_DROPPING     : m_flags &= ~(Uint16)TR_DROPPING; }
 
979
    void set_storedTable(Uint8 f) { f ? m_flags |= (Uint16)TR_STORED_TABLE : m_flags &= ~(Uint16)TR_STORED_TABLE; }
968
980
 
969
981
    Uint8 noOfKeyAttr;
970
982
    Uint8 hasCharAttr;
972
984
    Uint8 hasVarKeys;
973
985
 
974
986
    bool checkTable(Uint32 schemaVersion) const {
975
 
      return enabled && !dropping && 
 
987
      return get_enabled() && !get_dropping() && 
976
988
        (table_version_major(schemaVersion) == table_version_major(currentSchemaVersion));
977
989
    }
978
990
 
1840
1852
                        Uint32 transid2);
1841
1853
  void removeMarkerForFailedAPI(Signal* signal, Uint32 nodeId, Uint32 bucket);
1842
1854
 
1843
 
  bool getAllowStartTransaction() const {
1844
 
    if(getNodeState().getSingleUserMode())
1845
 
      return true;
 
1855
  bool getAllowStartTransaction(Uint32 nodeId, Uint32 table_single_user_mode) const {
 
1856
    if (unlikely(getNodeState().getSingleUserMode()))
 
1857
    {
 
1858
      if (getNodeState().getSingleUserApi() == nodeId || table_single_user_mode)
 
1859
        return true;
 
1860
      else
 
1861
        return false;
 
1862
    }
1846
1863
    return getNodeState().startLevel < NodeState::SL_STOPPING_2;
1847
1864
  }
1848
1865
  
1955
1972
  // those variables should be removed and exchanged for stack
1956
1973
  // variable communication.
1957
1974
  /**************************************************************************/
 
1975
 
 
1976
  Uint32 c_gcp_ref;
1958
1977
};
 
1978
 
1959
1979
#endif