From 8d0393aae3118f99060e2c3dfeec837af0bc0171 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Mar 2005 17:42:08 +0100 Subject: Extra fix for perceived problem with fix for Bug #8753 Invalid schema object version after dropping index --- ndb/src/ndbapi/DictCache.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ndb') diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index afdb37aa53f..ca6c185c07d 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -24,12 +24,13 @@ Ndb_local_table_info * Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz) { - if (sz % 8 != 0) // round to Uint64 - sz += 8 - sz % 8; - void *data= malloc(sizeof(NdbTableImpl)+sz-8); + Uint32 tot_size= sizeof(NdbTableImpl *) + sz; + if (sz % 8 != 0) + tot_size += sz % 8; // round to Uint64 + void *data= malloc(tot_size); if (data == 0) return 0; - memset(data,0,sizeof(NdbTableImpl)+sz-8); + memset(data, 0, tot_size); new (data) Ndb_local_table_info(table_impl); return (Ndb_local_table_info *) data; } -- cgit v1.2.1 From 1c0c25e7473c5ad68876aea848a8f7ad480333f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Mar 2005 22:12:24 +0100 Subject: Simplified rounding up to nearest 64-bit boundry --- ndb/src/ndbapi/DictCache.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ndb') diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index ca6c185c07d..9cdd68272ad 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -24,9 +24,7 @@ Ndb_local_table_info * Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz) { - Uint32 tot_size= sizeof(NdbTableImpl *) + sz; - if (sz % 8 != 0) - tot_size += sz % 8; // round to Uint64 + Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7)>>3)<<3; // round to Uint64 void *data= malloc(tot_size); if (data == 0) return 0; -- cgit v1.2.1 From 18e7d8f6d78fe83a1d4b53e605cfc4a22096fb45 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Mar 2005 16:00:02 -0800 Subject: Fix calls to memset() with arguments out of order. (Bug #9323) bdb/hash/hash_open.c: Fix order of arguments to memset() bdb/btree/bt_open.c: Fix order of arguments to memset() ndb/src/kernel/vm/VMSignal.cpp: Fix order of arguments to memset() --- ndb/src/kernel/vm/VMSignal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ndb') diff --git a/ndb/src/kernel/vm/VMSignal.cpp b/ndb/src/kernel/vm/VMSignal.cpp index bffca6f6541..e4eafb47ff7 100644 --- a/ndb/src/kernel/vm/VMSignal.cpp +++ b/ndb/src/kernel/vm/VMSignal.cpp @@ -18,8 +18,8 @@ #include Signal::Signal(){ - memset(&header, sizeof(header), 0); - memset(theData, sizeof(theData), 0); + memset(&header, 0, sizeof(header)); + memset(theData, 0, sizeof(theData)); } void -- cgit v1.2.1 From e674f4594fd2a29101bb357aaeadb4174f5c48e9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Mar 2005 11:51:31 +0200 Subject: ndb - make printSchemaFile available (compile manually) BitKeeper/deleted/.del-Makefile~b03e75f2bff8d72: Delete: ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp: compile manually --- ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp | 112 +++++++++++++++++++++ .../kernel/blocks/dbdict/printSchemafile/Makefile | 12 --- .../dbdict/printSchemafile/printSchemafile.cpp | 97 ------------------ 3 files changed, 112 insertions(+), 109 deletions(-) create mode 100644 ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp delete mode 100644 ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile delete mode 100644 ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp b/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp new file mode 100644 index 00000000000..0ba52878b7c --- /dev/null +++ b/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp @@ -0,0 +1,112 @@ +#if 0 +make -f Makefile -f - printSchemaFile <<'_eof_' +printSchemaFile: printSchemaFile.cpp + $(CXXCOMPILE) -o $@ $@.cpp -L../../../common/util/.libs -lgeneral +_eof_ +exit $? +#endif + +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#include + +#include +#include +#include + +void +usage(const char * prg){ + ndbout << "Usage " << prg + << " P0.SchemaLog" << endl; +} + +void +fill(const char * buf, int mod){ + int len = strlen(buf)+1; + ndbout << buf << " "; + while((len % mod) != 0){ + ndbout << " "; + len++; + } +} + +void +print(const char * filename, const SchemaFile * file){ + ndbout << "----- Schemafile: " << filename << " -----" << endl; + ndbout_c("Magic: %.*s ByteOrder: %.8x NdbVersion: %d FileSize: %d", + sizeof(file->Magic), file->Magic, + file->ByteOrder, + file->NdbVersion, + file->FileSize); + + for(Uint32 i = 0; iNoOfTableEntries; i++){ + SchemaFile::TableEntry te = file->TableEntries[i]; + if(te.m_tableState != SchemaFile::INIT){ + ndbout << "Table " << i << ": State = " << te.m_tableState + << " version = " << te.m_tableVersion + << " type = " << te.m_tableType + << " noOfPages = " << te.m_noOfPages + << " gcp: " << te.m_gcp << endl; + } + } +} + +NDB_COMMAND(printSchemafile, + "printSchemafile", "printSchemafile", "Prints a schemafile", 16384){ + if(argc < 2){ + usage(argv[0]); + return 0; + } + + const char * filename = argv[1]; + + struct stat sbuf; + const int res = stat(filename, &sbuf); + if(res != 0){ + ndbout << "Could not find file: \"" << filename << "\"" << endl; + return 0; + } + const Uint32 bytes = sbuf.st_size; + + Uint32 * buf = new Uint32[bytes/4+1]; + + FILE * f = fopen(filename, "rb"); + if(f == 0){ + ndbout << "Failed to open file" << endl; + delete [] buf; + return 0; + } + Uint32 sz = fread(buf, 1, bytes, f); + fclose(f); + if(sz != bytes){ + ndbout << "Failure while reading file" << endl; + delete [] buf; + return 0; + } + + print(filename, (SchemaFile *)&buf[0]); + + Uint32 chk = 0, i; + for (i = 0; i < bytes/4; i++) + chk ^= buf[i]; + if (chk != 0) + ndbout << "Invalid checksum!" << endl; + + delete [] buf; + return 0; +} diff --git a/ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile b/ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile deleted file mode 100644 index 1b097e2ce37..00000000000 --- a/ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -include .defs.mk - -TYPE := ndbapi - -BIN_TARGET := printSchemafile -BIN_TARGET_ARCHIVES := portlib general - -CCFLAGS_LOC += -I.. - -SOURCES := printSchemafile.cpp - -include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp b/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp deleted file mode 100644 index bf721a0b30a..00000000000 --- a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - -#include - -#include -#include -#include - -void -usage(const char * prg){ - ndbout << "Usage " << prg - << " P0.SchemaLog" << endl; -} - -void -fill(const char * buf, int mod){ - int len = strlen(buf)+1; - ndbout << buf << " "; - while((len % mod) != 0){ - ndbout << " "; - len++; - } -} - -void -print(const char * filename, const SchemaFile * file){ - ndbout << "----- Schemafile: " << filename << " -----" << endl; - ndbout_c("Magic: %.*s ByteOrder: %.8x NdbVersion: %d FileSize: %d", - sizeof(file->Magic), file->Magic, - file->ByteOrder, - file->NdbVersion, - file->FileSize); - - for(Uint32 i = 0; iNoOfTableEntries; i++){ - SchemaFile::TableEntry te = file->TableEntries[i]; - if(te.m_tableState != SchemaFile::INIT){ - ndbout << "Table " << i << ": State = " << te.m_tableState - << " version = " << te.m_tableVersion - << " type = " << te.m_tableType - << " noOfPages = " << te.m_noOfPages - << " gcp: " << te.m_gcp << endl; - } - } -} - -NDB_COMMAND(printSchemafile, - "printSchemafile", "printSchemafile", "Prints a schemafile", 16384){ - if(argc < 2){ - usage(argv[0]); - return 0; - } - - const char * filename = argv[1]; - - struct stat sbuf; - const int res = stat(filename, &sbuf); - if(res != 0){ - ndbout << "Could not find file: \"" << filename << "\"" << endl; - return 0; - } - const Uint32 bytes = sbuf.st_size; - - Uint32 * buf = new Uint32[bytes/4+1]; - - FILE * f = fopen(filename, "rb"); - if(f == 0){ - ndbout << "Failed to open file" << endl; - delete [] buf; - return 0; - } - Uint32 sz = fread(buf, 1, bytes, f); - fclose(f); - if(sz != bytes){ - ndbout << "Failure while reading file" << endl; - delete [] buf; - return 0; - } - - print(filename, (SchemaFile *)&buf[0]); - delete [] buf; - return 0; -} -- cgit v1.2.1 From 4a6411003f66a8fcbff097ae710ed2314a26ac2c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Mar 2005 22:55:32 +0200 Subject: ndb - set up long key page vars in ACC_LOCKREQ (bug#????) ndb/src/kernel/blocks/dbacc/Dbacc.hpp: set up long key page vars in ACC_LOCKREQ ndb/src/kernel/blocks/dbacc/DbaccMain.cpp: set up long key page vars in ACC_LOCKREQ --- ndb/src/kernel/blocks/dbacc/Dbacc.hpp | 2 +- ndb/src/kernel/blocks/dbacc/DbaccMain.cpp | 42 ++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 16 deletions(-) (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbacc/Dbacc.hpp b/ndb/src/kernel/blocks/dbacc/Dbacc.hpp index 169b77c0d85..64b947b5462 100644 --- a/ndb/src/kernel/blocks/dbacc/Dbacc.hpp +++ b/ndb/src/kernel/blocks/dbacc/Dbacc.hpp @@ -1076,7 +1076,7 @@ private: void storeLongKeysAtPos(Signal* signal); void reorgLongPage(Signal* signal); void getElement(Signal* signal); - void searchLongKey(Signal* signal); + void searchLongKey(Signal* signal, bool verify); void getdirindex(Signal* signal); void commitdelete(Signal* signal, bool systemRestart); void deleteElement(Signal* signal); diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index a82c96beebd..a124e15eea4 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -4685,7 +4685,7 @@ void Dbacc::getElement(Signal* signal) /* --------------------------------------------------------------------------------- */ tslcPageIndex = gePageptr.p->word32[tgeKeyptr] & 0x3ff; tslcPagedir = gePageptr.p->word32[tgeKeyptr] >> 10; - searchLongKey(signal); + searchLongKey(signal, true); if (tslcResult == ZTRUE) { register Uint32 TlocData1, TlocData2; jam(); @@ -4728,6 +4728,14 @@ void Dbacc::getElement(Signal* signal) Uint32 TgeIndex = TdataIndex + tgeForward; operationRecPtr.p->localdata[0] = gePageptr.p->word32[TdataIndex]; operationRecPtr.p->localdata[1] = gePageptr.p->word32[TgeIndex]; + + if (fragrecptr.p->keyLength == 0) { + // set up long key variables in operation record + tslcPageIndex = gePageptr.p->word32[tgeKeyptr] & 0x3ff; + tslcPagedir = gePageptr.p->word32[tgeKeyptr] >> 10; + // no verification since we have no key data + searchLongKey(signal, false); + } return; }//if if (tgeRemLen <= ZCON_HEAD_SIZE) { @@ -4775,7 +4783,7 @@ void Dbacc::getElement(Signal* signal) /* TSLC_RESULT */ /* DESCRIPTION: SEARCH FOR AN ELEMENT IN A LONG_KEY_PAGE. */ /* --------------------------------------------------------------------------------- */ -void Dbacc::searchLongKey(Signal* signal) +void Dbacc::searchLongKey(Signal* signal, bool verify) { DirRangePtr slcOverflowrangeptr; DirectoryarrayPtr slcOverflowDirptr; @@ -4801,23 +4809,27 @@ void Dbacc::searchLongKey(Signal* signal) dbgWord32(slcPageptr, ZWORDS_IN_PAGE - tslcPageIndex, (int)slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] & 0xffff); dbgWord32(slcPageptr, ZWORDS_IN_PAGE - tslcPageIndex, slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex] >> 16); tslcIndexValue = slcPageptr.p->word32[ZWORDS_IN_PAGE - tslcPageIndex]; - if ((tslcIndexValue >> 16) != operationRecPtr.p->tupkeylen) { - jam(); - tslcResult = ZFALSE; - return; - }//if - tslcStartIndex = tslcIndexValue & 0xffff; - guard30 = operationRecPtr.p->tupkeylen - 1; - arrGuard(guard30, 2048); - arrGuard(guard30 + tslcStartIndex, 2048); - for (tslcIndex = 0; tslcIndex <= guard30; tslcIndex++) { - dbgWord32(slcPageptr, tslcIndex + tslcStartIndex, slcPageptr.p->word32[tslcIndex + tslcStartIndex]); - if (slcPageptr.p->word32[tslcIndex + tslcStartIndex] != Tkeydata[tslcIndex]) { + if (verify) { + if ((tslcIndexValue >> 16) != operationRecPtr.p->tupkeylen) { jam(); tslcResult = ZFALSE; return; }//if - }//for + } + tslcStartIndex = tslcIndexValue & 0xffff; + guard30 = operationRecPtr.p->tupkeylen - 1; + arrGuard(guard30, 2048); + arrGuard(guard30 + tslcStartIndex, 2048); + if (verify) { + for (tslcIndex = 0; tslcIndex <= guard30; tslcIndex++) { + dbgWord32(slcPageptr, tslcIndex + tslcStartIndex, slcPageptr.p->word32[tslcIndex + tslcStartIndex]); + if (slcPageptr.p->word32[tslcIndex + tslcStartIndex] != Tkeydata[tslcIndex]) { + jam(); + tslcResult = ZFALSE; + return; + }//if + }//for + } jam(); tslcResult = ZTRUE; operationRecPtr.p->longPagePtr = slcPageptr.i; -- cgit v1.2.1 From 51690eca7e933f9e4164ec628b8b10419a089711 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Mar 2005 12:37:36 +0300 Subject: Cleanups during review ndb/src/ndbapi/DictCache.cpp: Simpler bit handling code sql/sql_acl.cc: Fix for bool parameter sql/sql_yacc.yy: Removed compiler warning --- ndb/src/ndbapi/DictCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ndb') diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 9cdd68272ad..da9d5b70d47 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -24,7 +24,7 @@ Ndb_local_table_info * Ndb_local_table_info::create(NdbTableImpl *table_impl, Uint32 sz) { - Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7)>>3)<<3; // round to Uint64 + Uint32 tot_size= sizeof(NdbTableImpl *) + ((sz+7) & ~7); // round to Uint64 void *data= malloc(tot_size); if (data == 0) return 0; -- cgit v1.2.1 From e12f1a44537074aef095fa1f75a5af6ea367c9c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Mar 2005 22:17:11 +0200 Subject: ndb - CSC#4927: ordered index + long pk, second half ndb/src/kernel/blocks/dbacc/DbaccMain.cpp: ACC_LOCKREQ - element may have moved after lock request was made --- ndb/src/kernel/blocks/dbacc/DbaccMain.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index a124e15eea4..c6d4e6af4d4 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -2522,6 +2522,26 @@ void Dbacc::execACC_LOCKREQ(Signal* signal) *sig = *req; return; } + operationRecPtr.i = req->accOpPtr; + ptrCheckGuard(operationRecPtr, coprecsize, operationrec); + fragrecptr.i = operationRecPtr.p->fragptr; + ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec); + if (fragrecptr.p->keyLength == 0 && + // should test some state variable + operationRecPtr.p->elementPage != RNIL) { + jam(); + // re-compute long key vars + Page8Ptr tPageptr; + tPageptr.i = operationRecPtr.p->elementPage; + ptrCheckGuard(tPageptr, cpagesize, page8); + Uint32 tKeyptr = + operationRecPtr.p->elementPointer + + operationRecPtr.p->elementIsforward * + (ZELEM_HEAD_SIZE + fragrecptr.p->localkeylen); + tslcPageIndex = tPageptr.p->word32[tKeyptr] & 0x3ff; + tslcPagedir = tPageptr.p->word32[tKeyptr] >> 10; + searchLongKey(signal, false); + } if (lockOp == AccLockReq::Unlock) { jam(); // do unlock via ACC_COMMITREQ (immediate) -- cgit v1.2.1 From b75aa53e61f99eed28964f8c40e52bf46a372a70 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Mar 2005 14:31:06 +0200 Subject: Removed warnings --- ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index b1e573e1cc8..0b8e1910850 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -2227,7 +2227,6 @@ void Dbdict::checkSchemaStatus(Signal* signal) restartCreateTab(signal, tableId, oldEntry, false); return; }//if - ndbrequire(ok); break; } } @@ -2452,7 +2451,9 @@ Dbdict::restartCreateTab_writeTableConf(Signal* signal, callback.m_callbackFunction = safe_cast(&Dbdict::restartCreateTab_dihComplete); - SegmentedSectionPtr fragDataPtr; fragDataPtr.setNull(); + SegmentedSectionPtr fragDataPtr; + fragDataPtr.sz = 0; + fragDataPtr.setNull(); createTab_dih(signal, createTabPtr, fragDataPtr, &callback); } -- cgit v1.2.1 From 5e7c6e0e20deaf9ca734aab65b292dd6acfaa21a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Mar 2005 16:22:46 +0200 Subject: ndb - fix small memory leak ndb/include/util/Vector.hpp: fix small memory leak ndb/src/mgmapi/mgmapi.cpp: fix small memory leak --- ndb/include/util/Vector.hpp | 8 ++++++++ ndb/src/mgmapi/mgmapi.cpp | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'ndb') diff --git a/ndb/include/util/Vector.hpp b/ndb/include/util/Vector.hpp index f60817dab67..480dddf8243 100644 --- a/ndb/include/util/Vector.hpp +++ b/ndb/include/util/Vector.hpp @@ -61,6 +61,10 @@ Vector::Vector(int i){ template Vector::~Vector(){ delete[] m_items; + // safety for placement new usage + m_items = 0; + m_size = 0; + m_arraySize = 0; } template @@ -174,6 +178,10 @@ MutexVector::MutexVector(int i){ template MutexVector::~MutexVector(){ delete[] m_items; + // safety for placement new usage + m_items = 0; + m_size = 0; + m_arraySize = 0; } template diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp index 67ee307bb68..fe7909ba5a1 100644 --- a/ndb/src/mgmapi/mgmapi.cpp +++ b/ndb/src/mgmapi/mgmapi.cpp @@ -144,6 +144,7 @@ extern "C" NdbMgmHandle ndb_mgm_create_handle() { + DBUG_ENTER("ndb_mgm_create_handle"); NdbMgmHandle h = (NdbMgmHandle)my_malloc(sizeof(ndb_mgm_handle),MYF(MY_WME)); h->connected = 0; @@ -163,7 +164,8 @@ ndb_mgm_create_handle() h->logfile = 0; #endif - return h; + DBUG_PRINT("info", ("handle=0x%x", (UintPtr)h)); + DBUG_RETURN(h); } extern "C" @@ -171,10 +173,13 @@ int ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv) { DBUG_ENTER("ndb_mgm_set_connectstring"); + DBUG_PRINT("info", ("handle=0x%x", (UintPtr)handle)); + handle->cfg.~LocalConfig(); new (&(handle->cfg)) LocalConfig; if (!handle->cfg.init(mgmsrv, 0) || handle->cfg.ids.size() == 0) { + handle->cfg.~LocalConfig(); new (&(handle->cfg)) LocalConfig; handle->cfg.init(0, 0); /* reset the LocalConfig */ SET_ERROR(handle, NDB_MGM_ILLEGAL_CONNECT_STRING, ""); @@ -191,8 +196,10 @@ extern "C" void ndb_mgm_destroy_handle(NdbMgmHandle * handle) { + DBUG_ENTER("ndb_mgm_destroy_handle"); if(!handle) - return; + DBUG_VOID_RETURN; + DBUG_PRINT("info", ("handle=0x%x", (UintPtr)(* handle))); /** * important! only disconnect if connected * other code relies on this @@ -209,6 +216,7 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle) (*handle)->cfg.~LocalConfig(); my_free((char*)* handle,MYF(MY_ALLOW_ZERO_PTR)); * handle = 0; + DBUG_VOID_RETURN; } /***************************************************************************** -- cgit v1.2.1 From 181205f0327bcbdf047b78d5e1f1be3b6d36be0b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Mar 2005 19:18:50 +0200 Subject: Fixed so no merge conflict with 5.0 ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Fixed so no merge conflict with --- ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 0b8e1910850..7247b7e2b9c 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -2227,8 +2227,9 @@ void Dbdict::checkSchemaStatus(Signal* signal) restartCreateTab(signal, tableId, oldEntry, false); return; }//if - break; } + ndbrequire(ok); + break; } case SchemaFile::DROP_TABLE_STARTED: jam(); -- cgit v1.2.1 From ec6ce01565bbb1a56b342a2dd4607869c0d93278 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Apr 2005 11:21:55 +0200 Subject: merge --- ndb/src/kernel/blocks/dbacc/DbaccMain.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index 12f77d59efc..a16c0da369b 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -2618,26 +2618,6 @@ void Dbacc::execACC_LOCKREQ(Signal* signal) *sig = *req; return; } - operationRecPtr.i = req->accOpPtr; - ptrCheckGuard(operationRecPtr, coprecsize, operationrec); - fragrecptr.i = operationRecPtr.p->fragptr; - ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec); - if (fragrecptr.p->keyLength == 0 && - // should test some state variable - operationRecPtr.p->elementPage != RNIL) { - jam(); - // re-compute long key vars - Page8Ptr tPageptr; - tPageptr.i = operationRecPtr.p->elementPage; - ptrCheckGuard(tPageptr, cpagesize, page8); - Uint32 tKeyptr = - operationRecPtr.p->elementPointer + - operationRecPtr.p->elementIsforward * - (ZELEM_HEAD_SIZE + fragrecptr.p->localkeylen); - tslcPageIndex = tPageptr.p->word32[tKeyptr] & 0x3ff; - tslcPagedir = tPageptr.p->word32[tKeyptr] >> 10; - searchLongKey(signal, false); - } if (lockOp == AccLockReq::Unlock) { jam(); // do unlock via ACC_COMMITREQ (immediate) -- cgit v1.2.1