List:Commits« Previous MessageNext Message »
From:jonas Date:May 8 2007 1:15pm
Subject:bk commit into 5.1 tree (jonas:1.2518)
View as plain text  
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@stripped, 2007-05-08 15:15:49+02:00, jonas@stripped +3 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
  into  perch.ndb.mysql.com:/home/jonas/src/51-telco
  MERGE: 1.2403.27.47

  storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp@stripped, 2007-05-08 15:14:49+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.50.2.7

  storage/ndb/test/ndbapi/testBasic.cpp@stripped, 2007-05-08 15:15:47+02:00, jonas@stripped +4 -4
    merge
    MERGE: 1.17.2.3

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-05-08 15:14:49+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.61.4.3

# 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-telco/RESYNC

--- 1.100/storage/ndb/test/run-test/daily-basic-tests.txt	2007-05-08 15:15:56 +02:00
+++ 1.101/storage/ndb/test/run-test/daily-basic-tests.txt	2007-05-08 15:15:56 +02:00
@@ -248,6 +248,10 @@
 args: -n Bug28073
 
 max-time: 500
+cmd: testBasic
+args: -n Bug20535
+
+max-time: 500
 cmd: testIndex
 args: -n Bug25059 -r 3000 T1
 

--- 1.84/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2007-05-08 15:15:56 +02:00
+++ 1.85/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2007-05-08 15:15:56 +02:00
@@ -1272,9 +1272,19 @@
     if(!prevOp->is_first_operation())
       org= (Tuple_header*)c_undo_buffer.get_ptr(&prevOp->m_copy_tuple_location);
     if (regTabPtr->need_expand())
+    {
       expand_tuple(req_struct, sizes, org, regTabPtr, !disk_insert);
+      memset(req_struct->m_disk_ptr->m_null_bits+
+             regTabPtr->m_offsets[DD].m_null_offset, 0xFF, 
+             4*regTabPtr->m_offsets[DD].m_null_words);
+    } 
     else
+    {
       memcpy(dst, org, 4*regTabPtr->m_offsets[MM].m_fix_header_size);
+    }
+    memset(tuple_ptr->m_null_bits+
+           regTabPtr->m_offsets[MM].m_null_offset, 0xFF, 
+           4*regTabPtr->m_offsets[MM].m_null_words);
   }
   
   if (disk_insert)

--- 1.25/storage/ndb/test/ndbapi/testBasic.cpp	2007-05-08 15:15:56 +02:00
+++ 1.26/storage/ndb/test/ndbapi/testBasic.cpp	2007-05-08 15:15:56 +02:00
@@ -1458,6 +1458,91 @@
 
 template class Vector<Uint64>;
 
+int
+runBug20535(NDBT_Context* ctx, NDBT_Step* step)
+{
+  Uint32 i;
+  Ndb* pNdb = GETNDB(step);
+  const NdbDictionary::Table * tab = ctx->getTab();
+  NdbDictionary::Dictionary * dict = pNdb->getDictionary();
+
+  bool null = false;
+  for (i = 0; i<tab->getNoOfColumns(); i++)
+  {
+    if (tab->getColumn(i)->getNullable())
+    {
+      null = true;
+      break;
+    }
+  }
+  
+  if (!null)
+    return NDBT_OK;
+
+  HugoTransactions hugoTrans(* tab);
+  hugoTrans.loadTable(pNdb, 1);
+
+  NdbTransaction* pTrans = pNdb->startTransaction();
+  NdbOperation* pOp = pTrans->getNdbOperation(tab->getName());
+  pOp->deleteTuple();
+  hugoTrans.equalForRow(pOp, 0);
+  if (pTrans->execute(NoCommit) != 0)
+    return NDBT_FAILED;
+
+  pOp = pTrans->getNdbOperation(tab->getName());
+  pOp->insertTuple();
+  hugoTrans.equalForRow(pOp, 0);
+  for (i = 0; i<tab->getNoOfColumns(); i++)
+  {
+    if (!tab->getColumn(i)->getPrimaryKey() &&
+        !tab->getColumn(i)->getNullable())
+    {
+      hugoTrans.setValueForAttr(pOp, i, 0, 1);
+    }
+  }
+  
+  if (pTrans->execute(Commit) != 0)
+    return NDBT_FAILED;
+  
+  pTrans->close();
+
+  pTrans = pNdb->startTransaction();
+  pOp = pTrans->getNdbOperation(tab->getName());
+  pOp->readTuple();
+  hugoTrans.equalForRow(pOp, 0);
+  Vector<NdbRecAttr*> values;
+  for (i = 0; i<tab->getNoOfColumns(); i++)
+  {
+    if (!tab->getColumn(i)->getPrimaryKey() &&
+        tab->getColumn(i)->getNullable())
+    {
+      values.push_back(pOp->getValue(i));
+    }
+  }
+  
+  if (pTrans->execute(Commit) != 0)
+    return NDBT_FAILED;
+
+  null = true;
+  for (i = 0; i<values.size(); i++)
+  {
+    if (!values[i]->isNULL())
+    {
+      null = false;
+      ndbout_c("column %s is not NULL", values[i]->getColumn()->getName());
+    }
+  }
+  
+  pTrans->close();  
+  
+  if (null)
+    return NDBT_OK;
+  else
+    return NDBT_FAILED;
+}
+
+template class Vector<NdbRecAttr*>;
+
 NDBT_TESTSUITE(testBasic);
 TESTCASE("PkInsert", 
 	 "Verify that we can insert and delete from this table using PK"
@@ -1741,6 +1826,10 @@
 TESTCASE("Bug28073", 
 	 "Infinite loop in lock queue" ){
   STEP(runBug28073);
+}
+TESTCASE("Bug20535", 
+	 "Verify what happens when we fill the db" ){
+  STEP(runBug20535);
 }
 NDBT_TESTSUITE_END(testBasic);
 
Thread
bk commit into 5.1 tree (jonas:1.2518)jonas8 May