From: Date: May 8 2007 7:49am Subject: bk commit into 5.0 tree (jonas:1.2305) BUG#27437 List-Archive: http://lists.mysql.com/commits/26266 X-Bug: 27437 Message-Id: <20070508054908.C2ECF49F9E@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.0 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@stripped, 2007-05-08 07:49:05+02:00, jonas@stripped +5 -0 ndb - bug#27437 bug in interpretedupdate (used for auto-increment) that made TUPKEYREF be sent twice this was however "normally" shadowed, but made LQH crash when LCP was about to start mysql-test/r/ndb_basic.result@stripped, 2007-05-08 07:49:02+02:00, jonas@stripped +6 -0 testcase mysql-test/t/ndb_basic.test@stripped, 2007-05-08 07:49:02+02:00, jonas@stripped +15 -0 testcase ndb/src/kernel/blocks/dblqh/Dblqh.hpp@stripped, 2007-05-08 07:49:02+02:00, jonas@stripped +3 -0 add extra variable to make sure TUPKEYREF is not received twice (VM_TRACE) ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-05-08 07:49:03+02:00, jonas@stripped +17 -0 add extra variable to make sure TUPKEYREF is not received twice (VM_TRACE) ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp@stripped, 2007-05-08 07:49:03+02:00, jonas@stripped +5 -1 make sure TUPKEYREF is not sent twice in case of "error" in interpreted program # 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/50-work --- 1.34/mysql-test/r/ndb_basic.result 2007-05-08 07:49:08 +02:00 +++ 1.35/mysql-test/r/ndb_basic.result 2007-05-08 07:49:08 +02:00 @@ -667,6 +667,12 @@ 57 newval 58 newval drop table t1; +create table t1 (a int primary key auto_increment) engine = ndb; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +insert into t1(a) values (20),(28); +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +insert into t1() values (21), (22); +drop table t1; CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb; select * from t1; b --- 1.35/mysql-test/t/ndb_basic.test 2007-05-08 07:49:08 +02:00 +++ 1.36/mysql-test/t/ndb_basic.test 2007-05-08 07:49:08 +02:00 @@ -607,6 +607,21 @@ drop table t1; # +# bug#27437 +connection con1; +create table t1 (a int primary key auto_increment) engine = ndb; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +connection con2; +insert into t1(a) values (20),(28); +connection con1; +insert into t1() values (),(),(),(),(),(),(),(),(),(),(),(); +connection con2; +insert into t1() values (21), (22); +connection con1; + +drop table t1; + +# # BUG#14514 Creating table with packed key fails silently # --- 1.41/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2007-05-08 07:49:08 +02:00 +++ 1.42/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2007-05-08 07:49:08 +02:00 @@ -2059,6 +2059,9 @@ Uint8 simpleRead; Uint8 seqNoReplica; Uint8 tcNodeFailrec; +#ifdef VM_TRACE + Uint8 tupkeyref; +#endif }; /* p2c: size = 280 bytes */ typedef Ptr TcConnectionrecPtr; --- 1.101/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-05-08 07:49:08 +02:00 +++ 1.102/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-05-08 07:49:08 +02:00 @@ -2766,6 +2766,12 @@ tcConnectptr.i = tupKeyRef->userRef; terrorCode = tupKeyRef->errorCode; ptrCheckGuard(tcConnectptr, ctcConnectrecFileSize, tcConnectionrec); + +#ifdef VM_TRACE + ndbrequire(tcConnectptr.p->tupkeyref == 0); + tcConnectptr.p->tupkeyref = 1; +#endif + switch (tcConnectptr.p->transactionState) { case TcConnectionrec::WAIT_TUP: jam(); @@ -3331,6 +3337,10 @@ locTcConnectptr.p->tcTimer = cLqhTimeOutCount; locTcConnectptr.p->tableref = RNIL; locTcConnectptr.p->savePointId = 0; +#ifdef VM_TRACE + locTcConnectptr.p->tupkeyref = 0; +#endif + cfirstfreeTcConrec = nextTc; tcConnectptr = locTcConnectptr; locTcConnectptr.p->connectState = TcConnectionrec::CONNECTED; @@ -5861,6 +5871,10 @@ void Dblqh::releaseTcrec(Signal* signal, TcConnectionrecPtr locTcConnectptr) { jam(); +#ifdef VM_TRACE + locTcConnectptr.p->tupkeyref = 0; +#endif + locTcConnectptr.p->tcTimer = 0; locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED; locTcConnectptr.p->nextTcConnectrec = cfirstfreeTcConrec; @@ -5883,6 +5897,9 @@ void Dblqh::releaseTcrecLog(Signal* signal, TcConnectionrecPtr locTcConnectptr) { jam(); +#ifdef VM_TRACE + locTcConnectptr.p->tupkeyref = 0; +#endif locTcConnectptr.p->tcTimer = 0; locTcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED; locTcConnectptr.p->nextTcConnectrec = cfirstfreeTcConrec; --- 1.23/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-05-08 07:49:08 +02:00 +++ 1.24/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-05-08 07:49:08 +02:00 @@ -1139,7 +1139,11 @@ regOperPtr->attrinbufLen); } else { jam(); - retValue = interpreterStartLab(signal, pagePtr, regOperPtr->pageOffset); + if (interpreterStartLab(signal, pagePtr, regOperPtr->pageOffset) == -1) + { + jam(); + return -1; + } }//if if (retValue == -1) {