MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ndb.hpp
1 /*
2  Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
460 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
461 
469 #endif
470 
543 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
544 
563 #endif
564 
695 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
696 
701 #endif
702 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
703 
707 #endif
708 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
709 
714 #endif
715 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
716 
774 #endif
775 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
776 
848 #endif
849 
850 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
851 
951 #endif
952 
953 
968 #ifndef Ndb_H
969 #define Ndb_H
970 
971 #include <ndb_types.h>
972 #include "ndbapi_limits.h"
973 #include "ndb_cluster_connection.hpp"
974 #include "NdbError.hpp"
975 #include "NdbDictionary.hpp"
976 
977 class NdbObjectIdMap;
978 class NdbOperation;
980 class NdbScanOperation;
982 class NdbIndexOperation;
983 class NdbTransaction;
984 class NdbApiSignal;
985 class NdbRecAttr;
986 class NdbLabel;
987 class NdbBranch;
988 class NdbSubroutine;
989 class NdbCall;
990 class Table;
991 class BaseString;
992 class NdbEventOperation;
993 class NdbBlob;
994 class NdbReceiver;
995 class TransporterFacade;
996 class PollGuard;
998 template <class T> struct Ndb_free_list_t;
999 class NdbLockHandle;
1000 
1001 typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*);
1002 
1003 #define WAITFOR_RESPONSE_TIMEOUT 120000 // Milliseconds
1004 
1005 #define NDB_SYSTEM_DATABASE "sys"
1006 #define NDB_SYSTEM_SCHEMA "def"
1007 
1037 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1038 // to be documented later
1039 /*
1040  * If one Ndb object is used to handle parallel transactions through the
1041  * asynchronous programming interface, please read the notes regarding
1042  * asynchronous transactions (Section @ref secAsync).
1043  * The asynchronous interface provides much higher performance
1044  * in some situations, but is more complicated for the application designer.
1045  *
1046  * @note Each Ndb object should either use the methods for
1047  * asynchronous transaction or the methods for
1048  * synchronous transactions but not both.
1049  */
1050 #endif
1051 
1052 class Ndb
1053 {
1054 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1055  friend class NdbReceiver;
1056  friend class NdbOperation;
1057  friend class NdbEventOperationImpl;
1058  friend class NdbEventBuffer;
1059  friend class NdbTransaction;
1060  friend class Table;
1061  friend class NdbApiSignal;
1062  friend class NdbIndexOperation;
1063  friend class NdbScanOperation;
1064  friend class NdbIndexScanOperation;
1065  friend class NdbDictionary::Dictionary;
1066  friend class NdbDictionaryImpl;
1067  friend class NdbDictInterface;
1068  friend class NdbBlob;
1069  friend class NdbImpl;
1070  friend class Ndb_cluster_connection;
1071  friend class Ndb_cluster_connection_impl;
1072  friend class Ndb_internal;
1073  friend class NdbScanFilterImpl;
1074  friend class PollGuard;
1075  friend class NdbQueryImpl;
1076  friend class NdbQueryOperationImpl;
1077 #endif
1078 
1079 public:
1099  Ndb(Ndb_cluster_connection *ndb_cluster_connection,
1100  const char* aCatalogName = "", const char* aSchemaName = "def");
1101 
1102  ~Ndb();
1103 
1104 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1105 
1111 #endif
1112 
1113 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1114 
1119  const char * getCatalogName() const;
1120 
1126  int setCatalogName(const char * aCatalogName);
1127 
1133  const char * getSchemaName() const;
1134 
1140  int setSchemaName(const char * aSchemaName);
1141 #endif
1142 
1148  const char * getDatabaseName() const;
1149 
1155  int setDatabaseName(const char * aDatabaseName);
1156 
1162  const char * getDatabaseSchemaName() const;
1163 
1169  int setDatabaseSchemaName(const char * aDatabaseSchemaName);
1170 
1171 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1172 
1178 #endif
1179 
1193  int init(int maxNoOfTransactions = 4);
1194 
1195 #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
1196 
1208  int waitUntilReady(int timeout = 60);
1209 #endif
1210 
1227 
1228 
1244  NdbEventOperation* createEventOperation(const char* eventName);
1253  int dropEventOperation(NdbEventOperation* eventOp);
1254 
1264  int pollEvents(int aMillisecondNumber, Uint64 *latestGCI= 0);
1265 
1272 
1284  bool isConsistent(Uint64& gci);
1285 
1296  bool isConsistentGCI(Uint64 gci);
1297 
1306  const NdbEventOperation*
1307  getGCIEventOperations(Uint32* iter, Uint32* event_types);
1308 
1309 
1310 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1311  int flushIncompleteEvents(Uint64 gci);
1312  NdbEventOperation *getEventOperation(NdbEventOperation* eventOp= 0);
1313  Uint64 getLatestGCI();
1314  void forceGCP();
1315  void setReportThreshEventGCISlip(unsigned thresh);
1316  void setReportThreshEventFreeMem(unsigned thresh);
1317 #endif
1318 
1343  const char *keyData = 0,
1344  Uint32 keyLen = 0);
1345 
1346 
1354  {
1355  const void * ptr;
1356  unsigned len;
1357  };
1358 
1380  {
1381  enum SpecType
1382  {
1383  PS_NONE = 0,
1384  PS_USER_DEFINED = 1,
1385  PS_DISTR_KEY_PART_PTR = 2,
1386  PS_DISTR_KEY_RECORD = 3
1387  };
1388 
1389  Uint32 type;
1390 
1391  union
1392  {
1393  struct {
1394  Uint32 partitionId;
1395  } UserDefined;
1396 
1397  struct {
1398  const Key_part_ptr* tableKeyParts;
1399  void* xfrmbuf;
1400  Uint32 xfrmbuflen;
1401  } KeyPartPtr;
1402 
1403  struct {
1404  const NdbRecord* keyRecord;
1405  const char* keyRow;
1406  void* xfrmbuf;
1407  Uint32 xfrmbuflen;
1408  } KeyRecord;
1409  };
1410  };
1411 
1412 #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
1413  /* First version of PartitionSpec, defined here for
1414  * backwards compatibility reasons
1415  */
1417  {
1418  enum SpecType
1419  {
1420  PS_NONE = 0,
1421  PS_USER_DEFINED = 1,
1422  PS_DISTR_KEY_PART_PTR = 2
1423  };
1424 
1425  Uint32 type;
1426 
1427  union
1428  {
1429  struct {
1430  Uint32 partitionId;
1431  } UserDefined;
1432 
1433  struct {
1434  const Key_part_ptr* tableKeyParts;
1435  void* xfrmbuf;
1436  Uint32 xfrmbuflen;
1437  } KeyPartPtr;
1438  };
1439  };
1440 #endif
1441 
1466  const struct Key_part_ptr * keyData,
1467  void* xfrmbuf = 0, Uint32 xfrmbuflen = 0);
1468 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1469  NdbTransaction* startTransaction(const NdbRecord *keyRec, const char *keyData,
1470  void* xfrmbuf, Uint32 xfrmbuflen);
1471 #endif
1472 
1478  Uint32 partitionId);
1479 
1500  static int computeHash(Uint32* hashvalueptr,
1501  const NdbDictionary::Table*,
1502  const struct Key_part_ptr * keyData,
1503  void* xfrmbuf = 0, Uint32 xfrmbuflen = 0);
1504 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1505  static int computeHash(Uint32* hashvalueptr,
1506  const NdbRecord *keyRec, const char *keyData,
1507  void* xfrmbuf, Uint32 xfrmbuflen);
1508 #endif
1509 
1515 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1516 
1526 #endif
1528 
1531 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1532  // to be documented later
1557  int pollNdb(int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
1558  int minNoOfEventsToWakeup = 1);
1559 
1577  void sendPreparedTransactions(int forceSend = 0);
1578 
1605  int sendPollNdb(int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
1606  int minNoOfEventsToWakeup = 1,
1607  int forceSend = 0);
1609 #endif
1610 
1621  const NdbError & getNdbError() const;
1622 
1628  const NdbError & getNdbError(int errorCode);
1629 
1639  const char* getNdbErrorDetail(const NdbError& err,
1640  char* buff,
1641  Uint32 buffLen) const;
1642 
1645 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1646 
1651  int getNodeId();
1652 
1653  bool usingFullyQualifiedNames();
1654 
1659  enum TamperType {
1665 
1666  };
1667 
1680  struct TupleIdRange {
1681  TupleIdRange() {}
1682  Uint64 m_first_tuple_id;
1683  Uint64 m_last_tuple_id;
1684  Uint64 m_highest_seen;
1685  void reset() {
1686  m_first_tuple_id = ~(Uint64)0;
1687  m_last_tuple_id = ~(Uint64)0;
1688  m_highest_seen = 0;
1689  };
1690  };
1691 
1692  int initAutoIncrement();
1693 
1694  int getAutoIncrementValue(const char* aTableName,
1695  Uint64 & autoValue, Uint32 cacheSize,
1696  Uint64 step = 1, Uint64 start = 1);
1697  int getAutoIncrementValue(const NdbDictionary::Table * aTable,
1698  Uint64 & autoValue, Uint32 cacheSize,
1699  Uint64 step = 1, Uint64 start = 1);
1700  int getAutoIncrementValue(const NdbDictionary::Table * aTable,
1701  TupleIdRange & range, Uint64 & autoValue,
1702  Uint32 cacheSize,
1703  Uint64 step = 1, Uint64 start = 1);
1704  int readAutoIncrementValue(const char* aTableName,
1705  Uint64 & autoValue);
1706  int readAutoIncrementValue(const NdbDictionary::Table * aTable,
1707  Uint64 & autoValue);
1708  int readAutoIncrementValue(const NdbDictionary::Table * aTable,
1709  TupleIdRange & range, Uint64 & autoValue);
1710  int setAutoIncrementValue(const char* aTableName,
1711  Uint64 autoValue, bool modify);
1712  int setAutoIncrementValue(const NdbDictionary::Table * aTable,
1713  Uint64 autoValue, bool modify);
1714  int setAutoIncrementValue(const NdbDictionary::Table * aTable,
1715  TupleIdRange & range, Uint64 autoValue,
1716  bool modify);
1717 #ifdef NDBAPI_50_COMPAT
1718  Uint64 getAutoIncrementValue(const NdbDictionary::Table * aTable,
1719  Uint32 cacheSize = 1)
1720  {
1721  Uint64 val;
1722  if (getAutoIncrementValue(aTable, val, cacheSize, 1, 1) == -1)
1723  return ~(Uint64)0;
1724  return val;
1725  }
1726 #endif
1727  bool checkUpdateAutoIncrementValue(TupleIdRange & range, Uint64 autoValue);
1728 private:
1729  int getTupleIdFromNdb(const NdbTableImpl* table,
1730  TupleIdRange & range, Uint64 & tupleId,
1731  Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1);
1732  int readTupleIdFromNdb(const NdbTableImpl* table,
1733  TupleIdRange & range, Uint64 & tupleId);
1734  int setTupleIdInNdb(const NdbTableImpl* table,
1735  TupleIdRange & range, Uint64 tupleId, bool modify);
1736  int checkTupleIdInNdb(TupleIdRange & range,
1737  Uint64 tupleId);
1738  int opTupleIdOnNdb(const NdbTableImpl* table,
1739  TupleIdRange & range, Uint64 & opValue, Uint32 op);
1740 public:
1741 
1744  NdbTransaction* hupp( NdbTransaction* );
1745  Uint32 getReference() const { return theMyRef;}
1746 
1748  {
1749  const char * m_name;
1750  Uint32 m_created;
1751  Uint32 m_free;
1752  Uint32 m_sizeof;
1753  };
1754 
1755  Free_list_usage * get_free_list_usage(Free_list_usage*);
1756 
1757  /* Get minimum known DB node version */
1758  Uint32 getMinDbNodeVersion() const;
1759 
1760  /* Get/Set per-Ndb custom data pointer */
1761  void setCustomData(void*);
1762  void* getCustomData() const;
1763 
1764  /* Some client behaviour counters to assist
1765  * optimisation
1766  */
1767  enum ClientStatistics
1768  {
1769  /* Latency avoidance : */
1770  /* Number of times user thread blocked waiting for data node response */
1771  WaitExecCompleteCount = 0, /* Waiting for PK/UK/Scan requests to complete */
1772  WaitScanResultCount = 1, /* Waiting for next scan batch(es) to arrive */
1773  WaitMetaRequestCount = 2, /* Waiting for some meta data operation to complete */
1774 
1775  /* Measured latency */
1776  WaitNanosCount = 3, /* Nanoseconds spent waiting for kernel response */
1777 
1778  /* Data transfer */
1779  BytesSentCount = 4, /* Bytes sent to kernel by this object */
1780  BytesRecvdCount = 5, /* Bytes received from kernel by this object */
1781 
1782  /* Work performed */
1783  TransStartCount = 6, /* Transactions started */
1784  TransCommitCount = 7, /* Transactions committed */
1785  TransAbortCount = 8, /* Transactions aborted */
1786  TransCloseCount = 9, /* Transactions closed */
1787 
1788  PkOpCount = 10, /* Primary key operation count */
1789  UkOpCount = 11, /* Unique key operation count */
1790  TableScanCount = 12, /* Table scans */
1791  RangeScanCount = 13, /* Range scans */
1792 
1793  /* Efficiency */
1794  PrunedScanCount = 14, /* Count of scans scanning 1 fragment */
1795  ScanBatchCount = 15, /* Count of scan batches received */
1796  ReadRowCount = 16, /* Rows returned to API, from PK/UK/Scan */
1797  TransLocalReadRowCount = 17, /* Rows returned to API from trans node */
1798 
1799  /* Event Api */
1800  DataEventsRecvdCount = 18, /* Number of table data change events received */
1801  NonDataEventsRecvdCount = 19, /* Number of non-data events received */
1802  EventBytesRecvdCount = 20, /* Number of bytes of event data received */
1803 
1804  NumClientStatistics = 21 /* End marker */
1805  };
1806 
1807  Uint64 getClientStat(Uint32 id) const;
1808  const char* getClientStatName(Uint32 id) const;
1809 #endif
1810 
1811 private:
1812 /*****************************************************************************
1813  * These are service routines used by the other classes in the NDBAPI.
1814  ****************************************************************************/
1815  Uint32 _unused;
1816  void *_unused2;
1817 
1818  Ndb(const Ndb&); // Not impl.
1819  Ndb&operator=(const Ndb&);
1820 
1821  void setup(Ndb_cluster_connection *ndb_cluster_connection,
1822  const char* aCatalogName, const char* aSchemaName);
1823 
1824  void connected(Uint32 block_reference);
1825 
1826 
1827  NdbTransaction* startTransactionLocal(Uint32 aPrio, Uint32 aNode,
1828  Uint32 instance);
1829 
1830 // Connect the connection object to the Database.
1831  int NDB_connect(Uint32 tNode, Uint32 instance);
1832  NdbTransaction* doConnect(Uint32 nodeId, Uint32 instance);
1833  void doDisconnect();
1834 
1835  NdbReceiver* getNdbScanRec();// Get a NdbScanReceiver from idle list
1836  NdbLabel* getNdbLabel(); // Get a NdbLabel from idle list
1837  NdbBranch* getNdbBranch(); // Get a NdbBranch from idle list
1838  NdbSubroutine* getNdbSubroutine();// Get a NdbSubroutine from idle
1839  NdbCall* getNdbCall(); // Get a NdbCall from idle list
1840  NdbApiSignal* getSignal(); // Get an operation from idle list
1841  NdbRecAttr* getRecAttr(); // Get a receeive attribute object from
1842  // idle list of the Ndb object.
1843  NdbOperation* getOperation(); // Get an operation from idle list
1844  NdbIndexScanOperation* getScanOperation(); // Get a scan operation from idle
1845  NdbIndexOperation* getIndexOperation();// Get an index operation from idle
1846 
1847  NdbBlob* getNdbBlob();// Get a blob handle etc
1848 
1849  NdbLockHandle* getLockHandle(); // Get a lock handle.
1850 
1851  void releaseSignal(NdbApiSignal* anApiSignal);
1852  void releaseSignals(Uint32, NdbApiSignal*, NdbApiSignal*);
1853  void releaseSignalsInList(NdbApiSignal** pList);
1854  void releaseNdbScanRec(NdbReceiver* aNdbScanRec);
1855  void releaseNdbLabel(NdbLabel* anNdbLabel);
1856  void releaseNdbBranch(NdbBranch* anNdbBranch);
1857  void releaseNdbSubroutine(NdbSubroutine* anNdbSubroutine);
1858  void releaseNdbCall(NdbCall* anNdbCall);
1859  void releaseRecAttr (NdbRecAttr* aRecAttr);
1860  void releaseOperation(NdbOperation* anOperation);
1861  void releaseScanOperation(NdbIndexScanOperation*);
1862  void releaseNdbBlob(NdbBlob* aBlob);
1863  void releaseLockHandle(NdbLockHandle* lh);
1864 
1865  void check_send_timeout();
1866  void remove_sent_list(Uint32);
1867  Uint32 insert_completed_list(NdbTransaction*);
1868  Uint32 insert_sent_list(NdbTransaction*);
1869 
1870  // Handle a received signal. Used by both
1871  // synchronous and asynchronous interface
1872  void handleReceivedSignal(const NdbApiSignal* anApiSignal,
1873  const struct LinearSectionPtr ptr[3]);
1874 
1875  int sendRecSignal(Uint16 aNodeId,
1876  Uint32 aWaitState,
1877  NdbApiSignal* aSignal,
1878  Uint32 nodeSequence,
1879  Uint32 *ret_conn_seq= 0);
1880 
1881  // Get block number of this NDBAPI object
1882  int getBlockNumber();
1883 
1884  /****************************************************************************
1885  * These are local service routines used by this class.
1886  ***************************************************************************/
1887 
1888  int createConIdleList(int aNrOfCon);
1889  int createOpIdleList( int nrOfOp );
1890 
1891  void freeOperation(); // Free the first idle operation.
1892  void freeScanOperation(); // Free the first idle scan operation.
1893  void freeIndexOperation(); // Free the first idle index operation.
1894  void freeNdbCon(); // Free the first idle connection.
1895  void freeSignal(); // Free the first idle signal
1896  void freeRecAttr(); // Free the first idle receive attr obj
1897  void freeNdbLabel(); // Free the first idle NdbLabel obj
1898  void freeNdbBranch();// Free the first idle NdbBranch obj
1899  void freeNdbSubroutine();// Free the first idle NdbSubroutine obj
1900  void freeNdbCall(); // Free the first idle NdbCall obj
1901  void freeNdbScanRec(); // Free the first idle NdbScanRec obj
1902  void freeNdbBlob(); // Free the first etc
1903 
1904  NdbTransaction* getNdbCon(); // Get a connection from idle list
1905 
1910  NdbTransaction* getConnectedNdbTransaction(Uint32 nodeId, Uint32 instance);
1911 
1912  // Release and disconnect from DBTC a connection
1913  // and seize it to theConIdleList
1914  void releaseConnectToNdb (NdbTransaction*);
1915 
1916  // Release a connection to idle list
1917  void releaseNdbCon (NdbTransaction*);
1918 
1919  int checkInitState(); // Check that we are initialized
1920  void report_node_failure(Uint32 node_id); // Report Failed node
1921  void report_node_failure_completed(Uint32 node_id); // Report Failed node(NF comp.)
1922 
1923  void checkFailedNode(); // Check for failed nodes
1924 
1925  int NDB_connect(); // Perform connect towards NDB Kernel
1926 
1927  // Release arrays of NdbTransaction pointers
1928  void releaseTransactionArrays();
1929 
1930  Uint32 pollCompleted(NdbTransaction** aCopyArray);
1931  void sendPrepTrans(int forceSend);
1932  void reportCallback(NdbTransaction** aCopyArray, Uint32 aNoOfComplTrans);
1933  int poll_trans(int milliSecs, int noOfEventsToWaitFor, PollGuard *pg);
1934  void waitCompletedTransactions(int milliSecs, int noOfEventsToWaitFor,
1935  PollGuard *pg);
1936  void completedTransaction(NdbTransaction* aTransaction);
1937  void completedScanTransaction(NdbTransaction* aTransaction);
1938 
1939  void abortTransactionsAfterNodeFailure(Uint16 aNodeId);
1940 
1941  static
1942  const char * externalizeTableName(const char * internalTableName,
1943  bool fullyQualifiedNames);
1944  const char * externalizeTableName(const char * internalTableName);
1945  const BaseString internalize_table_name(const char * external_name) const;
1946 
1947  static
1948  const char * externalizeIndexName(const char * internalIndexName,
1949  bool fullyQualifiedNames);
1950  const char * externalizeIndexName(const char * internalIndexName);
1951  const BaseString old_internalize_index_name(const NdbTableImpl * table,
1952  const char * external_name) const;
1953  const BaseString internalize_index_name(const NdbTableImpl * table,
1954  const char * external_name) const;
1955 
1956  static
1957  const BaseString getDatabaseFromInternalName(const char * internalName);
1958  static
1959  const BaseString getSchemaFromInternalName(const char * internalName);
1960 
1961  void* int2void (Uint32 val);
1962  NdbReceiver* void2rec (void* val);
1963  NdbTransaction* void2con (void* val);
1964  NdbOperation* void2rec_op (void* val);
1965  NdbIndexOperation* void2rec_iop (void* val);
1966  NdbTransaction* lookupTransactionFromOperation(const class TcKeyConf *);
1967 
1968  Uint64 allocate_transaction_id();
1969 
1970 /******************************************************************************
1971  * These are the private variables in this class.
1972  *****************************************************************************/
1973  NdbTransaction** thePreparedTransactionsArray;
1974  NdbTransaction** theSentTransactionsArray;
1975  NdbTransaction** theCompletedTransactionsArray;
1976 
1977  Uint32 theNoOfPreparedTransactions;
1978  Uint32 theNoOfSentTransactions;
1979  Uint32 theNoOfCompletedTransactions;
1980  Uint32 theRemainingStartTransactions;
1981  Uint32 theMaxNoOfTransactions;
1982  Uint32 theMinNoOfEventsToWakeUp;
1983 
1984  Uint32 theNextConnectNode;
1985 
1986  bool fullyQualifiedNames;
1987 
1988 
1989 
1990  class NdbImpl * theImpl;
1991  class NdbDictionaryImpl* theDictionary;
1992  class NdbEventBuffer* theEventBuffer;
1993 
1994  NdbTransaction* theTransactionList;
1995  NdbTransaction** theConnectionArray;
1996 
1997  Uint32 theMyRef; // My block reference
1998  Uint32 theNode; // The node number of our node
1999 
2000  Uint64 the_last_check_time;
2001  Uint64 theFirstTransId;
2002  // The tupleId is retrieved from DB
2003  const NdbDictionary::Table *m_sys_tab_0;
2004 
2005  Uint32 theRestartGCI; // the Restart GCI used by DIHNDBTAMPER
2006 
2007  NdbError theError;
2008 
2009  Int32 theNdbBlockNumber;
2010 
2011  enum InitType {
2012  NotConstructed,
2013  NotInitialised,
2014  StartingInit,
2015  Initialised,
2016  InitConfigError
2017  } theInitState;
2018 
2019  NdbApiSignal* theCommitAckSignal;
2020 
2021  /* Cached minimum connected Db node version */
2022  Uint32 theCachedMinDbNodeVersion;
2023 
2024 
2025 #ifdef POORMANSPURIFY
2026  int cfreeSignals;
2027  int cnewSignals;
2028  int cgetSignals;
2029  int creleaseSignals;
2030 #endif
2031 
2032 #ifdef VM_TRACE
2033 #include <my_attribute.h>
2034  void printState(const char* fmt, ...)
2035  ATTRIBUTE_FORMAT(printf, 2, 3);
2036 #endif
2037 };
2038 
2039 #endif