Below is the list of changes that have just been committed into a local
5.1 repository of pekka. When pekka does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-20 21:56:36+01:00, pekka@stripped +3 -0
ndb - wl#3600 clean up create table parse
use one timeslice like all other ops, to simplify the code
storage/ndb/include/kernel/signaldata/CreateTab.hpp@stripped, 2007-03-20 21:54:02+01:00,
pekka@stripped +1 -0
wl#3600 clean up create table parse
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-03-20 21:54:02+01:00,
pekka@stripped +177 -306
wl#3600 clean up create table parse
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp@stripped, 2007-03-20 21:54:02+01:00,
pekka@stripped +12 -22
wl#3600 clean up create table parse
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: pekka
# Host: clam.(none)
# Root: /export/space/pekka/ndb/version/my52-wl3600-a
--- 1.5/storage/ndb/include/kernel/signaldata/CreateTab.hpp 2007-02-19 18:09:30 +01:00
+++ 1.6/storage/ndb/include/kernel/signaldata/CreateTab.hpp 2007-03-20 21:54:02 +01:00
@@ -39,6 +39,7 @@
public:
STATIC_CONST( SignalLength = 6 );
+ // wl3600_todo remove these
enum RequestType {
CreateTablePrepare = 0, // Prepare create table
CreateTableCommit = 1, // Commit create table
--- 1.159/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-03-19 08:55:10 +01:00
+++ 1.160/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-03-20 21:54:02 +01:00
@@ -92,6 +92,17 @@
#include <DebuggerNames.hpp>
+extern bool
+import(Ptr<SectionSegment> & first, SectionSegmentPool& thePool,
+ const Uint32 * src, Uint32 len);
+
+extern void
+copy(Uint32 * & insertPtr, SectionSegmentPool & thePool,
+ const SegmentedSectionPtr & _ptr);
+
+extern void
+release(SectionSegmentPool & thePool, SegmentedSectionPtr & ptr);
+
#define ZNOT_FOUND 626
#define ZALREADYEXIST 630
@@ -4195,6 +4206,22 @@
void
Dbdict::createTable_release(SchemaOpPtr op_ptr)
{
+ CreateTableDataPtr createTabPtr;
+ getOpData(op_ptr, createTabPtr);
+ if (createTabPtr.p->m_tabInfoPtrI != RNIL) {
+ jam();
+ SegmentedSectionPtr ss_ptr;
+ getSection(ss_ptr, createTabPtr.p->m_tabInfoPtrI);
+ ::release(getSectionSegmentPool(), ss_ptr);
+ createTabPtr.p->m_tabInfoPtrI = RNIL;
+ }
+ if (createTabPtr.p->m_fragmentsPtrI != RNIL) {
+ jam();
+ SegmentedSectionPtr ss_ptr;
+ getSection(ss_ptr, createTabPtr.p->m_fragmentsPtrI);
+ ::release(getSectionSegmentPool(), ss_ptr);
+ createTabPtr.p->m_fragmentsPtrI = RNIL;
+ }
releaseOpData<CreateTableData>(op_ptr);
}
@@ -4225,92 +4252,23 @@
}
getOpData(op_ptr, createTabPtr);
- // wl3600_todo only need tableId=RNIL here
CreateTabReq* impl_req = &createTabPtr.p->m_request;
impl_req->senderRef = reference();
impl_req->senderData = op_ptr.p->op_key;
- impl_req->requestInfo = 0;//wl3600_todo ???
+ impl_req->requestInfo = 0;
impl_req->gci = 0;
+ // filled in after successful parse
impl_req->tableId = RNIL;
impl_req->tableVersion = 0;
- // parse DictTabInfo into new TableRecord
-
- parseRecord.requestType = DictTabInfo::CreateTableFromAPI;
-
- SegmentedSectionPtr ptr;
- signal->getSection(ptr, CreateTableReq::DICT_TAB_INFO);
- SimplePropertiesSectionReader r(ptr, getSectionSegmentPool());
-
- handleTabInfoInit(r, &parseRecord);
- releaseSections(signal);
-
- if (parseRecord.errorCode != 0) {
+ createTable_parse(signal, op_ptr, error);
+ if (hasError(error)) {
jam();
- setError(error, parseRecord);
break;
}
- createTabPtr.p->m_errorCode = 0;
- //createTabPtr.p->m_senderRef = req->senderRef; - out
- //createTabPtr.p->m_senderData = req->senderData; - out
- createTabPtr.p->m_request.tableId = parseRecord.tablePtr.i;
- createTabPtr.p->m_request.tableVersion = parseRecord.tablePtr.p->tableVersion;
- createTabPtr.p->m_coordinatorRef = reference();
- createTabPtr.p->m_fragmentsPtrI = RNIL;
- createTabPtr.p->m_dihAddFragPtr = RNIL;
-
- // make fragmentation request in DIH - reply is via signal
-
- Uint32 *theData = signal->getDataPtrSend();
- Uint16 *frag_data = (Uint16*)&signal->theData[25];
- CreateFragmentationReq * const frag_req = (CreateFragmentationReq*)theData;
- frag_req->senderRef = reference();
- frag_req->senderData = op_ptr.p->op_key;
- frag_req->primaryTableId = parseRecord.tablePtr.p->primaryTableId;
- frag_req->noOfFragments = parseRecord.tablePtr.p->fragmentCount;
- frag_req->fragmentationType = parseRecord.tablePtr.p->fragmentType;
- MEMCOPY_NO_WORDS(frag_data, c_fragData, c_fragDataLen);
-
- if (parseRecord.tablePtr.p->isOrderedIndex()) {
- jam();
- // ordered index has same fragmentation as the table
- frag_req->primaryTableId = parseRecord.tablePtr.p->primaryTableId;
- frag_req->fragmentationType = DictTabInfo::DistrKeyOrderedIndex;
- }
- else if (parseRecord.tablePtr.p->isHashIndex())
- {
- jam();
- /*
- Unique hash indexes has same amount of fragments as primary table
- and distributed in the same manner but has always a normal hash
- fragmentation.
- */
- frag_req->primaryTableId = parseRecord.tablePtr.p->primaryTableId;
- frag_req->fragmentationType = DictTabInfo::DistrKeyUniqueHashIndex;
- }
- else
- {
- jam();
- /*
- Blob tables come here with primaryTableId != RNIL but we only need
- it for creating the fragments so we set it to RNIL now that we got
- what we wanted from it to avoid other side effects.
- */
- parseRecord.tablePtr.p->primaryTableId = RNIL;
- // wl3600_todo temp hack for PARSE phase
- if (frag_req->primaryTableId != RNIL)
- frag_req->primaryTableId = 0;
- }
- EXECUTE_DIRECT(DBDIH, GSN_CREATE_FRAGMENTATION_REQ, signal,
- CreateFragmentationReq::SignalLength);
- jamEntry();
- if (signal->theData[0] != 0)
- {
- jam();
- setError(error, signal->theData[0], __LINE__);
- break;
- }
+ // parse methods do not timeslice currently
+ schemaTrans_sendParseReq(signal, op_ptr);
return;
} while (0);
@@ -4326,124 +4284,161 @@
sendSignal(req->clientRef, GSN_CREATE_TABLE_REF, signal,
CreateTableRef::SignalLength, JBB);
+}
#if wl3600_todo //old code
- CreateTableDataPtr createTabPtr;
- c_opCreateTable.seize(createTabPtr);
-
- if(createTabPtr.isNull()){
- jam();
- parseRecord.errorCode = CreateTableRef::Busy;
- break;
- }
-
+ c_blockState = BS_CREATE_TAB;
+#endif
+
+void
+Dbdict::createTable_parse(Signal* signal, SchemaOpPtr op_ptr, ErrorInfo& error)
+{
+ D("createTable_parse");
+
+ SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
+ CreateTableDataPtr createTabPtr;
+ getOpData(op_ptr, createTabPtr);
+ CreateTabReq* impl_req = &createTabPtr.p->m_request;
+
+ /*
+ * Master parses client DictTabInfo (sec 0) into new table record.
+ * DIH is called to create fragmentation. The table record is
+ * then dumped back into DictTabInfo to produce a canonical format.
+ * The new DictTabInfo (sec 0) and the fragmentation (sec 1) are
+ * sent to all nodes when master parse returns.
+ */
+ if (trans_ptr.p->m_isMaster) {
+ jam();
+
+ // parse client DictTabInfo into new TableRecord
+
+ ParseDictTabInfoRecord parseRecord;
parseRecord.requestType = DictTabInfo::CreateTableFromAPI;
parseRecord.errorCode = 0;
-
- SegmentedSectionPtr ptr;
- signal->getSection(ptr, CreateTableReq::DICT_TAB_INFO);
- SimplePropertiesSectionReader r(ptr, getSectionSegmentPool());
-
+
+ SegmentedSectionPtr ss_ptr;
+ signal->getSection(ss_ptr, CreateTableReq::DICT_TAB_INFO);
+ SimplePropertiesSectionReader r(ss_ptr, getSectionSegmentPool());
+
handleTabInfoInit(r, &parseRecord);
releaseSections(signal);
-
- if(parseRecord.errorCode != 0){
+
+ if (parseRecord.errorCode != 0) {
jam();
- c_opCreateTable.release(createTabPtr);
- break;
+ setError(error, parseRecord);
+ return;
}
-
+
+ TableRecordPtr tabPtr = parseRecord.tablePtr;
+ // fill in table id and version
+ impl_req->tableId = tabPtr.i;
+ impl_req->tableVersion = tabPtr.p->tableVersion;
+
+ // wl3600_todo remove or move to op level
createTabPtr.p->m_errorCode = 0;
- createTabPtr.p->m_senderRef = senderRef;
- createTabPtr.p->m_senderData = senderData;
- createTabPtr.p->m_tablePtrI = parseRecord.tablePtr.i;
createTabPtr.p->m_coordinatorRef = reference();
- createTabPtr.p->m_fragmentsPtrI = RNIL;
- createTabPtr.p->m_dihAddFragPtr = RNIL;
- Uint32 key = c_opRecordSequence + 1;
- Uint32 *theData = signal->getDataPtrSend(), i;
- Uint16 *frag_data= (Uint16*)&signal->theData[25];
- CreateFragmentationReq * const req = (CreateFragmentationReq*)theData;
- req->senderRef = reference();
- req->senderData = key;
- req->primaryTableId = parseRecord.tablePtr.p->primaryTableId;
- req->noOfFragments = parseRecord.tablePtr.p->fragmentCount;
- req->fragmentationType = parseRecord.tablePtr.p->fragmentType;
+ // create fragmentation via DIH (no changes in DIH)
+
+ CreateFragmentationReq* frag_req =
+ (CreateFragmentationReq*)signal->getDataPtrSend();
+ frag_req->senderRef = 0; // direct conf
+ frag_req->senderData = RNIL;
+ frag_req->primaryTableId = tabPtr.p->primaryTableId;
+ frag_req->noOfFragments = tabPtr.p->fragmentCount;
+ frag_req->fragmentationType = tabPtr.p->fragmentType;
+
+ Uint32* frag_data32 = &signal->theData[25];
+ Uint16* frag_data = (Uint16*)frag_data32;
MEMCOPY_NO_WORDS(frag_data, c_fragData, c_fragDataLen);
- if (parseRecord.tablePtr.p->isOrderedIndex()) {
+ if (tabPtr.p->isOrderedIndex()) {
jam();
// ordered index has same fragmentation as the table
- req->primaryTableId = parseRecord.tablePtr.p->primaryTableId;
- req->fragmentationType = DictTabInfo::DistrKeyOrderedIndex;
- }
- else if (parseRecord.tablePtr.p->isHashIndex())
- {
+ frag_req->primaryTableId = tabPtr.p->primaryTableId;
+ frag_req->fragmentationType = DictTabInfo::DistrKeyOrderedIndex;
+ } else if (tabPtr.p->isHashIndex()) {
jam();
/*
- Unique hash indexes has same amount of fragments as primary table
- and distributed in the same manner but has always a normal hash
- fragmentation.
+ * Unique hash indexes has same amount of fragments as primary table
+ * and distributed in the same manner but has always a normal hash
+ * fragmentation.
*/
- req->primaryTableId = parseRecord.tablePtr.p->primaryTableId;
- req->fragmentationType = DictTabInfo::DistrKeyUniqueHashIndex;
- }
- else
- {
+ frag_req->primaryTableId = tabPtr.p->primaryTableId;
+ frag_req->fragmentationType = DictTabInfo::DistrKeyUniqueHashIndex;
+ } else {
jam();
/*
- Blob tables come here with primaryTableId != RNIL but we only need
- it for creating the fragments so we set it to RNIL now that we got
- what we wanted from it to avoid other side effects.
+ * Blob tables come here with primaryTableId != RNIL but we only need
+ * it for creating the fragments so we set it to RNIL now that we got
+ * what we wanted from it to avoid other side effects.
*/
- parseRecord.tablePtr.p->primaryTableId = RNIL;
+ tabPtr.p->primaryTableId = RNIL;
+ // wl3600_todo XXX temp hack for PARSE phase
+ if (frag_req->primaryTableId != RNIL)
+ frag_req->primaryTableId = 0;
}
+
EXECUTE_DIRECT(DBDIH, GSN_CREATE_FRAGMENTATION_REQ, signal,
- CreateFragmentationReq::SignalLength);
+ CreateFragmentationReq::SignalLength);
jamEntry();
- if (signal->theData[0] != 0)
- {
+ if (signal->theData[0] != 0) {
jam();
- parseRecord.errorCode= signal->theData[0];
- c_opCreateTable.release(createTabPtr);
- releaseTableObject(parseRecord.tablePtr.i, true);
- break;
+ setError(error, signal->theData[0], __LINE__);
+ return;
}
- createTabPtr.p->key = key;
- c_opRecordSequence++;
- c_opCreateTable.add(createTabPtr);
- c_blockState = BS_CREATE_TAB;
- return;
- } while(0);
-
- /**
- * Something went wrong
- */
- releaseSections(signal);
- CreateTableRef * ref = (CreateTableRef*)signal->getDataPtrSend();
- ref->senderRef = reference();
- ref->clientData = senderData;
- ref->masterNodeId = c_masterNodeId;
- ref->errorCode = parseRecord.errorCode;
- ref->errorLine = parseRecord.errorLine;
- ref->errorKey = parseRecord.errorKey;
- ref->status = parseRecord.status;
- sendSignal(senderRef, GSN_CREATE_TABLE_REF, signal,
- CreateTableRef::SignalLength, JBB);
-#endif
-}
+ // save fragmentation in long signal memory
+ {
+ // wl3600_todo make a method for this magic stuff
+ Uint32 count = 2 + (1 + frag_data[0]) * frag_data[1];
-void
-Dbdict::createTable_parse(Signal* signal, SchemaOpPtr op_ptr, ErrorInfo& error)
-{
- D("createTable_parse");
+ Ptr<SectionSegment> frag_ptr;
+ bool ok = ::import(frag_ptr, frag_data32, (count + 1) / 2);
+ ndbrequire(ok);
+ createTabPtr.p->m_fragmentsPtrI = frag_ptr.i;
- SchemaTransPtr trans_ptr = op_ptr.p->m_trans_ptr;
- CreateTableDataPtr createTabPtr;
- getOpData(op_ptr, createTabPtr);
- CreateTabReq* impl_req = &createTabPtr.p->m_request;
+ // save fragment count
+ tabPtr.p->fragmentCount = frag_data[1];
+ }
+
+ // update table version
+ {
+ XSchemaFile * xsf = &c_schemaFile[c_schemaRecord.schemaPage != 0];
+ SchemaFile::TableEntry * tabEntry = getTableEntry(xsf, tabPtr.i);
+
+ impl_req->tableVersion =
+ tabPtr.p->tableVersion =
+ create_obj_inc_schema_version(tabEntry->m_tableVersion);
+ }
+
+ // dump table record back into DictTabInfo
+ {
+ SimplePropertiesSectionWriter w(getSectionSegmentPool());
+ packTableIntoPages(w, tabPtr);
+
+ SegmentedSectionPtr ss_ptr;
+ w.getPtr(ss_ptr);
+ createTabPtr.p->m_tabInfoPtrI = ss_ptr.i;
+ }
+
+ // assign signal sections to send to participants
+ {
+ SegmentedSectionPtr ss0_ptr;
+ SegmentedSectionPtr ss1_ptr;
+
+ getSection(ss0_ptr, createTabPtr.p->m_tabInfoPtrI);
+ getSection(ss1_ptr, createTabPtr.p->m_fragmentsPtrI);
+
+ ndbrequire(signal->getNoOfSections() == 0);
+ signal->setSection(ss0_ptr, CreateTabReq::DICT_TAB_INFO);
+ signal->setSection(ss1_ptr, CreateTabReq::FRAGMENTATION);
+
+ // signal owns the memory now
+ createTabPtr.p->m_tabInfoPtrI = RNIL;
+ createTabPtr.p->m_fragmentsPtrI = RNIL;
+ }
+ }
const Uint32 gci = impl_req->gci;
const Uint32 tableId = impl_req->tableId;
@@ -4453,37 +4448,36 @@
signal->getSection(tabInfoPtr, CreateTabReq::DICT_TAB_INFO);
// wl3600_todo parse the rewritten DictTabInfo in master too
- if (impl_req->senderRef != reference()) {
+ if (!trans_ptr.p->m_isMaster) {
jam();
createTabPtr.p->m_errorCode = 0;
createTabPtr.p->m_request.tableId = tableId;
createTabPtr.p->m_coordinatorRef = impl_req->senderRef;
- //createTabPtr.p->m_senderRef = req->clientRef;
- //createTabPtr.p->m_senderData = req->clientData;
- createTabPtr.p->m_dihAddFragPtr = RNIL;
- /**
- * Put data into table record
- */
ParseDictTabInfoRecord parseRecord;
parseRecord.requestType = DictTabInfo::AddTableFromDict;
parseRecord.errorCode = 0;
SimplePropertiesSectionReader r(tabInfoPtr, getSectionSegmentPool());
- bool checkExist = (getOwnNodeId() != c_masterNodeId);
+ bool checkExist = true;
handleTabInfoInit(r, &parseRecord, checkExist);
- ndbrequire(parseRecord.errorCode == 0);//wl3600_todo return error
+ if (parseRecord.errorCode != 0) {
+ jam();
+ setError(error, parseRecord);
+ return;
+ }
}
- // save sections
+ // save sections to DICT memory
saveOpSection(op_ptr, signal, CreateTabReq::DICT_TAB_INFO);
saveOpSection(op_ptr, signal, CreateTabReq::FRAGMENTATION);
TableRecordPtr tabPtr;
c_tableRecordPool.getPtr(tabPtr, tableId);
tabPtr.p->packedSize = tabInfoPtr.sz;
+ // wl3600_todo verify version on slave
tabPtr.p->tableVersion = tableVersion;
tabPtr.p->gciTableCreated = gci;
@@ -4495,7 +4489,7 @@
ndbrequire(ok);
}
- // save original schema file entry (no object)
+ // save original schema file entry
{
XSchemaFile * xsf = &c_schemaFile[c_schemaRecord.schemaPage != 0];
SchemaFile::TableEntry * tableEntry = getTableEntry(xsf, tableId);
@@ -4513,14 +4507,6 @@
tabEntry.zero_unused();
D(V(tableVersion));
-#if wl3600_todo // move to createTable_prepare
- Callback callback;
- callback.m_callbackData = op_ptr.p->key;
- callback.m_callbackFunction =
- safe_cast(&Dbdict::createTab_writeSchemaConf1);
-
- bool savetodisk = !(tabPtr.p->m_bits & TableRecord::TR_Temporary);
-#endif
bool savetodisk = false;
updateSchemaState(signal, tableId, &tabEntry, (Callback*)0, savetodisk);
@@ -4861,119 +4847,17 @@
}
void
-Dbdict::execCREATE_FRAGMENTATION_REF(Signal * signal){
- jamEntry();
- const Uint32 * theData = signal->getDataPtr();
- CreateFragmentationRef * const ref = (CreateFragmentationRef*)theData;
- (void)ref;
+Dbdict::execCREATE_FRAGMENTATION_REF(Signal * signal)
+{
+ // currently not received
ndbrequire(false);
}
void
Dbdict::execCREATE_FRAGMENTATION_CONF(Signal* signal)
{
- jamEntry();
- const Uint32 * theData = signal->getDataPtr();
- const CreateFragmentationConf* conf =
- (const CreateFragmentationConf*)theData;
-
- SchemaOpPtr op_ptr;
- CreateTableDataPtr createTabPtr;
- findSchemaOp(op_ptr, createTabPtr, conf->senderData);
- ndbrequire(!op_ptr.isNull());
-
- ndbrequire(signal->getNoOfSections() == 1);
-
- SegmentedSectionPtr fragDataPtr;
- signal->getSection(fragDataPtr, CreateFragmentationConf::FRAGMENTS);
- signal->header.m_noOfSections = 0;
-
- /**
- * Get table
- */
- TableRecordPtr tabPtr;
- c_tableRecordPool.getPtr(tabPtr, createTabPtr.p->m_request.tableId);
-
- /**
- * Save fragment count
- */
- tabPtr.p->fragmentCount = conf->noOfFragments;
-
- /**
- * Update table version
- */
- XSchemaFile * xsf = &c_schemaFile[c_schemaRecord.schemaPage != 0];
- SchemaFile::TableEntry * tabEntry = getTableEntry(xsf, tabPtr.i);
-
- tabPtr.p->tableVersion =
- create_obj_inc_schema_version(tabEntry->m_tableVersion);
-
- /**
- * Pack
- */
- SimplePropertiesSectionWriter w(getSectionSegmentPool());
- packTableIntoPages(w, tabPtr);
-
- SegmentedSectionPtr spDataPtr;
- w.getPtr(spDataPtr);
-
- signal->setSection(spDataPtr, CreateTabReq::DICT_TAB_INFO);
- signal->setSection(fragDataPtr, CreateTabReq::FRAGMENTATION);
-
- createTabPtr.p->m_coordinatorData.m_gsn = GSN_CREATE_TAB_REQ;
-
- CreateTabReq* impl_req = &createTabPtr.p->m_request;
- impl_req->senderRef = reference();
- impl_req->senderData = op_ptr.p->op_key;
- impl_req->requestInfo = 0;//wl3600_todo ???
- impl_req->gci = 0;
- impl_req->tableId = tabPtr.i;
- impl_req->tableVersion =
- create_obj_inc_schema_version(tabEntry->m_tableVersion);
-
- ErrorInfo error;
- createTable_parse(signal, op_ptr, error);
- if (hasError(error)) {
- // wl3600_todo get FRAG by direct signal and move all to REQ
- releaseSections(signal);
- CreateTableRef * ref = (CreateTableRef*)signal->getDataPtrSend();
- ref->senderRef = reference();
- ref->transId = op_ptr.p->m_trans_ptr.p->m_transId;
- ref->clientData = op_ptr.p->m_clientData;
- getError(error, ref);
- ref->errorStatus = error.errorStatus;
- ref->errorKey = error.errorKey;
-
- sendSignal(op_ptr.p->m_clientRef, GSN_CREATE_TABLE_REF, signal,
- CreateTableRef::SignalLength, JBB);
- return;
- }
-
- schemaTrans_sendParseReq(signal, op_ptr);
-
-#if wl3600_todo //remove
- NodeReceiverGroup rg(DBDICT, c_aliveNodes);
- SafeCounter tmp(c_counterMgr, createTabPtr.p->m_coordinatorData.m_counter);
- createTabPtr.p->m_coordinatorData.m_gsn = GSN_CREATE_TAB_REQ;
- createTabPtr.p->m_coordinatorData.m_requestType = CreateTabReq::CreateTablePrepare;
- tmp.init<CreateTabRef>(rg, GSN_CREATE_TAB_REF, createTabPtr.p->key);
-
- CreateTabReq * const req = (CreateTabReq*)theData;
- req->senderRef = reference();
- req->senderData = createTabPtr.p->key;
- req->clientRef = createTabPtr.p->m_senderRef;
- req->clientData = createTabPtr.p->m_senderData;
- req->requestType = CreateTabReq::CreateTablePrepare;
-
- req->gci = 0;
- req->tableId = tabPtr.i;
- req->tableVersion = create_obj_inc_schema_version(tabEntry->m_tableVersion);
-
- sendFragmentedSignal(rg, GSN_CREATE_TAB_REQ, signal,
- CreateTabReq::SignalLength, JBB);
-
- return;
-#endif
+ // currently not received
+ ndbrequire(false);
}
void
@@ -7047,7 +6931,7 @@
D(V(newTablePtr.i) << hex << V(newTablePtr.p->tableVersion));
}
- // save original schema file entry (no object)
+ // save original schema file entry
{
XSchemaFile * xsf = &c_schemaFile[c_schemaRecord.schemaPage != 0];
SchemaFile::TableEntry * tableEntry = getTableEntry(xsf, impl_req->tableId);
@@ -19347,19 +19231,6 @@
// OpSection
-// wl3600_todo SectionSegmentPool method cleanups
-
-extern bool
-import(Ptr<SectionSegment> & first, SectionSegmentPool& thePool,
- const Uint32 * src, Uint32 len);
-
-extern void
-copy(Uint32 * & insertPtr, SectionSegmentPool & thePool,
- const SegmentedSectionPtr & _ptr);
-
-extern void
-release(SectionSegmentPool & thePool, SegmentedSectionPtr & ptr);
-
void
Dbdict::verify(const OpSection& op_sec)
{
@@ -19613,12 +19484,12 @@
const Uint32 opDepth = trans_ptr.p->m_opDepth;
- D("addSchemaOp" << *op_ptr.p << V(opDepth));
-
OpIterator& it = getIterator(trans_ptr).m_opIterator;
itAddLast(it, op_ptr);
op_ptr.p->m_trans_ptr = trans_ptr;
op_ptr.p->m_opDepth = opDepth;
+
+ D("addSchemaOp" << *op_ptr.p);
// add global flags from trans (some may already be there from REQ)
DictSignal::copyGlobalFlags(op_ptr.p->m_requestInfo, trans_ptr.p->m_requestInfo);
--- 1.83/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp 2007-03-19 08:55:10 +01:00
+++ 1.84/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp 2007-03-20 21:54:02 +01:00
@@ -1975,38 +1975,28 @@
// before image
SchemaFile::TableEntry m_oldTableEntry;
+ // long signal memory for temp use
+ Uint32 m_tabInfoPtrI;
+ Uint32 m_fragmentsPtrI;
+
+ // connect pointers towards DIH and LQH
+ Uint32 m_dihAddFragPtr;
+ Uint32 m_lqhFragPtr;
+
CreateTableData() :
OpData(g_opInfo, (Uint32*)&m_request) {
memset(&m_request, 0, sizeof(m_request));
m_oldTableEntry.init();
+ m_tabInfoPtrI = RNIL;
+ m_fragmentsPtrI = RNIL;
+ m_dihAddFragPtr = RNIL;
+ m_lqhFragPtr = RNIL;
}
- //Uint32 m_senderRef;//
- //Uint32 m_senderData;//
Uint32 m_coordinatorRef;//
Uint32 m_errorCode;//
void setErrorCode(Uint32 c){ if(m_errorCode == 0) m_errorCode = c;}//
-
- // For alter table
- Uint32 m_changeMask;
- bool m_alterTableFailed;
- AlterTableRef m_alterTableRef;
- Uint32 m_alterTableId;
-
- /* Previous table name (used for reverting failed table rename) */
- char previousTableName[MAX_TAB_NAME_SIZE];
-
- /* Previous table definition, frm (used for reverting) */
- /** TODO Could preferrably be made dynamic size */
- Uint32 previousFrmLen;
- char previousFrmData[MAX_FRM_DATA_SIZE];
-
- //Uint32 m_tabInfoPtrI;
- Uint32 m_fragmentsPtrI;
-
- Uint32 m_dihAddFragPtr; // Connect ptr towards DIH
- Uint32 m_lqhFragPtr; // Connect ptr towards LQH
Callback m_callback; // Who's using local create tab
MutexHandle2<DIH_START_LCP_MUTEX> m_startLcpMutex;
| Thread |
|---|
| • bk commit into 5.1 tree (pekka:1.2417) | pekka | 20 Mar |