List:Commits« Previous MessageNext Message »
From:tomas Date:April 25 2007 7:30pm
Subject:bk commit into 5.1 tree (tomas:1.2501)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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-04-25 21:30:37+02:00, tomas@stripped +6 -0
  Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca
  into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-6.1
  MERGE: 1.2403.9.31

  storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp@stripped, 2007-04-25 21:27:24+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.21.1.2

  storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp@stripped, 2007-04-25 21:27:24+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.19.1.1

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp@stripped, 2007-04-25 21:27:24+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.77.1.2

  storage/ndb/test/ndbapi/testBasic.cpp@stripped, 2007-04-25 21:30:34+02:00, tomas@stripped +49 -50
    manual merge
    MERGE: 1.17.1.2

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-04-25 21:27:24+02:00, tomas@stripped +0 -0
    Auto merged
    MERGE: 1.61.1.11

  storage/ndb/test/tools/Makefile.am@stripped, 2007-04-25 21:30:34+02:00, tomas@stripped +0 -2
    manual merge
    MERGE: 1.16.1.1

# 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:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-telco-6.1/RESYNC

--- 1.74/storage/ndb/test/run-test/daily-basic-tests.txt	2007-04-23 15:44:59 +02:00
+++ 1.75/storage/ndb/test/run-test/daily-basic-tests.txt	2007-04-25 21:27:24 +02:00
@@ -244,6 +244,10 @@
 args: -n Bug27756
 
 max-time: 500
+cmd: testBasic
+args: -n Bug28073
+
+max-time: 500
 cmd: testIndex
 args: -n Bug25059 -r 3000 T1
 
@@ -675,6 +679,10 @@
 max-time: 500
 cmd: testNdbApi
 args: -n Bug_WritePartialIgnoreError T1 
+
+max-time: 500
+cmd: testNdbApi
+args: -n ExecuteAsynch T1
 
 #max-time: 500
 #cmd: testInterpreter

--- 1.19/storage/ndb/test/ndbapi/testBasic.cpp	2007-04-12 16:05:38 +02:00
+++ 1.20/storage/ndb/test/ndbapi/testBasic.cpp	2007-04-25 21:30:34 +02:00
@@ -1318,6 +1318,73 @@
   return NDBT_OK;
 }
 
+runBug28073(NDBT_Context *ctx, NDBT_Step* step)
+{
+  int result = NDBT_OK;
+  const NdbDictionary::Table *table= ctx->getTab();
+  HugoOperations hugoOp1(*table);
+  HugoOperations hugoOp2(*table);
+  Ndb* pNdb = GETNDB(step);
+  int loops = ctx->getNumLoops();
+  bool inserted= false;
+
+  while (loops--)
+  {
+    if (!inserted)
+    {
+      CHECK(hugoOp1.startTransaction(pNdb) == 0);
+      CHECK(hugoOp1.pkInsertRecord(pNdb, 1, 1) == 0);
+      CHECK(hugoOp1.execute_Commit(pNdb) == 0);
+      CHECK(hugoOp1.closeTransaction(pNdb) == 0);
+      inserted= 1;
+    }
+
+    // Use TC hint to hit the same node in both transactions.
+    Uint32 key_val= 0;
+    const char *key= (const char *)(&key_val);
+    CHECK(hugoOp1.startTransaction(pNdb, table, key, 4) == 0);
+    CHECK(hugoOp2.startTransaction(pNdb, table, key, 4) == 0);
+
+    // First take 2*read lock on the tuple in transaction 1.
+    for (Uint32 i= 0; i < 2; i++)
+    {
+      CHECK(hugoOp1.pkReadRecord(pNdb, 1, 1, NdbOperation::LM_Read) == 0);
+      CHECK(hugoOp1.pkReadRecord(pNdb, 1, 1, NdbOperation::LM_Read) == 0);
+    }
+    CHECK(hugoOp1.execute_NoCommit(pNdb) == 0);
+
+    // Now send ops in two transactions, one batch.
+    // First 2*read in transaction 2.
+    for (Uint32 i= 0; i < 2; i++)
+    {
+      CHECK(hugoOp2.pkReadRecord(pNdb, 1, 1, NdbOperation::LM_Read) == 0);
+      CHECK(hugoOp2.pkReadRecord(pNdb, 1, 1, NdbOperation::LM_Read) == 0);
+    }
+    CHECK(hugoOp2.execute_async_prepare(pNdb, NdbTransaction::NoCommit) == 0);
+
+    // Second op an update in transaction 1.
+    CHECK(hugoOp1.pkUpdateRecord(pNdb, 1, 1) == 0);
+    CHECK(hugoOp1.execute_async_prepare(pNdb, NdbTransaction::Commit) == 0);
+
+    // Transaction 1 will now hang waiting on transaction 2 to commit before it
+    // can upgrade its read lock to a write lock.
+    // With the bug, we get a node failure due to watchdog timeout here.
+    CHECK(hugoOp2.wait_async(pNdb) == 0);
+
+    // Now commit transaction 2, we should see transaction 1 finish with the
+    // update.
+    CHECK(hugoOp2.execute_async_prepare(pNdb, NdbTransaction::Commit) == 0);
+    CHECK(hugoOp2.wait_async(pNdb) == 0);
+    // No error check, as transaction 1 may have terminated already.
+    hugoOp1.wait_async(pNdb);
+
+    CHECK(hugoOp1.closeTransaction(pNdb) == 0);
+    CHECK(hugoOp2.closeTransaction(pNdb) == 0);
+  }
+
+  return result;
+}
+
 int
 runBug27756(NDBT_Context* ctx, NDBT_Step* step)
 {
@@ -1651,6 +1718,10 @@
   INITIALIZER(runLoadTable);
   INITIALIZER(runDeleteRead);
   FINALIZER(runClearTable2);
+}
+TESTCASE("Bug28073", 
+	 "Infinite loop in lock queue" ){
+  STEP(runBug28073);
 }
 TESTCASE("Bug27756", 
 	 "Verify what happens when we fill the db" ){

--- 1.17/storage/ndb/test/tools/Makefile.am	2007-04-23 20:39:33 +02:00
+++ 1.18/storage/ndb/test/tools/Makefile.am	2007-04-25 21:30:34 +02:00
@@ -13,7 +13,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-ndbtest_PROGRAMS = hugoLoad hugoFill hugoLockRecords hugoPkDelete hugoPkRead hugoPkReadRecord  hugoPkUpdate hugoScanRead hugoScanUpdate restart verify_index copy_tab create_index  ndb_cpcc listen_event eventlog rep_latency
+ndbtest_PROGRAMS = hugoLoad hugoFill hugoLockRecords hugoPkDelete hugoPkRead hugoPkReadRecord  hugoPkUpdate hugoScanRead hugoScanUpdate restart verify_index copy_tab create_index  ndb_cpcc listen_event rep_latency eventlog
 
 # transproxy 
 
Thread
bk commit into 5.1 tree (tomas:1.2501)tomas25 Apr