460 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
543 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
695 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
702 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
708 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
715 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
775 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
850 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
971 #include <ndb_types.h>
972 #include "ndbapi_limits.h"
973 #include "ndb_cluster_connection.hpp"
974 #include "NdbError.hpp"
975 #include "NdbDictionary.hpp"
1003 #define WAITFOR_RESPONSE_TIMEOUT 120000 // Milliseconds
1005 #define NDB_SYSTEM_DATABASE "sys"
1006 #define NDB_SYSTEM_SCHEMA "def"
1037 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1054 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1100 const char* aCatalogName =
"",
const char* aSchemaName =
"def");
1104 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1113 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1171 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1193 int init(
int maxNoOfTransactions = 4);
1195 #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
1264 int pollEvents(
int aMillisecondNumber, Uint64 *latestGCI= 0);
1310 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1311 int flushIncompleteEvents(Uint64 gci);
1313 Uint64 getLatestGCI();
1315 void setReportThreshEventGCISlip(
unsigned thresh);
1316 void setReportThreshEventFreeMem(
unsigned thresh);
1343 const char *keyData = 0,
1384 PS_USER_DEFINED = 1,
1385 PS_DISTR_KEY_PART_PTR = 2,
1386 PS_DISTR_KEY_RECORD = 3
1412 #ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
1421 PS_USER_DEFINED = 1,
1422 PS_DISTR_KEY_PART_PTR = 2
1467 void* xfrmbuf = 0, Uint32 xfrmbuflen = 0);
1468 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1470 void* xfrmbuf, Uint32 xfrmbuflen);
1478 Uint32 partitionId);
1503 void* xfrmbuf = 0, Uint32 xfrmbuflen = 0);
1504 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1506 const NdbRecord *keyRec,
const char *keyData,
1507 void* xfrmbuf, Uint32 xfrmbuflen);
1515 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1531 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1557 int pollNdb(
int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
1558 int minNoOfEventsToWakeup = 1);
1605 int sendPollNdb(
int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
1606 int minNoOfEventsToWakeup = 1,
1641 Uint32 buffLen)
const;
1645 #ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
1653 bool usingFullyQualifiedNames();
1682 Uint64 m_first_tuple_id;
1683 Uint64 m_last_tuple_id;
1684 Uint64 m_highest_seen;
1686 m_first_tuple_id = ~(Uint64)0;
1687 m_last_tuple_id = ~(Uint64)0;
1692 int initAutoIncrement();
1694 int getAutoIncrementValue(
const char* aTableName,
1695 Uint64 & autoValue, Uint32 cacheSize,
1696 Uint64 step = 1, Uint64 start = 1);
1698 Uint64 & autoValue, Uint32 cacheSize,
1699 Uint64 step = 1, Uint64 start = 1);
1703 Uint64 step = 1, Uint64 start = 1);
1704 int readAutoIncrementValue(
const char* aTableName,
1705 Uint64 & autoValue);
1707 Uint64 & autoValue);
1710 int setAutoIncrementValue(
const char* aTableName,
1711 Uint64 autoValue,
bool modify);
1713 Uint64 autoValue,
bool modify);
1717 #ifdef NDBAPI_50_COMPAT
1719 Uint32 cacheSize = 1)
1722 if (getAutoIncrementValue(aTable, val, cacheSize, 1, 1) == -1)
1727 bool checkUpdateAutoIncrementValue(TupleIdRange & range, Uint64 autoValue);
1730 TupleIdRange & range, Uint64 & tupleId,
1731 Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1);
1733 TupleIdRange & range, Uint64 & tupleId);
1735 TupleIdRange & range, Uint64 tupleId,
bool modify);
1736 int checkTupleIdInNdb(TupleIdRange & range,
1739 TupleIdRange & range, Uint64 & opValue, Uint32 op);
1745 Uint32 getReference()
const {
return theMyRef;}
1749 const char * m_name;
1758 Uint32 getMinDbNodeVersion()
const;
1761 void setCustomData(
void*);
1762 void* getCustomData()
const;
1767 enum ClientStatistics
1771 WaitExecCompleteCount = 0,
1772 WaitScanResultCount = 1,
1773 WaitMetaRequestCount = 2,
1780 BytesRecvdCount = 5,
1783 TransStartCount = 6,
1784 TransCommitCount = 7,
1785 TransAbortCount = 8,
1786 TransCloseCount = 9,
1790 TableScanCount = 12,
1791 RangeScanCount = 13,
1794 PrunedScanCount = 14,
1795 ScanBatchCount = 15,
1797 TransLocalReadRowCount = 17,
1800 DataEventsRecvdCount = 18,
1801 NonDataEventsRecvdCount = 19,
1802 EventBytesRecvdCount = 20,
1804 NumClientStatistics = 21
1807 Uint64 getClientStat(Uint32
id)
const;
1808 const char* getClientStatName(Uint32
id)
const;
1819 Ndb&operator=(
const Ndb&);
1822 const char* aCatalogName,
const char* aSchemaName);
1824 void connected(Uint32 block_reference);
1827 NdbTransaction* startTransactionLocal(Uint32 aPrio, Uint32 aNode,
1831 int NDB_connect(Uint32 tNode, Uint32 instance);
1833 void doDisconnect();
1855 void releaseNdbLabel(
NdbLabel* anNdbLabel);
1856 void releaseNdbBranch(
NdbBranch* anNdbBranch);
1858 void releaseNdbCall(
NdbCall* anNdbCall);
1862 void releaseNdbBlob(
NdbBlob* aBlob);
1865 void check_send_timeout();
1866 void remove_sent_list(Uint32);
1872 void handleReceivedSignal(
const NdbApiSignal* anApiSignal,
1875 int sendRecSignal(Uint16 aNodeId,
1878 Uint32 nodeSequence,
1879 Uint32 *ret_conn_seq= 0);
1882 int getBlockNumber();
1888 int createConIdleList(
int aNrOfCon);
1889 int createOpIdleList(
int nrOfOp );
1891 void freeOperation();
1892 void freeScanOperation();
1893 void freeIndexOperation();
1897 void freeNdbLabel();
1898 void freeNdbBranch();
1899 void freeNdbSubroutine();
1901 void freeNdbScanRec();
1910 NdbTransaction* getConnectedNdbTransaction(Uint32 nodeId, Uint32 instance);
1919 int checkInitState();
1920 void report_node_failure(Uint32 node_id);
1921 void report_node_failure_completed(Uint32 node_id);
1923 void checkFailedNode();
1928 void releaseTransactionArrays();
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,
1939 void abortTransactionsAfterNodeFailure(Uint16 aNodeId);
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;
1948 const char * externalizeIndexName(
const char * internalIndexName,
1949 bool fullyQualifiedNames);
1950 const char * externalizeIndexName(
const char * internalIndexName);
1952 const char * external_name)
const;
1954 const char * external_name)
const;
1957 const BaseString getDatabaseFromInternalName(
const char * internalName);
1959 const BaseString getSchemaFromInternalName(
const char * internalName);
1961 void* int2void (Uint32 val);
1968 Uint64 allocate_transaction_id();
1977 Uint32 theNoOfPreparedTransactions;
1978 Uint32 theNoOfSentTransactions;
1979 Uint32 theNoOfCompletedTransactions;
1980 Uint32 theRemainingStartTransactions;
1981 Uint32 theMaxNoOfTransactions;
1982 Uint32 theMinNoOfEventsToWakeUp;
1984 Uint32 theNextConnectNode;
1986 bool fullyQualifiedNames;
2000 Uint64 the_last_check_time;
2001 Uint64 theFirstTransId;
2005 Uint32 theRestartGCI;
2009 Int32 theNdbBlockNumber;
2022 Uint32 theCachedMinDbNodeVersion;
2025 #ifdef POORMANSPURIFY
2029 int creleaseSignals;
2033 #include <my_attribute.h>
2034 void printState(
const char*
fmt, ...)
2035 ATTRIBUTE_FORMAT(printf, 2, 3);