Below is the list of changes that have just been committed into a local
5.1 repository of zhl. When zhl 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-10-16 14:54:34+00:00, lzhou@dev3-63.(none) +7 -0
BUG#29186 Return error to client in the following condition:
1: Create a log file which is larger than 4G in 32-bit host.
2: Create a data file (tablespace) which is larger than 4G in 32-bit host.
storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp@stripped, 2007-10-16
14:54:27+00:00, lzhou@dev3-63.(none) +2 -1
Add error code for log file too large
storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2007-10-16 14:54:27+00:00,
lzhou@dev3-63.(none) +10 -0
Add error insert code in lgman and tsman
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-10-16 14:54:27+00:00,
lzhou@dev3-63.(none) +6 -0
Add error code definination of lgman and tsman
storage/ndb/src/kernel/blocks/lgman.cpp@stripped, 2007-10-16 14:54:27+00:00,
lzhou@dev3-63.(none) +16 -0
Return REF when log file more than 4G in 32-bits host
storage/ndb/src/kernel/blocks/tsman.cpp@stripped, 2007-10-16 14:54:27+00:00,
lzhou@dev3-63.(none) +16 -0
return FER when data file larger than 4G in 32-bits host
storage/ndb/src/ndbapi/ndberror.c@stripped, 2007-10-16 14:54:27+00:00, lzhou@dev3-63.(none)
+1 -0
Add describe of new errorCode
storage/ndb/test/ndbapi/testDict.cpp@stripped, 2007-10-16 14:54:27+00:00,
lzhou@dev3-63.(none) +61 -0
Add test case for bug29186
diff -Nrup a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
--- a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp 2006-12-23 19:33:29
+00:00
+++ b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp 2007-10-16 14:54:27
+00:00
@@ -163,7 +163,8 @@ struct CreateFileImplRef {
InvalidFileMetadata = 1510,
OutOfMemory = 1511,
FileReadError = 1512,
- FilegroupNotOnline = 1513
+ FilegroupNotOnline = 1513,
+ FileSizeTooLarge = 1515
};
Uint32 senderData;
diff -Nrup a/storage/ndb/src/kernel/blocks/ERROR_codes.txt
b/storage/ndb/src/kernel/blocks/ERROR_codes.txt
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-09-03 09:32:46 +00:00
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-10-16 14:54:27 +00:00
@@ -12,6 +12,8 @@ Next BACKUP 10038
Next DBUTIL 11002
Next DBTUX 12008
Next SUMA 13001
+Next LGMAN 15001
+Next TSMAN 16001
TESTING NODE FAILURE, ARBITRATION
---------------------------------
@@ -535,3 +537,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 -Nrup a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-06-26 13:42:48 +00:00
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-10-16 14:54:27 +00:00
@@ -8286,6 +8286,12 @@ void Dbdih::execDIHNDBTAMPER(Signal* sig
} 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 -Nrup a/storage/ndb/src/kernel/blocks/lgman.cpp
b/storage/ndb/src/kernel/blocks/lgman.cpp
--- a/storage/ndb/src/kernel/blocks/lgman.cpp 2007-07-03 12:12:24 +00:00
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp 2007-10-16 14:54:27 +00:00
@@ -547,6 +547,22 @@ Lgman::execCREATE_FILE_REQ(Signal* signa
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 -Nrup a/storage/ndb/src/kernel/blocks/tsman.cpp
b/storage/ndb/src/kernel/blocks/tsman.cpp
--- a/storage/ndb/src/kernel/blocks/tsman.cpp 2007-05-15 07:08:13 +00:00
+++ b/storage/ndb/src/kernel/blocks/tsman.cpp 2007-10-16 14:54:27 +00:00
@@ -523,6 +523,22 @@ Tsman::execCREATE_FILE_REQ(Signal* signa
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 -Nrup a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c
--- a/storage/ndb/src/ndbapi/ndberror.c 2007-09-07 09:15:04 +00:00
+++ b/storage/ndb/src/ndbapi/ndberror.c 2007-10-16 14:54:27 +00:00
@@ -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" },
diff -Nrup a/storage/ndb/test/ndbapi/testDict.cpp b/storage/ndb/test/ndbapi/testDict.cpp
--- a/storage/ndb/test/ndbapi/testDict.cpp 2007-05-15 07:08:13 +00:00
+++ b/storage/ndb/test/ndbapi/testDict.cpp 2007-10-16 14:54:27 +00:00
@@ -2357,6 +2357,63 @@ runBug24631(NDBT_Context* ctx, NDBT_Step
return NDBT_OK;
}
+int
+runBug29186(NDBT_Context* ctx, NDBT_Step* step)
+{
+ int lgError = 15000;
+ int tsError = 16000;
+ int result = NDBT_OK;
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 2){
+ ctx->stopTest();
+ return NDBT_OK;
+ }
+
+ CHECK2(restarter.waitClusterStarted(60) == 0,
+ "waitClusterStarted failed");
+
+ CHECK2(restarter.insertErrorInAllNodes(lgError) == 0,
+ "failed to set error insert");
+
+ g_info << "error inserted" << endl;
+ g_info << "waiting some before create log file group" << endl;
+ g_info << "starting create log file group" << endl;
+
+ int r = runCreateLogfileGroup(ctx, step);
+
+ g_info << "r = " << r
+ << " which should fail in both 32-bits and 64-bits host " << endl;
+
+ if (r == 0) {
+ g_err << "Create log file group should fail on error_insertion " <<
lgError << endl;
+ return NDBT_FAILED;
+ }
+
+ CHECK2(restarter.waitClusterStarted(60) == 0,
+ "waitClusterStarted failed");
+
+ CHECK2(restarter.insertErrorInAllNodes(tsError) == 0,
+ "failed to set error insert");
+
+ 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);
+
+ g_info << "r = " << r
+ << " which should fail in both 32-bits and 64-bits host " << endl;
+
+ if (r == 0) {
+ g_err << "Create table space should fail on error_insertion " << tsError
<< endl;
+ return NDBT_FAILED;
+ }
+
+ end:
+ return result;
+}
+
struct RandSchemaOp
{
struct Obj
@@ -2863,6 +2920,10 @@ TESTCASE("DictRestart",
TESTCASE("Bug24631",
""){
INITIALIZER(runBug24631);
+}
+TESTCASE("Bug29186",
+ ""){
+ INITIALIZER(runBug29186);
}
NDBT_TESTSUITE_END(testDict);
| Thread |
|---|
| • bk commit into 5.1 tree (lzhou:1.2552) BUG#29186 | lzhou | 16 Oct |