Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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
1.2375 06/04/21 09:09:33 jonas@stripped +4 -0
ndb - bug#19245
A-insert/B-insert/A-rollback/B-rollback leads to node crash, as bits in tuple header
gets incorrectly assigned in second insert
this also likely fixes bug 18589 and explains 18808
storage/ndb/test/run-test/daily-basic-tests.txt
1.42 06/04/21 09:09:30 jonas@stripped +4 -0
testcase for bug#19245
storage/ndb/test/ndbapi/testBasic.cpp
1.11 06/04/21 09:09:30 jonas@stripped +39 -0
testcase for bug#19245
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
1.31 06/04/21 09:09:30 jonas@stripped +4 -0
Make sure that alloc bit is set if insert and first_op
storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
1.8 06/04/21 09:09:30 jonas@stripped +0 -1
remove debug printout
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-work
--- 1.41/storage/ndb/test/run-test/daily-basic-tests.txt 2006-04-06 13:18:10 +02:00
+++ 1.42/storage/ndb/test/run-test/daily-basic-tests.txt 2006-04-21 09:09:30 +02:00
@@ -209,6 +209,10 @@
max-time: 500
cmd: testBasic
+args: -n MassiveRollback3 T1 D1
+
+max-time: 500
+cmd: testBasic
args: -n TupError
max-time: 500
--- 1.7/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp 2006-02-08 09:04:53 +01:00
+++ 1.8/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp 2006-04-21 09:09:30 +02:00
@@ -170,7 +170,6 @@
/**
* Aborting last operation that performed ALLOC
*/
- ndbout_c("clearing ALLOC");
tuple_ptr->m_header_bits &= ~(Uint32)Tuple_header::ALLOC;
tuple_ptr->m_header_bits |= Tuple_header::FREED;
}
--- 1.30/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2006-02-07 11:27:08 +01:00
+++ 1.31/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2006-04-21 09:09:30 +02:00
@@ -1407,6 +1407,8 @@
}
req_struct->m_use_rowid = false;
base->m_header_bits &= ~(Uint32)Tuple_header::FREE;
+ base->m_header_bits |= Tuple_header::ALLOC &
+ (regOperPtr.p->is_first_operation() ? ~0 : 1);
}
else
{
@@ -1415,6 +1417,8 @@
{
ndbout_c("no mem insert but rowid (same)");
base->m_header_bits &= ~(Uint32)Tuple_header::FREE;
+ base->m_header_bits |= Tuple_header::ALLOC &
+ (regOperPtr.p->is_first_operation() ? ~0 : 1);
}
else
{
--- 1.10/storage/ndb/test/ndbapi/testBasic.cpp 2006-01-11 09:26:04 +01:00
+++ 1.11/storage/ndb/test/ndbapi/testBasic.cpp 2006-04-21 09:09:30 +02:00
@@ -1034,6 +1034,38 @@
return result;
}
+int
+runMassiveRollback3(NDBT_Context* ctx, NDBT_Step* step){
+
+ int result = NDBT_OK;
+ HugoOperations hugoOps(*ctx->getTab());
+ Ndb* pNdb = GETNDB(step);
+
+ const Uint32 BATCH = 10;
+ const Uint32 OPS_TOTAL = 20;
+ const Uint32 LOOPS = 100;
+
+ for(Uint32 loop = 0; loop<LOOPS; loop++)
+ {
+ CHECK(hugoOps.startTransaction(pNdb) == 0);
+ bool ok = true;
+ for (Uint32 i = 0; i<OPS_TOTAL; i+= BATCH)
+ {
+ CHECK(hugoOps.pkInsertRecord(pNdb, i, BATCH, 0) == 0);
+ if (hugoOps.execute_NoCommit(pNdb) != 0)
+ {
+ ok = false;
+ break;
+ }
+ }
+ hugoOps.execute_Rollback(pNdb);
+ CHECK(hugoOps.closeTransaction(pNdb) == 0);
+ }
+
+ hugoOps.closeTransaction(pNdb);
+ return result;
+}
+
/**
* TUP errors
*/
@@ -1358,6 +1390,13 @@
"Test rollback of 4096 operations"){
INITIALIZER(runClearTable2);
INITIALIZER(runMassiveRollback2);
+ FINALIZER(runClearTable2);
+}
+TESTCASE("MassiveRollback3",
+ "Test rollback of 4096 operations"){
+ INITIALIZER(runClearTable2);
+ STEP(runMassiveRollback3);
+ STEP(runMassiveRollback3);
FINALIZER(runClearTable2);
}
TESTCASE("MassiveTransaction",
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2375) BUG#19245 | jonas | 21 Apr |