List:Commits« Previous MessageNext Message »
From:pekka Date:January 31 2006 7:13am
Subject:bk commit into 4.1 tree (pekka:1.2468)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of pekka. When pekka 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.2468 06/01/31 08:13:42 pekka@stripped +1 -0
  ndb - testBlobs 'perf test' fix

  ndb/test/ndbapi/testBlobs.cpp
    1.23 06/01/31 08:12:02 pekka@stripped +12 -6
    setValue buffer was not fullsize

# 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:	pekka
# Host:	orca.ndb.mysql.com
# Root:	/space/pekka/ndb/version/my41

--- 1.22/ndb/test/ndbapi/testBlobs.cpp	2005-06-13 16:18:34 +02:00
+++ 1.23/ndb/test/ndbapi/testBlobs.cpp	2006-01-31 08:12:02 +01:00
@@ -1488,13 +1488,16 @@
   // insert char (one trans)
   {
     DBG("--- insert char ---");
+    char b[20];
     t1.on();
     CHK((g_con = g_ndb->startTransaction()) != 0);
     for (Uint32 k = 0; k < g_opt.m_rowsperf; k++) {
       CHK((g_opr = g_con->getNdbOperation(tab.getName())) != 0);
       CHK(g_opr->insertTuple() == 0);
       CHK(g_opr->equal(cA, (char*)&k) == 0);
-      CHK(g_opr->setValue(cB, "b") == 0);
+      memset(b, 0x20, sizeof(b));
+      b[0] = 'b';
+      CHK(g_opr->setValue(cB, b) == 0);
       CHK(g_con->execute(NoCommit) == 0);
     }
     t1.off(g_opt.m_rowsperf);
@@ -1531,12 +1534,15 @@
   {
     DBG("--- insert for read test ---");
     unsigned n = 0;
+    char b[20];
     CHK((g_con = g_ndb->startTransaction()) != 0);
     for (Uint32 k = 0; k < g_opt.m_rowsperf; k++) {
       CHK((g_opr = g_con->getNdbOperation(tab.getName())) != 0);
       CHK(g_opr->insertTuple() == 0);
       CHK(g_opr->equal(cA, (char*)&k) == 0);
-      CHK(g_opr->setValue(cB, "b") == 0);
+      memset(b, 0x20, sizeof(b));
+      b[0] = 'b';
+      CHK(g_opr->setValue(cB, b) == 0);
       CHK((g_bh1 = g_opr->getBlobHandle(cC)) != 0);
       CHK((g_bh1->setValue("c", 1) == 0));
       if (++n == g_opt.m_batch) {
@@ -1570,7 +1576,7 @@
       a = (Uint32)-1;
       b[0] = 0;
       CHK(g_con->execute(NoCommit) == 0);
-      CHK(a == k && strcmp(b, "b") == 0);
+      CHK(a == k && b[0] == 'b');
     }
     CHK(g_con->execute(Commit) == 0);
     t1.off(g_opt.m_rowsperf);
@@ -1596,7 +1602,7 @@
       CHK(g_con->execute(NoCommit) == 0);
       Uint32 m = 20;
       CHK(g_bh1->readData(c, m) == 0);
-      CHK(a == k && m == 1 && strcmp(c, "c") == 0);
+      CHK(a == k && m == 1 && c[0] == 'c');
     }
     CHK(g_con->execute(Commit) == 0);
     t2.off(g_opt.m_rowsperf);
@@ -1629,7 +1635,7 @@
       CHK((ret = rs->nextResult(true)) == 0 || ret == 1);
       if (ret == 1)
         break;
-      CHK(a < g_opt.m_rowsperf && strcmp(b, "b") == 0);
+      CHK(a < g_opt.m_rowsperf && b[0] == 'b');
       n++;
     }
     CHK(n == g_opt.m_rowsperf);
@@ -1661,7 +1667,7 @@
         break;
       Uint32 m = 20;
       CHK(g_bh1->readData(c, m) == 0);
-      CHK(a < g_opt.m_rowsperf && m == 1 && strcmp(c, "c") == 0);
+      CHK(a < g_opt.m_rowsperf && m == 1 && c[0] == 'c');
       n++;
     }
     CHK(n == g_opt.m_rowsperf);
Thread
bk commit into 4.1 tree (pekka:1.2468)pekka31 Jan