List:Commits« Previous MessageNext Message »
From:jonas oreland Date:November 22 2011 10:17am
Subject:bzr push into mysql-5.1-telco-7.1 branch (jonas.oreland:4341 to 4342)
View as plain text  
 4342 jonas oreland	2011-11-22 [merge]
      ndb - merge 70 to 71

    modified:
      sql/ha_ndb_index_stat.cc
      sql/ha_ndb_index_stat.h
      sql/ha_ndbcluster.cc
      storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
      storage/ndb/src/kernel/blocks/trpman.cpp
 4341 Martin Skold	2011-11-21 [merge]
      Merge from 70

    modified:
      mysql-test/suite/ndb/r/ndb_condition_pushdown.result
      mysql-test/suite/ndb/t/ndb_condition_pushdown.test
      sql/ha_ndbcluster_cond.cc
=== modified file 'sql/ha_ndb_index_stat.cc'
--- a/sql/ha_ndb_index_stat.cc	2011-11-20 15:07:32 +0000
+++ b/sql/ha_ndb_index_stat.cc	2011-11-22 08:56:11 +0000
@@ -2131,6 +2131,16 @@ ndb_index_stat_stop_listener(Ndb_index_s
   DBUG_RETURN(0);
 }
 
+bool
+Ndb_index_stat_thread::is_setup_complete()
+{
+  if (ndb_index_stat_get_enable(NULL))
+  {
+    return ndb_index_stat_allow();
+  }
+  return true;
+}
+
 void
 Ndb_index_stat_thread::do_run()
 {

=== modified file 'sql/ha_ndb_index_stat.h'
--- a/sql/ha_ndb_index_stat.h	2011-11-20 15:00:14 +0000
+++ b/sql/ha_ndb_index_stat.h	2011-11-22 08:56:11 +0000
@@ -47,6 +47,8 @@ public:
   pthread_mutex_t stat_mutex;
   pthread_cond_t stat_cond;
 
+  /* are we setup */
+  bool is_setup_complete();
 private:
   virtual int do_init() { return 0;}
   virtual void do_run();

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-11-21 12:24:47 +0000
+++ b/sql/ha_ndbcluster.cc	2011-11-22 10:16:37 +0000
@@ -12260,6 +12260,12 @@ static int connect_callback()
   return 0;
 }
 
+/**
+ * Components
+ */
+Ndb_util_thread ndb_util_thread;
+Ndb_index_stat_thread ndb_index_stat_thread;
+
 #ifndef NDB_NO_WAIT_SETUP
 static int ndb_wait_setup_func_impl(ulong max_wait)
 {
@@ -12269,10 +12275,11 @@ static int ndb_wait_setup_func_impl(ulon
 
   struct timespec abstime;
   set_timespec(abstime, 1);
-  
-  while (!ndb_setup_complete && max_wait)
+
+  while (max_wait &&
+         (!ndb_setup_complete || !ndb_index_stat_thread.is_setup_complete()))
   {
-    int rc= pthread_cond_timedwait(&COND_ndb_setup_complete, 
+    int rc= pthread_cond_timedwait(&COND_ndb_setup_complete,
                                    &ndbcluster_mutex,
                                    &abstime);
     if (rc)
@@ -12302,12 +12309,6 @@ int(*ndb_wait_setup_func)(ulong) = 0;
 #endif
 extern int ndb_dictionary_is_mysqld;
 
-/**
- * Components
- */
-Ndb_util_thread ndb_util_thread;
-Ndb_index_stat_thread ndb_index_stat_thread;
-
 static int ndbcluster_init(void *p)
 {
   DBUG_ENTER("ndbcluster_init");

=== modified file 'storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp'
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2011-11-17 20:13:36 +0000
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2011-11-22 10:16:37 +0000
@@ -1039,10 +1039,6 @@ void Cmvmi::execCONNECT_REP(Signal *sign
   jamEntry();
   
   const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type;
-  ndbrequire(type != NodeInfo::INVALID);
-  globalData.m_nodeInfo[hostId].m_version = 0;
-  globalData.m_nodeInfo[hostId].m_mysql_version = 0;
-  
   /**
    * Inform QMGR that client has connected
    */

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2011-11-19 16:00:15 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2011-11-22 10:16:37 +0000
@@ -8101,7 +8101,7 @@ Dbdict::alterTable_parse(Signal* signal,
      * Mark SchemaObject as in-use so that it's won't be found by other op
      *   choose a state that will be automatically cleaned incase we crash
      */
-    SchemaFile::TableEntry * objEntry =
+    SchemaFile::TableEntry *
       objEntry = getTableEntry(alterTabPtr.p->m_newTable_realObjectId);
     objEntry->m_tableType = DictTabInfo::SchemaTransaction;
     objEntry->m_tableState = SchemaFile::SF_STARTED;
@@ -9568,7 +9568,7 @@ Dbdict::alterTable_fromCommitComplete(Si
 
   {
     // Remark object as free
-    SchemaFile::TableEntry * objEntry =
+    SchemaFile::TableEntry *
       objEntry = getTableEntry(alterTabPtr.p->m_newTable_realObjectId);
     objEntry->m_tableType = DictTabInfo::UndefTableType;
     objEntry->m_tableState = SchemaFile::SF_UNUSED;
@@ -9660,7 +9660,7 @@ Dbdict::alterTable_abortParse(Signal* si
 
     {
       // Remark object as free
-      SchemaFile::TableEntry * objEntry =
+      SchemaFile::TableEntry *
         objEntry = getTableEntry(alterTabPtr.p->m_newTable_realObjectId);
       objEntry->m_tableType = DictTabInfo::UndefTableType;
       objEntry->m_tableState = SchemaFile::SF_UNUSED;

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2011-11-17 20:13:36 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2011-11-22 10:16:37 +0000
@@ -480,6 +480,13 @@ void Qmgr::execCONNECT_REP(Signal* signa
     return;
   }
 
+  if (c_connectedNodes.get(connectedNodeId) == false)
+  {
+    jam();
+    setNodeInfo(connectedNodeId).m_version = 0;
+    setNodeInfo(connectedNodeId).m_mysql_version = 0;
+  }
+
   c_connectedNodes.set(connectedNodeId);
 
   {
@@ -769,7 +776,6 @@ void Qmgr::execCM_REGREQ(Signal* signal)
                         cmRegReq->nodeId,
                         (unsigned)isNdbMt());
 
-    ndbrequire(isNdbMt());
     return;
   }
 
@@ -3522,7 +3528,17 @@ void Qmgr::execAPI_REGREQ(Signal* signal
      */
     return;
   }
-  
+
+  if (!c_connectedNodes.get(apiNodePtr.i))
+  {
+    jam();
+    /**
+     * We have not yet heard execCONNECT_REP
+     *   so ignore this until we do...
+     */
+    return;
+  }
+
 #if 0
   ndbout_c("Qmgr::execAPI_REGREQ: Recd API_REGREQ (NodeId=%d)", apiNodePtr.i);
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/trpman.cpp'
--- a/storage/ndb/src/kernel/blocks/trpman.cpp	2011-11-16 15:38:25 +0000
+++ b/storage/ndb/src/kernel/blocks/trpman.cpp	2011-11-22 07:39:16 +0000
@@ -123,8 +123,6 @@ Trpman::execCONNECT_REP(Signal *signal)
 
   const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type;
   ndbrequire(type != NodeInfo::INVALID);
-  globalData.m_nodeInfo[hostId].m_version = 0;
-  globalData.m_nodeInfo[hostId].m_mysql_version = 0;
 
   /**
    * Inform QMGR that client has connected

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (jonas.oreland:4341 to 4342) jonas oreland22 Nov