#include <ndb_global.h>#include <kernel_types.h>#include "NdbDictionaryImpl.hpp"#include "API.hpp"#include <NdbOut.hpp>#include "NdbApiSignal.hpp"#include "TransporterFacade.hpp"#include <signaldata/CreateEvnt.hpp>#include <signaldata/SumaImpl.hpp>#include <SimpleProperties.hpp>#include <Bitmask.hpp>#include <AttributeHeader.hpp>#include <AttributeList.hpp>#include <NdbError.hpp>#include <BaseString.hpp>#include <UtilBuffer.hpp>#include <NdbDictionary.hpp>#include <Ndb.hpp>#include "NdbImpl.hpp"#include "DictCache.hpp"#include <portlib/NdbMem.h>#include <NdbRecAttr.hpp>#include <NdbBlob.hpp>#include <NdbEventOperation.hpp>#include "NdbEventOperationImpl.hpp"#include <signaldata/AlterTable.hpp>#include <EventLogger.hpp>Include dependency graph for NdbEventOperationImpl.cpp:

Go to the source code of this file.
| static void copy_attr | ( | AttributeHeader | ah, | |
| Uint32 & | j1, | |||
| Uint32 * | p1, | |||
| Uint32 & | j2, | |||
| const Uint32 * | p2, | |||
| Uint32 | flags | |||
| ) | [static] |
Definition at line 2077 of file NdbEventOperationImpl.cpp.
References AttributeHeader::getDataSize(), and n.
Referenced by NdbEventBuffer::merge_data().
02080 { 02081 bool do_copy = (flags & 1); 02082 bool with_head = (flags & 2); 02083 Uint32 n = with_head + ah.getDataSize(); 02084 if (do_copy) 02085 { 02086 Uint32 k; 02087 for (k = 0; k < n; k++) 02088 p1[j1 + k] = p2[j2 + k]; 02089 } 02090 j1 += n; 02091 j2 += n; 02092 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static AttributeHeader copy_head | ( | Uint32 & | i1, | |
| Uint32 * | p1, | |||
| Uint32 & | i2, | |||
| const Uint32 * | p2, | |||
| Uint32 | flags | |||
| ) | [static] |
Definition at line 2064 of file NdbEventOperationImpl.cpp.
Referenced by NdbEventBuffer::merge_data().
02066 { 02067 AttributeHeader ah(p2[i2]); 02068 bool do_copy = (flags & 1); 02069 if (do_copy) 02070 p1[i1] = p2[i2]; 02071 i1++; 02072 i2++; 02073 return ah; 02074 }
Here is the caller graph for this function:

| static void crash_on_invalid_SUB_GCP_COMPLETE_REP | ( | const Gci_container * | bucket, | |
| const SubGcpCompleteRep *const | rep, | |||
| Uint32 | nodes | |||
| ) | [static] |
Definition at line 1396 of file NdbEventOperationImpl.cpp.
References abort(), SubGcpCompleteRep::gci, SubGcpCompleteRep::gcp_complete_rep_count, Gci_container::m_gcp_complete_rep_count, ndbout_c(), and SubGcpCompleteRep::senderRef.
Referenced by NdbEventBuffer::execSUB_GCP_COMPLETE_REP().
01399 { 01400 Uint32 old_cnt = bucket->m_gcp_complete_rep_count; 01401 01402 ndbout_c("INVALID SUB_GCP_COMPLETE_REP"); 01403 ndbout_c("gci: %d", rep->gci); 01404 ndbout_c("sender: %x", rep->senderRef); 01405 ndbout_c("count: %d", rep->gcp_complete_rep_count); 01406 ndbout_c("bucket count: %u", old_cnt); 01407 ndbout_c("nodes: %u", nodes); 01408 abort(); 01409 }
Here is the call graph for this function:

Here is the caller graph for this function:

| Gci_container* find_bucket | ( | Vector< Gci_container_pod > * | active, | |
| Uint64 | gci | |||
| ) | [inline] |
Definition at line 1376 of file NdbEventOperationImpl.cpp.
References ACTIVE_GCI_MASK, find_bucket_chained(), Vector< T >::getBase(), likely, Gci_container::m_gci, and pos().
Referenced by NdbEventBuffer::execSUB_GCP_COMPLETE_REP(), and NdbEventBuffer::insertDataL().
01381 { 01382 Uint32 pos = (gci & ACTIVE_GCI_MASK); 01383 Gci_container *bucket= ((Gci_container*)active->getBase()) + pos; 01384 if(likely(gci == bucket->m_gci)) 01385 return bucket; 01386 01387 return find_bucket_chained(active,gci 01388 #ifdef VM_TRACE 01389 , flush_gci 01390 #endif 01391 ); 01392 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static Gci_container* find_bucket_chained | ( | Vector< Gci_container_pod > * | active, | |
| Uint64 | gci | |||
| ) | [static] |
Definition at line 1311 of file NdbEventOperationImpl.cpp.
References ACTIVE_GCI_DIRECTORY_SIZE, ACTIVE_GCI_MASK, assert, bzero, Vector< T >::fill(), g_empty_gci_container, Vector< T >::getBase(), Gci_container::m_gci, Gci_container::m_gcp_complete_rep_count, memcpy, ndbout_c(), pos(), and Vector< T >::size().
Referenced by find_bucket().
01316 { 01317 Uint32 pos = (gci & ACTIVE_GCI_MASK); 01318 Gci_container *bucket= ((Gci_container*)active->getBase()) + pos; 01319 01320 if(gci > bucket->m_gci) 01321 { 01322 Gci_container* move; 01323 Uint32 move_pos = pos + ACTIVE_GCI_DIRECTORY_SIZE; 01324 do 01325 { 01326 active->fill(move_pos, g_empty_gci_container); 01327 // Needs to recomputed after fill 01328 bucket = ((Gci_container*)active->getBase()) + pos; 01329 move = ((Gci_container*)active->getBase()) + move_pos; 01330 if(move->m_gcp_complete_rep_count == 0) 01331 { 01332 memcpy(move, bucket, sizeof(Gci_container)); 01333 bzero(bucket, sizeof(Gci_container)); 01334 bucket->m_gci = gci; 01335 bucket->m_gcp_complete_rep_count = ~(Uint32)0; 01336 #ifdef VM_TRACE 01337 if (gci < flush_gci) 01338 { 01339 ndbout_c("received old gci %llu < flush gci %llu", gci, flush_gci); 01340 assert(false); 01341 } 01342 #endif 01343 return bucket; 01344 } 01345 move_pos += ACTIVE_GCI_DIRECTORY_SIZE; 01346 } while(true); 01347 } 01348 else 01349 { 01350 Uint32 size = active->size() - ACTIVE_GCI_DIRECTORY_SIZE; 01351 do 01352 { 01353 pos += ACTIVE_GCI_DIRECTORY_SIZE; 01354 bucket += ACTIVE_GCI_DIRECTORY_SIZE; 01355 01356 if(bucket->m_gci == gci) 01357 { 01358 #ifdef VM_TRACE 01359 if (gci < flush_gci) 01360 { 01361 ndbout_c("received old gci %llu < flush gci %llu", gci, flush_gci); 01362 assert(false); 01363 } 01364 #endif 01365 return bucket; 01366 } 01367 01368 } while(pos < size); 01369 01370 return 0; 01371 } 01372 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static NdbOut& operator<< | ( | NdbOut & | out, | |
| const Gci_container_pod & | gci | |||
| ) | [static] |
Definition at line 1301 of file NdbEventOperationImpl.cpp.
01302 { 01303 Gci_container* ptr = (Gci_container*)&gci; 01304 out << *ptr; 01305 return out; 01306 }
| static NdbOut& operator<< | ( | NdbOut & | out, | |
| const Gci_container & | gci | |||
| ) | [static] |
Definition at line 1285 of file NdbEventOperationImpl.cpp.
References EventBufData_list::m_count, Gci_container::m_data, Gci_container::m_gci, Gci_container::m_gcp_complete_rep_count, EventBufData_list::m_head, Gci_container::m_state, and EventBufData_list::m_tail.
01286 { 01287 out << "[ GCI: " << gci.m_gci 01288 << " state: " << hex << gci.m_state 01289 << " head: " << hex << gci.m_data.m_head 01290 << " tail: " << hex << gci.m_data.m_tail 01291 #ifdef VM_TRACE 01292 << " cnt: " << dec << gci.m_data.m_count 01293 #endif 01294 << " gcp: " << dec << gci.m_gcp_complete_rep_count 01295 << "]"; 01296 return out; 01297 }
| static void split_concatenated_pk | ( | const NdbTableImpl * | t, | |
| Uint32 * | ah_buffer, | |||
| const Uint32 * | pk_buffer, | |||
| Uint32 | pk_sz | |||
| ) | [static] |
Definition at line 2297 of file NdbEventOperationImpl.cpp.
References assert, NdbSqlUtil::get_var_length(), NdbTableImpl::getColumn(), AttributeHeader::getDataSize(), NdbTableImpl::m_columns, NdbTableImpl::m_noOfKeys, AttributeHeader::m_value, n, NULL, ok(), and Vector< T >::size().
Referenced by NdbEventBuffer::get_main_data().
02299 { 02300 Uint32 sz = 0; // words parsed so far 02301 Uint32 n; // pk attr count 02302 Uint32 i; 02303 for (i = n = 0; i < t->m_columns.size() && n < t->m_noOfKeys; i++) 02304 { 02305 const NdbColumnImpl* c = t->getColumn(i); 02306 assert(c != NULL); 02307 if (! c->m_pk) 02308 continue; 02309 02310 assert(sz < pk_sz); 02311 Uint32 bytesize = c->m_attrSize * c->m_arraySize; 02312 Uint32 lb, len; 02313 bool ok = NdbSqlUtil::get_var_length(c->m_type, &pk_buffer[sz], bytesize, 02314 lb, len); 02315 assert(ok); 02316 02317 AttributeHeader ah(i, lb + len); 02318 ah_buffer[n++] = ah.m_value; 02319 sz += ah.getDataSize(); 02320 } 02321 assert(n == t->m_noOfKeys && sz <= pk_sz); 02322 }
Here is the call graph for this function:

Here is the caller graph for this function:

const Uint32 ACTIVE_GCI_DIRECTORY_SIZE = 4 [static] |
Definition at line 50 of file NdbEventOperationImpl.cpp.
Referenced by NdbEventBuffer::complete_outof_order_gcis(), NdbEventBuffer::execSUB_GCP_COMPLETE_REP(), find_bucket_chained(), and NdbEventBuffer::init_gci_containers().
const Uint32 ACTIVE_GCI_MASK = ACTIVE_GCI_DIRECTORY_SIZE - 1 [static] |
Definition at line 51 of file NdbEventOperationImpl.cpp.
Referenced by find_bucket(), and find_bucket_chained().
Referenced by NdbEventBuffer::merge_data().
Gci_container_pod g_empty_gci_container [static] |
Definition at line 49 of file NdbEventOperationImpl.cpp.
Referenced by find_bucket_chained(), NdbEventBuffer::init_gci_containers(), and NdbEventBuffer::NdbEventBuffer().
1.4.7

