Commit 004ec383 authored by joreland@mysql.com's avatar joreland@mysql.com

Merge mysql.com:/home/jonas/src/mysql-4.1

into mysql.com:/home/jonas/src/mysql-5.0
parents b57eab43 280bef18
......@@ -4546,33 +4546,32 @@ Dbacc::check_lock_upgrade(Signal* signal,
// Find end of parallell que
tmp = lock_owner;
Uint32 lockMode = next.p->lockMode > lock_owner.p->lockMode ?
next.p->lockMode : lock_owner.p->lockMode;
while(tmp.p->nextParallelQue != RNIL)
{
jam();
tmp.i = tmp.p->nextParallelQue;
tmp.p->lockMode = lockMode;
ptrCheckGuard(tmp, coprecsize, operationrec);
}
tmp.p->lockMode = lockMode;
next.p->prevParallelQue = tmp.i;
tmp.p->nextParallelQue = next.i;
OperationrecPtr save = operationRecPtr;
Uint32 lockMode = lock_owner.p->lockMode;
Uint32 TelementIsDisappeared = 0; // lock upgrade = all reads
Uint32 ThashValue = lock_owner.p->hashValue;
Uint32 localdata[2];
localdata[0] = lock_owner.p->localdata[0];
localdata[1] = lock_owner.p->localdata[1];
do {
next.p->elementIsDisappeared = TelementIsDisappeared;
next.p->hashValue = ThashValue;
next.p->localdata[0] = localdata[0];
next.p->localdata[1] = localdata[1];
next.p->lockMode = lockMode;
operationRecPtr = next;
next.p->lockMode = lockMode;
TelementIsDisappeared = executeNextOperation(signal);
executeNextOperation(signal);
if (next.p->nextParallelQue != RNIL)
{
jam();
......
......@@ -635,7 +635,14 @@ runLockUpgrade2(NDBT_Context* ctx, NDBT_Step* step){
ndbout_c("wait 3 - done");
NdbSleep_MilliSleep(200);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
if(ctx->getProperty("LU_COMMIT", (Uint32)0) == 0)
{
CHECK(hugoOps.execute_Commit(pNdb) == 0);
}
else
{
CHECK(hugoOps.execute_Rollback(pNdb) == 0);
}
} while(0);
return result;
......@@ -650,7 +657,7 @@ main(int argc, const char** argv){
NDBT_TestSuite ts("testOperations");
for(Uint32 i = 0; i <6; i++)
for(Uint32 i = 0; i < 12; i++)
{
BaseString name("bug_9749");
name.appfmt("_%d", i);
......@@ -658,8 +665,9 @@ main(int argc, const char** argv){
name.c_str(), "");
pt->setProperty("LOCK_UPGRADE", 1 + (i & 1));
pt->setProperty("LU_OP", 1 + (i >> 1));
pt->setProperty("LU_OP", 1 + ((i >> 1) % 3));
pt->setProperty("LU_COMMIT", i / 6);
pt->addInitializer(new NDBT_Initializer(pt,
"runClearTable",
runClearTable));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment