summaryrefslogtreecommitdiff
path: root/storage/ndb
diff options
context:
space:
mode:
authorunknown <gni@dev3-221.dev.cn.tlan>2008-01-10 19:49:32 +0800
committerunknown <gni@dev3-221.dev.cn.tlan>2008-01-10 19:49:32 +0800
commitd8d857e0ccc63ffbe8c1a90994d51884d1ee46a0 (patch)
tree63007427eb160d7aad0a35714150fb41708d748e /storage/ndb
parent44ccc30b030863dde6a65ac380d5e5e85e32abf6 (diff)
parent20764f80ae34eea5f4b05bf24ea2949b098d0054 (diff)
downloadmariadb-git-d8d857e0ccc63ffbe8c1a90994d51884d1ee46a0.tar.gz
Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb
into dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb-bj storage/ndb/src/kernel/blocks/backup/Backup.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged storage/ndb/src/kernel/blocks/lgman.cpp: Auto merged storage/ndb/src/kernel/blocks/tsman.cpp: Auto merged storage/ndb/test/ndbapi/testDict.cpp: Auto merged storage/ndb/src/kernel/blocks/ERROR_codes.txt: SCCS merged storage/ndb/src/ndbapi/ndberror.c: SCCS merged
Diffstat (limited to 'storage/ndb')
-rw-r--r--storage/ndb/include/kernel/ndb_limits.h11
-rw-r--r--storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp3
-rw-r--r--storage/ndb/include/mgmapi/ndb_logevent.h8
-rw-r--r--storage/ndb/src/kernel/blocks/ERROR_codes.txt10
-rw-r--r--storage/ndb/src/kernel/blocks/backup/Backup.cpp59
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp6
-rw-r--r--storage/ndb/src/kernel/blocks/lgman.cpp16
-rw-r--r--storage/ndb/src/kernel/blocks/tsman.cpp16
-rw-r--r--storage/ndb/src/mgmapi/ndb_logevent.cpp2
-rw-r--r--storage/ndb/src/mgmsrv/ConfigInfo.cpp12
-rw-r--r--storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp31
-rw-r--r--storage/ndb/src/ndbapi/ndberror.c3
-rw-r--r--storage/ndb/test/ndbapi/testDict.cpp166
-rw-r--r--storage/ndb/test/src/NdbBackup.cpp3
14 files changed, 319 insertions, 27 deletions
diff --git a/storage/ndb/include/kernel/ndb_limits.h b/storage/ndb/include/kernel/ndb_limits.h
index 682f904d99a..9a9521e82ef 100644
--- a/storage/ndb/include/kernel/ndb_limits.h
+++ b/storage/ndb/include/kernel/ndb_limits.h
@@ -28,6 +28,17 @@
#define MAX_NODES 64
#define UNDEF_NODEGROUP 0xFFFF
+/**************************************************************************
+ * IT SHOULD BE (MAX_NDB_NODES - 1).
+ * WHEN MAX_NDB_NODE IS CHANGED, IT SHOULD BE CHANGED ALSO
+ **************************************************************************/
+#define MAX_DATA_NODE_ID 48
+/**************************************************************************
+ * IT SHOULD BE (MAX_NODES - 1).
+ * WHEN MAX_NODES IS CHANGED, IT SHOULD BE CHANGED ALSO
+ **************************************************************************/
+#define MAX_NODES_ID 63
+
/**
* MAX_API_NODES = MAX_NODES - No of NDB Nodes in use
*/
diff --git a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
index 6140e78cc5a..bbd3e818681 100644
--- a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
+++ b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
@@ -163,7 +163,8 @@ struct CreateFileImplRef {
InvalidFileMetadata = 1510,
OutOfMemory = 1511,
FileReadError = 1512,
- FilegroupNotOnline = 1513
+ FilegroupNotOnline = 1513,
+ FileSizeTooLarge = 1515
};
Uint32 senderData;
diff --git a/storage/ndb/include/mgmapi/ndb_logevent.h b/storage/ndb/include/mgmapi/ndb_logevent.h
index 6640b4a46e8..70691f6fd28 100644
--- a/storage/ndb/include/mgmapi/ndb_logevent.h
+++ b/storage/ndb/include/mgmapi/ndb_logevent.h
@@ -553,7 +553,13 @@ extern "C" {
/** Log event specific data for for corresponding NDB_LE_ log event */
struct {
int gth;
- unsigned page_size_kb;
+ /* union is for compatibility backward.
+ * page_size_kb member variable should be removed in the future
+ */
+ union {
+ unsigned page_size_kb;
+ unsigned page_size_bytes;
+ };
unsigned pages_used;
unsigned pages_total;
unsigned block;
diff --git a/storage/ndb/src/kernel/blocks/ERROR_codes.txt b/storage/ndb/src/kernel/blocks/ERROR_codes.txt
index 72791cb0ebc..9462c12c709 100644
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt
@@ -11,6 +11,8 @@ Next CMVMI 9000
Next BACKUP 10038
Next DBUTIL 11002
Next DBTUX 12008
+Next LGMAN 15001
+Next TSMAN 16001
Next SUMA 13034
TESTING NODE FAILURE, ARBITRATION
@@ -547,3 +549,11 @@ NDBCNTR:
1000: Crash insertion on SystemError::CopyFragRef
1001: Delay sending NODE_FAILREP (to own node), until error is cleared
+
+LGMAN:
+-----
+15000: Fail to create log file
+
+TSMAN:
+-----
+16000: Fail to create data file
diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
index 45501bf50d5..ec7b3f42374 100644
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
@@ -967,6 +967,7 @@ Backup::checkNodeFail(Signal* signal,
ref->backupPtr = ptr.i;
ref->backupId = ptr.p->backupId;
ref->errorCode = AbortBackupOrd::BackupFailureDueToNodeFail;
+ ref->nodeId = getOwnNodeId();
gsn= GSN_STOP_BACKUP_REF;
len= StopBackupRef::SignalLength;
pos= &ref->nodeId - signal->getDataPtr();
@@ -2081,6 +2082,15 @@ Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr)
/**
* Insert footers
*/
+ //if backup error, we needn't insert footers
+ if(ptr.p->checkError())
+ {
+ jam();
+ closeFiles(signal, ptr);
+ ptr.p->errorCode = 0;
+ return;
+ }
+
{
BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr);
@@ -4187,6 +4197,37 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
#if 0
ndbout << "Ptr to data = " << hex << tmp << endl;
#endif
+ BackupRecordPtr ptr LINT_SET_PTR;
+ c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
+
+ if (ERROR_INSERTED(10036))
+ {
+ jam();
+ filePtr.p->m_flags &= ~(Uint32)BackupFile::BF_FILE_THREAD;
+ filePtr.p->errorCode = 2810;
+ ptr.p->setErrorCode(2810);
+
+ if(ptr.p->m_gsn == GSN_STOP_BACKUP_REQ)
+ {
+ jam();
+ closeFile(signal, ptr, filePtr);
+ }
+ return;
+ }
+
+ if(filePtr.p->errorCode != 0)
+ {
+ jam();
+ ptr.p->setErrorCode(filePtr.p->errorCode);
+
+ if(ptr.p->m_gsn == GSN_STOP_BACKUP_REQ)
+ {
+ jam();
+ closeFile(signal, ptr, filePtr);
+ }
+ return;
+ }
+
if (!ready_to_write(ready, sz, eof, filePtr.p))
{
jam();
@@ -4218,8 +4259,6 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
ndbrequire(flags & BackupFile::BF_OPEN);
ndbrequire(flags & BackupFile::BF_FILE_THREAD);
- BackupRecordPtr ptr LINT_SET_PTR;
- c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
closeFile(signal, ptr, filePtr);
}
@@ -4582,6 +4621,22 @@ Backup::closeFilesDone(Signal* signal, BackupRecordPtr ptr)
jam();
+ //error when do insert footer or close file
+ if(ptr.p->checkError())
+ {
+ StopBackupRef * ref = (StopBackupRef*)signal->getDataPtr();
+ ref->backupPtr = ptr.i;
+ ref->backupId = ptr.p->backupId;
+ ref->errorCode = ptr.p->errorCode;
+ ref->nodeId = getOwnNodeId();
+ sendSignal(ptr.p->masterRef, GSN_STOP_BACKUP_REF, signal,
+ StopBackupConf::SignalLength, JBB);
+
+ ptr.p->m_gsn = GSN_STOP_BACKUP_REF;
+ ptr.p->slaveState.setState(CLEANING);
+ return;
+ }
+
StopBackupConf* conf = (StopBackupConf*)signal->getDataPtrSend();
conf->backupId = ptr.p->backupId;
conf->backupPtr = ptr.i;
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index bbacb300089..e2b1058242d 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -8464,6 +8464,12 @@ void Dbdih::execDIHNDBTAMPER(Signal* signal)
} else if (tuserpointer < 15000) {
jam();
tuserblockref = DBDICT_REF;
+ } else if (tuserpointer < 16000) {
+ jam();
+ tuserblockref = LGMAN_REF;
+ } else if (tuserpointer < 17000) {
+ jam();
+ tuserblockref = TSMAN_REF;
} else if (tuserpointer < 30000) {
/*--------------------------------------------------------------------*/
// Ignore errors in the 20000-range.
diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp
index 0481f7b399b..fc28906f4db 100644
--- a/storage/ndb/src/kernel/blocks/lgman.cpp
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp
@@ -547,6 +547,22 @@ Lgman::execCREATE_FILE_REQ(Signal* signal)
break;
}
+ if(ERROR_INSERTED(15000) ||
+ (sizeof(void*) == 4 && req->file_size_hi & 0xFFFFFFFF))
+ {
+ jam();
+ if(signal->getNoOfSections())
+ releaseSections(signal);
+
+ CreateFileImplRef* ref= (CreateFileImplRef*)signal->getDataPtr();
+ ref->senderData = senderData;
+ ref->senderRef = reference();
+ ref->errorCode = CreateFileImplRef::FileSizeTooLarge;
+ sendSignal(senderRef, GSN_CREATE_FILE_REF, signal,
+ CreateFileImplRef::SignalLength, JBB);
+ return;
+ }
+
new (file_ptr.p) Undofile(req, ptr.i);
Local_undofile_list tmp(m_file_pool, ptr.p->m_meta_files);
diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp
index 3a7003d56c8..8e68e118f98 100644
--- a/storage/ndb/src/kernel/blocks/tsman.cpp
+++ b/storage/ndb/src/kernel/blocks/tsman.cpp
@@ -537,6 +537,22 @@ Tsman::execCREATE_FILE_REQ(Signal* signal){
break;
}
+ if(ERROR_INSERTED(16000) ||
+ (sizeof(void*) == 4 && req->file_size_hi & 0xFFFFFFFF))
+ {
+ jam();
+ if(signal->getNoOfSections())
+ releaseSections(signal);
+
+ CreateFileImplRef* ref= (CreateFileImplRef*)signal->getDataPtr();
+ ref->senderData = senderData;
+ ref->senderRef = reference();
+ ref->errorCode = CreateFileImplRef::FileSizeTooLarge;
+ sendSignal(senderRef, GSN_CREATE_FILE_REF, signal,
+ CreateFileImplRef::SignalLength, JBB);
+ return;
+ }
+
new (file_ptr.p) Datafile(req);
Local_datafile_list tmp(m_file_pool, ptr.p->m_meta_files);
tmp.add(file_ptr);
diff --git a/storage/ndb/src/mgmapi/ndb_logevent.cpp b/storage/ndb/src/mgmapi/ndb_logevent.cpp
index ed72db297ab..fbf026fd79d 100644
--- a/storage/ndb/src/mgmapi/ndb_logevent.cpp
+++ b/storage/ndb/src/mgmapi/ndb_logevent.cpp
@@ -256,7 +256,7 @@ struct Ndb_logevent_body_row ndb_logevent_body[]= {
ROW( ReceiveBytesStatistic, "mean_received_bytes", 2, mean_received_bytes),
ROW( MemoryUsage, "gth", 1, gth),
- ROW( MemoryUsage, "page_size_kb", 2, page_size_kb),
+ ROW( MemoryUsage, "page_size_bytes", 2, page_size_bytes),
ROW( MemoryUsage, "pages_used", 3, pages_used),
ROW( MemoryUsage, "pages_total", 4, pages_total),
ROW( MemoryUsage, "block", 5, block),
diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp
index 9cbb7d93ceb..6e560ff2701 100644
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -397,7 +397,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
- STR_VALUE(MAX_NODES) },
+ STR_VALUE(MAX_DATA_NODE_ID) },
{
CFG_NODE_ID,
@@ -409,7 +409,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
- STR_VALUE(MAX_NODES) },
+ STR_VALUE(MAX_DATA_NODE_ID) },
{
KEY_INTERNAL,
@@ -1404,7 +1404,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
- STR_VALUE(MAX_NODES) },
+ STR_VALUE(MAX_NODES_ID) },
{
CFG_NODE_ID,
@@ -1416,7 +1416,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
- STR_VALUE(MAX_NODES) },
+ STR_VALUE(MAX_NODES_ID) },
{
KEY_INTERNAL,
@@ -1547,7 +1547,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
- STR_VALUE(MAX_NODES) },
+ STR_VALUE(MAX_NODES_ID) },
{
CFG_NODE_ID,
@@ -1559,7 +1559,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT,
MANDATORY,
"1",
- STR_VALUE(MAX_NODES) },
+ STR_VALUE(MAX_NODES_ID) },
{
CFG_LOG_DESTINATION,
diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index ab6d90ad59e..953cfffd73b 100644
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -2340,6 +2340,22 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t)
{
DBUG_ENTER("NdbDictionaryImpl::createTable");
+
+ bool autoIncrement = false;
+ Uint64 initialValue = 0;
+ for (Uint32 i = 0; i < t.m_columns.size(); i++) {
+ const NdbColumnImpl* c = t.m_columns[i];
+ assert(c != NULL);
+ if (c->m_autoIncrement) {
+ if (autoIncrement) {
+ m_error.code = 4335;
+ DBUG_RETURN(-1);
+ }
+ autoIncrement = true;
+ initialValue = c->m_autoIncrementInitialValue;
+ }
+ }
+
// if the new name has not been set, use the copied name
if (t.m_newExternalName.empty())
{
@@ -2377,21 +2393,6 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t)
// auto-increment - use "t" because initial value is not in DICT
{
- bool autoIncrement = false;
- Uint64 initialValue = 0;
- for (Uint32 i = 0; i < t.m_columns.size(); i++) {
- const NdbColumnImpl* c = t.m_columns[i];
- assert(c != NULL);
- if (c->m_autoIncrement) {
- if (autoIncrement) {
- m_error.code = 4335;
- delete t2;
- DBUG_RETURN(-1);
- }
- autoIncrement = true;
- initialValue = c->m_autoIncrementInitialValue;
- }
- }
if (autoIncrement) {
// XXX unlikely race condition - t.m_id may no longer be same table
// the tuple id range is not used on input
diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c
index e7f946118f2..2ebf09c42ce 100644
--- a/storage/ndb/src/ndbapi/ndberror.c
+++ b/storage/ndb/src/ndbapi/ndberror.c
@@ -426,6 +426,7 @@ ErrorBundle ErrorCodes[] = {
{ 1512, DMEC, SE, "File read error" },
{ 1513, DMEC, IE, "Filegroup not online" },
{ 1514, DMEC, SE, "Currently there is a limit of one logfile group" },
+ { 1515, DMEC, SE, "Currently there is a 4G limit of one undo/data-file in 32-bit host" },
{ 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" },
{ 775, DMEC, SE, "Create file is not supported when Diskless=1" },
@@ -625,6 +626,8 @@ ErrorBundle ErrorCodes[] = {
{ 4274, DMEC, IE, "Corrupted main table PK in blob operation" },
{ 4275, DMEC, AE, "The blob method is incompatible with operation type or lock mode" },
{ 4294, DMEC, AE, "Scan filter is too large, discarded" },
+ { 2810, DMEC, TR, "No space left on the device" },
+ { 2815, DMEC, TR, "Error in reading files, please check file system" },
{ NO_CONTACT_WITH_PROCESS, DMEC, AE,
"No contact with the process (dead ?)."},
diff --git a/storage/ndb/test/ndbapi/testDict.cpp b/storage/ndb/test/ndbapi/testDict.cpp
index e1b8f2b3c7f..ae940074067 100644
--- a/storage/ndb/test/ndbapi/testDict.cpp
+++ b/storage/ndb/test/ndbapi/testDict.cpp
@@ -2357,6 +2357,168 @@ runBug24631(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
+int
+runBug29186(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int lgError = 15000;
+ int tsError = 16000;
+ int res;
+ char lgname[256];
+ char ufname[256];
+ char tsname[256];
+ char dfname[256];
+
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 2){
+ ctx->stopTest();
+ return NDBT_OK;
+ }
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary* pDict = pNdb->getDictionary();
+ NdbDictionary::Dictionary::List list;
+
+ if (pDict->listObjects(list) == -1)
+ return NDBT_FAILED;
+
+ // 1.create logfile group
+ const char * lgfound = 0;
+
+ for (Uint32 i = 0; i<list.count; i++)
+ {
+ switch(list.elements[i].type){
+ case NdbDictionary::Object::LogfileGroup:
+ lgfound = list.elements[i].name;
+ break;
+ default:
+ break;
+ }
+ if (lgfound)
+ break;
+ }
+
+ if (lgfound == 0)
+ {
+ BaseString::snprintf(lgname, sizeof(lgname), "LG-%u", rand());
+ NdbDictionary::LogfileGroup lg;
+
+ lg.setName(lgname);
+ lg.setUndoBufferSize(8*1024*1024);
+ if(pDict->createLogfileGroup(lg) != 0)
+ {
+ g_err << "Failed to create logfilegroup:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+ }
+ else
+ {
+ BaseString::snprintf(lgname, sizeof(lgname), "%s", lgfound);
+ }
+
+ if(restarter.waitClusterStarted(60)){
+ g_err << "waitClusterStarted failed"<< endl;
+ return NDBT_FAILED;
+ }
+
+ if(restarter.insertErrorInAllNodes(lgError) != 0){
+ g_err << "failed to set error insert"<< endl;
+ return NDBT_FAILED;
+ }
+
+ g_info << "error inserted" << endl;
+ g_info << "waiting some before add log file" << endl;
+ g_info << "starting create log file group" << endl;
+
+ NdbDictionary::Undofile uf;
+ BaseString::snprintf(ufname, sizeof(ufname), "%s-%u", lgname, rand());
+ uf.setPath(ufname);
+ uf.setSize(2*1024*1024);
+ uf.setLogfileGroup(lgname);
+
+ if(pDict->createUndofile(uf) == 0)
+ {
+ g_err << "Create log file group should fail on error_insertion " << lgError << endl;
+ return NDBT_FAILED;
+ }
+
+ //clear lg error
+ if(restarter.insertErrorInAllNodes(15099) != 0){
+ g_err << "failed to set error insert"<< endl;
+ return NDBT_FAILED;
+ }
+ NdbSleep_SecSleep(5);
+
+ //lg error has been cleared, so we can add undo file
+ if(pDict->createUndofile(uf) != 0)
+ {
+ g_err << "Failed to create undofile:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ if(restarter.waitClusterStarted(60)){
+ g_err << "waitClusterStarted failed"<< endl;
+ return NDBT_FAILED;
+ }
+
+ if(restarter.insertErrorInAllNodes(tsError) != 0){
+ g_err << "failed to set error insert"<< endl;
+ return NDBT_FAILED;
+ }
+ g_info << "error inserted" << endl;
+ g_info << "waiting some before create table space" << endl;
+ g_info << "starting create table space" << endl;
+
+ //r = runCreateTablespace(ctx, step);
+ BaseString::snprintf(tsname, sizeof(tsname), "TS-%u", rand());
+ BaseString::snprintf(dfname, sizeof(dfname), "%s-%u-1.dat", tsname, rand());
+
+ NdbDictionary::Tablespace ts;
+ ts.setName(tsname);
+ ts.setExtentSize(1024*1024);
+ ts.setDefaultLogfileGroup(lgname);
+
+ if(pDict->createTablespace(ts) != 0)
+ {
+ g_err << "Failed to create tablespace:"
+ << endl << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ NdbDictionary::Datafile df;
+ df.setPath(dfname);
+ df.setSize(1*1024*1024);
+ df.setTablespace(tsname);
+
+ if(pDict->createDatafile(df) == 0)
+ {
+ g_err << "Create table space should fail on error_insertion " << tsError << endl;
+ return NDBT_FAILED;
+ }
+ //Clear the inserted error
+ if(restarter.insertErrorInAllNodes(16099) != 0){
+ g_err << "failed to set error insert"<< endl;
+ return NDBT_FAILED;
+ }
+ NdbSleep_SecSleep(5);
+
+ if (pDict->dropTablespace(pDict->getTablespace(tsname)) != 0)
+ {
+ g_err << "Failed to drop tablespace: " << pDict->getNdbError() << endl;
+ return NDBT_FAILED;
+ }
+
+ if (lgfound == 0)
+ {
+ if (pDict->dropLogfileGroup(pDict->getLogfileGroup(lgname)) != 0)
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
struct RandSchemaOp
{
struct Obj
@@ -3123,6 +3285,10 @@ TESTCASE("Bug24631",
""){
INITIALIZER(runBug24631);
}
+TESTCASE("Bug29186",
+ ""){
+ INITIALIZER(runBug29186);
+}
NDBT_TESTSUITE_END(testDict);
int main(int argc, const char** argv){
diff --git a/storage/ndb/test/src/NdbBackup.cpp b/storage/ndb/test/src/NdbBackup.cpp
index 42b15885089..3fb4de461f0 100644
--- a/storage/ndb/test/src/NdbBackup.cpp
+++ b/storage/ndb/test/src/NdbBackup.cpp
@@ -350,7 +350,8 @@ FailS_codes[] = {
10025,
10027,
10033,
- 10035
+ 10035,
+ 10036
};
int