List:Commits« Previous MessageNext Message »
From:Martin Zaun Date:February 21 2011 5:43pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (martin.zaun:4097 to 4098)
View as plain text  
 4098 Martin Zaun	2011-02-21 [merge]
      merge from ndb-7.0 to ndb-7.1

    modified:
      storage/ndb/include/util/NdbTypesUtil.hpp
      storage/ndb/test/ndbapi/testDict.cpp
      storage/ndb/test/ndbapi/testNdbApi.cpp
      storage/ndb/test/ndbapi/testNodeRestart.cpp
      storage/ndb/test/ndbapi/test_event.cpp
 4097 Bernhard Ocklin	2011-02-21 [merge]
      merge jni adoption & clusterj-jdbc

    added:
      storage/ndb/clusterj/clusterj-jdbc/
      storage/ndb/clusterj/clusterj-jdbc/CMakeLists.txt
      storage/ndb/clusterj/clusterj-jdbc/Makefile.am
      storage/ndb/clusterj/clusterj-jdbc/logging.properties
      storage/ndb/clusterj/clusterj-jdbc/pom.xml
      storage/ndb/clusterj/clusterj-jdbc/src/
      storage/ndb/clusterj/clusterj-jdbc/src/main/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/mysql/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/mysql/clusterj/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/mysql/clusterj/jdbc/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/mysql/clusterj/jdbc/antlr/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/mysql/clusterj/jdbc/antlr/MySQL51Lexer.g
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/com/mysql/clusterj/jdbc/antlr/MySQL51Parser.g
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/imports/
      storage/ndb/clusterj/clusterj-jdbc/src/main/antlr3/imports/MySQL51Functions.g
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/AbstractResultSetInternalMethods.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/ConnectionLifecycleInterceptor.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/DomainFieldHandlerImpl.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/DomainTypeHandlerImpl.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/InterceptorImpl.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/ResultSetInternalMethodsImpl.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/ResultSetInternalMethodsUpdateCount.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/SQLExecutor.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/StatementInterceptor.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/ValueHandlerImpl.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/ANTLRNoCaseFileStream.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/ANTLRNoCaseStringStream.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/BaseErrorListener.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/ErrorListener.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/MySQLLexer.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/MySQLParser.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/QueuingErrorListener.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/RecognizerErrorDelegate.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/AndNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/BinaryOperatorNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/BooleanOperatorNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/CommandNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/DeleteNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/EqualsNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/GreaterEqualsNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/GreaterThanNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/InsertNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/LessEqualsNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/LessThanNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/Node.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/NotNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/OrNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/ParensNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/PlaceholderNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/PredicateNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/SelectNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/java/com/mysql/clusterj/jdbc/antlr/node/WhereNode.java
      storage/ndb/clusterj/clusterj-jdbc/src/main/resources/
      storage/ndb/clusterj/clusterj-jdbc/src/main/resources/com/
      storage/ndb/clusterj/clusterj-jdbc/src/main/resources/com/mysql/
      storage/ndb/clusterj/clusterj-jdbc/src/main/resources/com/mysql/clusterj/
      storage/ndb/clusterj/clusterj-jdbc/src/main/resources/com/mysql/clusterj/jdbc/
      storage/ndb/clusterj/clusterj-jdbc/src/main/resources/com/mysql/clusterj/jdbc/Bundle.properties
      storage/ndb/clusterj/clusterj-jdbc/src/test/
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/BadConnectionLifecycleInterceptor.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/BigIntegerTypesTest.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/CoordinatedTransactionIdVariableTest.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/DecimalTypesTest.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/NegativeBadConnectionLifecycleInterceptorTest.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/NegativeMissingConnectionLifecycleInterceptorTest.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/NegativeMissingStatementInterceptorTest.java
      storage/ndb/clusterj/clusterj-jdbc/src/test/resources/
      storage/ndb/clusterj/clusterj-jdbc/src/test/resources/bad-connection-bad-connection-lifecycle-interceptor.properties
      storage/ndb/clusterj/clusterj-jdbc/src/test/resources/bad-connection-no-connection-lifecycle-interceptor.properties
      storage/ndb/clusterj/clusterj-jdbc/src/test/resources/bad-connection-no-statement-interceptor.properties
      storage/ndb/clusterj/clusterj-jdbc/src/test/resources/clusterj.properties
    modified:
      storage/ndb/clusterj/Makefile.am
      storage/ndb/ndb_configure.m4
=== modified file 'storage/ndb/include/util/NdbTypesUtil.hpp'
--- a/storage/ndb/include/util/NdbTypesUtil.hpp	2011-02-19 02:47:10 +0000
+++ b/storage/ndb/include/util/NdbTypesUtil.hpp	2011-02-21 17:39:23 +0000
@@ -435,13 +435,11 @@ NDB_SPECIALIZE_NUM_TYPE_HELPER(Huint64, 
 // specialize the Helper template members for non-standard numeric types
 #define NDB_SPECIALIZE_NON_STD_NUM_TYPE_HELPER( H, T, INT3KORR )        \
   template<> inline void H::load(T * t, const char * s) {               \
-    assert(t); assert(s);                                               \
-    assert(t > (const T *)s);                                           \
+    assert(t); assert(s); assert(t != (const T *)s);                    \
     *t = (INT3KORR(s));                                                 \
   }                                                                     \
   template<> inline void H::store(char * t, const T * s) {              \
-    assert(t); assert(s);                                               \
-    assert(((T *)t > s) || ((T *)t < s));                               \
+    assert(t); assert(s); assert((const T *)t != s);                    \
     int3store(t, (*s));                                                 \
   }
 

=== modified file 'storage/ndb/test/ndbapi/testDict.cpp'
--- a/storage/ndb/test/ndbapi/testDict.cpp	2011-01-30 20:56:00 +0000
+++ b/storage/ndb/test/ndbapi/testDict.cpp	2011-02-21 15:08:51 +0000
@@ -7186,7 +7186,8 @@ runFailAddPartition(NDBT_Context* ctx, N
 
   const NdbDictionary::Table * org = pDic->getTable(tab.getName());
   NdbDictionary::Table altered = * org;
-  altered.setFragmentCount(org->getFragmentCount() + 2);
+  altered.setFragmentCount(org->getFragmentCount() +
+                           restarter.getNumDbNodes());
 
   if (pDic->beginSchemaTrans())
   {

=== modified file 'storage/ndb/test/ndbapi/testNdbApi.cpp'
--- a/storage/ndb/test/ndbapi/testNdbApi.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/testNdbApi.cpp	2011-02-21 14:27:16 +0000
@@ -3605,14 +3605,16 @@ int runFragmentedScanOtherApi(NDBT_Conte
        * on timing
        */
       if ((execError != 0) &&
-          (execError != 874))
+          (execError != 874) && 
+          (execError != 4002))
       {
+        ndbout_c("%u incorrect error code: %u", __LINE__, execError);
         ERR(trans->getNdbError());
         trans->close();
         delete[] buff;
         return NDBT_FAILED;
       }
-      
+
       /* nextResult will always fail */  
       CHECK(-1 == scan->nextResult());
       
@@ -3632,6 +3634,7 @@ int runFragmentedScanOtherApi(NDBT_Conte
         }
         else
         {
+          ndbout_c("%u incorrect error code: %u", __LINE__, execError);
           ERR(scan->getNdbError());
           trans->close();
           delete[] buff;

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2011-02-21 13:17:16 +0000
@@ -4062,11 +4062,22 @@ runForceStopAndRestart(NDBT_Context* ctx
     }
   }
 
+  printf("group1: ");
+  for (size_t i = 0; i<group1.size(); i++)
+    printf("%d ", group1[i]);
+  printf("\n");
+
+  printf("group2: ");
+  for (size_t i = 0; i<group2.size(); i++)
+    printf("%d ", group2[i]);
+  printf("\n");
+
   // Stop half of the cluster
   res.restartNodes(group1.getBase(), (int)group1.size(),
-                   NdbRestarter::NRRF_NOSTART);
+                   NdbRestarter::NRRF_NOSTART | NdbRestarter::NRRF_ABORT);
   res.waitNodesNoStart(group1.getBase(), (int)group1.size());
 
+  ndbout_c("%u", __LINE__);
   // Try to stop first node in second half without force, should return error
   if (res.restartOneDbNode(group2[0],
                            false, /* initial */
@@ -4074,10 +4085,13 @@ runForceStopAndRestart(NDBT_Context* ctx
                            false, /* abort */
                            false  /* force */) != -1)
   {
+    ndbout_c("%u", __LINE__);
     g_err << "Restart suceeded without force" << endl;
     return NDBT_FAILED;
   }
 
+  ndbout_c("%u", __LINE__);
+
   // Now stop with force
   if (res.restartOneDbNode(group2[0],
                            false, /* initial */
@@ -4085,18 +4099,25 @@ runForceStopAndRestart(NDBT_Context* ctx
                            false, /* abort */
                            true   /* force */) != 0)
   {
+    ndbout_c("%u", __LINE__);
     g_err << "Could not restart with force" << endl;
     return NDBT_FAILED;
   }
 
+  ndbout_c("%u", __LINE__);
+
   // All nodes should now be in nostart, the above stop force
   // cvaused the remainig nodes to be stopped(and restarted nostart)
   res.waitClusterNoStart();
 
+  ndbout_c("%u", __LINE__);
+
   // Start second half back up again
   res.startNodes(group2.getBase(), (int)group2.size());
   res.waitNodesStarted(group2.getBase(), (int)group2.size());
 
+  ndbout_c("%u", __LINE__);
+
   // Try to stop remaining half without force, should return error
   if (res.restartNodes(group2.getBase(), (int)group2.size(),
                        NdbRestarter::NRRF_NOSTART) != -1)
@@ -4105,6 +4126,8 @@ runForceStopAndRestart(NDBT_Context* ctx
     return NDBT_FAILED;
   }
 
+  ndbout_c("%u", __LINE__);
+
   // Now stop with force
   if (res.restartNodes(group2.getBase(), (int)group2.size(),
                        NdbRestarter::NRRF_NOSTART |
@@ -4113,6 +4136,9 @@ runForceStopAndRestart(NDBT_Context* ctx
     g_err << "Could not restart with force" << endl;
     return NDBT_FAILED;
   }
+
+  ndbout_c("%u", __LINE__);
+
   if (res.waitNodesNoStart(group2.getBase(), (int)group2.size()))
   {
     g_err << "Failed to waitNodesNoStart" << endl;

=== modified file 'storage/ndb/test/ndbapi/test_event.cpp'
--- a/storage/ndb/test/ndbapi/test_event.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/ndbapi/test_event.cpp	2011-02-21 14:10:20 +0000
@@ -3351,14 +3351,15 @@ runBug57886_subscribe_unsunscribe(NDBT_C
 {
   Ndb* pNdb;
   Ndb_cluster_connection *pCC;
+
+  NdbDictionary::Table tab = * ctx->getTab();
+
   if (cc(&pCC, &pNdb))
   {
     // too few api slots...
     return NDBT_OK;
   }
 
-  NdbDictionary::Table tab = * ctx->getTab();
-
   while (!ctx->isTestStopped())
   {
     createEvent(pNdb, tab, false, false);


Attachment: [text/bzr-bundle] bzr/martin.zaun@oracle.com-20110221174135-d002uq1koja3tjqy.bundle
Thread
bzr push into mysql-5.1-telco-7.1 branch (martin.zaun:4097 to 4098) Martin Zaun21 Feb