List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:June 20 2011 7:18am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4456)
View as plain text  
#At file:///C:/mysql/7.0/ based on revid:magnus.blaudd@sun.com-20110613124350-gcrpaf2wfsqjdf4i

 4456 Magnus Blåudd	2011-06-20
      ndb
       - Prefix all values in OpTypes enum  with OP_ to avoid nameclash(with for example DELETE)

    modified:
      storage/ndb/test/ndbapi/testBasic.cpp
=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp	2011-05-25 13:19:02 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp	2011-06-20 07:17:57 +0000
@@ -3027,14 +3027,14 @@ static RefreshScenario refreshTests[] =
 
 enum OpTypes
 {
-  READ_C,
-  READ_S,
-  READ_E,
-  INSERT,
-  UPDATE,
-  WRITE,
-  DELETE,
-  LAST
+  OP_READ_C,
+  OP_READ_S,
+  OP_READ_E,
+  OP_INSERT,
+  OP_UPDATE,
+  OP_WRITE,
+  OP_DELETE,
+  OP_LAST
 };
 
 const char* opTypeNames[] =
@@ -3133,9 +3133,9 @@ runRefreshLocking(NDBT_Context* ctx, NDB
     {
       /* Now try ops from another transaction */
       HugoOperations hugoOps(*ctx->getTab());
-      Uint32 ot = READ_C;
+      Uint32 ot = OP_READ_C;
 
-      while (ot < LAST)
+      while (ot < OP_LAST)
       {
         if (hugoOps.startTransaction(ndb) != 0)
         {
@@ -3147,34 +3147,34 @@ runRefreshLocking(NDBT_Context* ctx, NDB
         int res = 0;
         switch (ot)
         {
-        case READ_C:
+        case OP_READ_C:
           res = hugoOps.pkReadRecord(ndb,0,1,NdbOperation::LM_CommittedRead);
           break;
-        case READ_S:
+        case OP_READ_S:
           res = hugoOps.pkReadRecord(ndb,0,1,NdbOperation::LM_Read);
           break;
-        case READ_E:
+        case OP_READ_E:
           res = hugoOps.pkReadRecord(ndb,0,1,NdbOperation::LM_Exclusive);
           break;
-        case INSERT:
+        case OP_INSERT:
           res = hugoOps.pkInsertRecord(ndb, 0);
           break;
-        case UPDATE:
+        case OP_UPDATE:
           res = hugoOps.pkUpdateRecord(ndb, 0);
           break;
-        case WRITE:
+        case OP_WRITE:
           res = hugoOps.pkWriteRecord(ndb, 0);
           break;
-        case DELETE:
+        case OP_DELETE:
           res = hugoOps.pkDeleteRecord(ndb, 0);
           break;
-        case LAST:
+        case OP_LAST:
           abort();
         }
 
         hugoOps.execute_Commit(ndb);
 
-        if ((ot == READ_C) && (scenario.preExist))
+        if ((ot == OP_READ_C) && (scenario.preExist))
         {
           if (hugoOps.getNdbError().code == 0)
           {

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20110620071757-evn2owrxdr3ioehv.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4456) Magnus Blåudd20 Jun