summaryrefslogtreecommitdiff
path: root/ndb/src/ndbapi
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/ndbapi')
-rw-r--r--ndb/src/ndbapi/Makefile_old60
-rw-r--r--ndb/src/ndbapi/NdbDictionary.cpp16
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.hpp8
-rw-r--r--ndb/src/ndbapi/NdbOperationExec.cpp4
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp15
-rw-r--r--ndb/src/ndbapi/ndberror.c32
6 files changed, 44 insertions, 91 deletions
diff --git a/ndb/src/ndbapi/Makefile_old b/ndb/src/ndbapi/Makefile_old
deleted file mode 100644
index 54de9ba96f4..00000000000
--- a/ndb/src/ndbapi/Makefile_old
+++ /dev/null
@@ -1,60 +0,0 @@
-include .defs.mk
-
-TYPE := ndbapi
-
-PIC_ARCHIVE := Y
-NONPIC_ARCHIVE := Y
-ARCHIVE_TARGET := ndbapi
-
-A_LIB := Y
-SO_LIB := Y
-PIC_LIB := Y
-LIB_TARGET := NDB_API
-
-LIB_TARGET_ARCHIVES := $(ARCHIVE_TARGET) \
- transporter \
- general \
- signaldataprint \
- mgmapi mgmsrvcommon \
- portlib \
- logger \
- trace
-
-DIRS := signal-sender
-
-CFLAGS_TransporterFacade.cpp := -I$(call fixpath,$(NDB_TOP)/src/mgmapi)
-CFLAGS_ClusterMgr.cpp := -I$(call fixpath,$(NDB_TOP)/src/mgmapi)
-
-# Source files of non-templated classes (.cpp files)
-SOURCES = \
- TransporterFacade.cpp \
- ClusterMgr.cpp \
- Ndb.cpp \
- NdbPoolImpl.cpp NdbPool.cpp \
- Ndblist.cpp \
- Ndbif.cpp \
- Ndbinit.cpp \
- ndberror.c Ndberr.cpp NdbErrorOut.cpp \
- NdbConnection.cpp \
- NdbConnectionScan.cpp \
- NdbOperation.cpp \
- NdbOperationSearch.cpp \
- NdbOperationInt.cpp \
- NdbOperationDefine.cpp \
- NdbOperationExec.cpp \
- NdbResultSet.cpp \
- NdbScanOperation.cpp NdbScanFilter.cpp \
- NdbIndexOperation.cpp \
- NdbEventOperation.cpp \
- NdbEventOperationImpl.cpp \
- NdbApiSignal.cpp \
- NdbRecAttr.cpp \
- NdbUtil.cpp \
- NdbReceiver.cpp \
- NdbDictionary.cpp NdbDictionaryImpl.cpp DictCache.cpp
- NdbBlob.cpp
-
-include $(NDB_TOP)/Epilogue.mk
-
-###
-# Backward compatible
diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp
index c8414ec16a3..09d15c7f962 100644
--- a/ndb/src/ndbapi/NdbDictionary.cpp
+++ b/ndb/src/ndbapi/NdbDictionary.cpp
@@ -343,6 +343,18 @@ NdbDictionary::Table::getColumn(const int attrId) const {
return m_impl.getColumn(attrId);
}
+NdbDictionary::Column*
+NdbDictionary::Table::getColumn(const char * name)
+{
+ return m_impl.getColumn(name);
+}
+
+NdbDictionary::Column*
+NdbDictionary::Table::getColumn(const int attrId)
+{
+ return m_impl.getColumn(attrId);
+}
+
void
NdbDictionary::Table::setLogging(bool val){
m_impl.m_logging = val;
@@ -956,6 +968,10 @@ operator<<(NdbOut& out, const NdbDictionary::Column& col)
out << " NOT NULL";
else
out << " NULL";
+
+ if (col.getDistributionKey())
+ out << " DISTRIBUTION KEY";
+
return out;
}
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/ndb/src/ndbapi/NdbDictionaryImpl.hpp
index 12f0946ab67..62d2a951f28 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.hpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.hpp
@@ -637,11 +637,9 @@ NdbDictionaryImpl::get_local_table_info(const char * internalTableName,
return 0;
}
}
- if (do_add_blob_tables &&
- info->m_table_impl->m_noOfBlobs &&
- addBlobTables(*(info->m_table_impl))) {
- return 0;
- }
+ if (do_add_blob_tables && info->m_table_impl->m_noOfBlobs)
+ addBlobTables(*(info->m_table_impl));
+
return info; // autoincrement already initialized
}
diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp
index 13664794dcd..cccc3b6409f 100644
--- a/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -192,7 +192,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
OperationType tOperationType = theOperationType;
Uint32 tTupKeyLen = theTupKeyLen;
Uint8 abortOption =
- m_abortOption != (Int8)-1 ? m_abortOption : theNdbCon->m_abortOption;
+ m_abortOption != -1 ? m_abortOption : theNdbCon->m_abortOption;
tcKeyReq->setDirtyFlag(tReqInfo, tDirtyIndicator);
tcKeyReq->setOperationType(tReqInfo, tOperationType);
@@ -543,7 +543,7 @@ NdbOperation::receiveTCKEYREF( NdbApiSignal* aSignal)
}//if
AbortOption ao = (AbortOption)
- (m_abortOption != (Int8)-1 ? m_abortOption : theNdbCon->m_abortOption);
+ (m_abortOption != -1 ? m_abortOption : theNdbCon->m_abortOption);
theReceiver.m_received_result_length = ~0;
theStatus = Finished;
diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp
index 86bac7deb16..373fec1a2b0 100644
--- a/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -850,6 +850,14 @@ NdbScanOperation::doSendScan(int aProcessorId)
tSignal = tSignal->next();
}
theStatus = WaitResponse;
+
+ m_sent_receivers_count = theParallelism;
+ if(m_ordered)
+ {
+ m_current_api_receiver = theParallelism;
+ m_api_receivers_count = theParallelism;
+ }
+
return tSignalCount;
}//NdbOperation::doSendScan()
@@ -1507,13 +1515,8 @@ NdbScanOperation::reset_receivers(Uint32 parallell, Uint32 ordered){
m_api_receivers_count = 0;
m_current_api_receiver = 0;
- m_sent_receivers_count = parallell;
+ m_sent_receivers_count = 0;
m_conf_receivers_count = 0;
-
- if(ordered){
- m_current_api_receiver = parallell;
- m_api_receivers_count = parallell;
- }
}
int
diff --git a/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c
index 17a80082023..1a0d8132d71 100644
--- a/ndb/src/ndbapi/ndberror.c
+++ b/ndb/src/ndbapi/ndberror.c
@@ -124,7 +124,8 @@ ErrorBundle ErrorCodes[] = {
{ 217, TR, "217" },
{ 218, TR, "218" },
{ 219, TR, "219" },
- { 233, TR, "Out of operation records in transaction coordinator" },
+ { 233, TR,
+ "Out of operation records in transaction coordinator (increase MaxNoOfConcurrentOperations)" },
{ 275, TR, "275" },
{ 279, TR, "Out of transaction markers in transaction coordinator" },
{ 414, TR, "414" },
@@ -137,7 +138,7 @@ ErrorBundle ErrorCodes[] = {
{ 830, TR, "Out of add fragment operation records" },
{ 873, TR, "Out of attrinfo records for scan in tuple manager" },
{ 1217, TR, "1217" },
- { 1219, TR, "Out of operation records in local data manager" },
+ { 1219, TR, "Out of operation records in local data manager (increase MaxNoOfLocalOperations)" },
{ 1220, TR, "1220" },
{ 1222, TR, "Out of transaction markers in LQH" },
{ 4021, TR, "Out of Send Buffer space in NDB API" },
@@ -149,9 +150,10 @@ ErrorBundle ErrorCodes[] = {
*/
{ 623, IS, "623" },
{ 624, IS, "624" },
- { 625, IS, "Out of memory in Ndb Kernel, index part" },
- { 826, IS, "Too many tables and attributes (increase MaxNoOfAttributes)" },
- { 827, IS, "Out of memory in Ndb Kernel, data part" },
+ { 625, IS, "Out of memory in Ndb Kernel, index part (increase IndexMemory)" },
+ { 800, IS, "Too many ordered indexes (increase MaxNoOfOrderedIndexes)" },
+ { 826, IS, "Too many tables and attributes (increase MaxNoOfAttributes or MaxNoOfTables)" },
+ { 827, IS, "Out of memory in Ndb Kernel, data part (increase DataMemory)" },
{ 832, IS, "832" },
/**
@@ -168,10 +170,10 @@ ErrorBundle ErrorCodes[] = {
* OverloadError
*/
{ 410, OL, "Out of log file space temporarily" },
- { 677, OL, "Index UNDO buffers overloaded" },
- { 891, OL, "Data UNDO buffers overloaded" },
- { 1221, OL, "REDO log buffers overloaded" },
- { 4006, OL, "Connect failure - out of connection objects" },
+ { 677, OL, "Index UNDO buffers overloaded (increase UndoIndexBuffer)" },
+ { 891, OL, "Data UNDO buffers overloaded (increase UndoDataBuffer)" },
+ { 1221, OL, "REDO log buffers overloaded (increase RedoBuffer)" },
+ { 4006, OL, "Connect failure - out of connection objects (increase MaxNoOfConcurrentTransactions)" },
@@ -241,9 +243,9 @@ ErrorBundle ErrorCodes[] = {
{ 884, AE, "Stack overflow in interpreter" },
{ 885, AE, "Stack underflow in interpreter" },
{ 886, AE, "More than 65535 instructions executed in interpreter" },
- { 4256, AE, "Must call Ndb::init() before this function" },
+ { 4256, AE, "Must call Ndb::init() before this function" },
{ 880, AE, "Tried to read too much - too many getValue calls" },
- { 4257, AE, "Tried to read too much - too many getValue calls" },
+ { 4257, AE, "Tried to read too much - too many getValue calls" },
/**
* Scan application errors
@@ -288,7 +290,7 @@ ErrorBundle ErrorCodes[] = {
{ 283, SE, "Table is being dropped" },
{ 284, SE, "Table not defined in transaction coordinator" },
{ 285, SE, "Unknown table error in transaction coordinator" },
- { 881, SE, "Unable to create table, out of data pages" },
+ { 881, SE, "Unable to create table, out of data pages (increase DataMemory) " },
{ 1225, SE, "Table not defined in local query handler" },
{ 1226, SE, "Table is being dropped" },
{ 1228, SE, "Cannot use drop table for drop index" },
@@ -344,17 +346,11 @@ ErrorBundle ErrorCodes[] = {
{ 4327, AE, "Distribution Group with 1 byte attribute is not allowed" },
{ 4328, AE, "Disk memory attributes not yet supported" },
{ 4329, AE, "Variable stored attributes not yet supported" },
- { 4330, AE, "Table names limited to 127 bytes" },
- { 4331, AE, "Attribute names limited to 31 bytes" },
- { 4332, AE, "Maximum 2000 attributes in a table" },
- { 4333, AE, "Maximum 4092 bytes long keys allowed" },
- { 4334, AE, "Attribute properties length limited to 127 bytes" },
{ 4400, AE, "Status Error in NdbSchemaCon" },
{ 4401, AE, "Only one schema operation per schema transaction" },
{ 4402, AE, "No schema operation defined before calling execute" },
- { 4500, AE, "Cannot handle more than 2048 tables in NdbApi" },
{ 4501, AE, "Insert in hash table failed when getting table information from Ndb" },
{ 4502, AE, "GetValue not allowed in Update operation" },
{ 4503, AE, "GetValue not allowed in Insert operation" },