List:Commits« Previous MessageNext Message »
From:Tomas Ulin Date:January 29 2009 4:59pm
Subject:bzr push into mysql-6.0-telco-6.4 branch (tomas.ulin:2822 to 2825)
View as plain text  
 2825 Tomas Ulin	2009-01-29 [merge]
      merge
removed:
  server-tools/
  server-tools/instance-manager/
modified:
  mysql-test/suite/ndb/r/ndb_basic.result

 2824 Tomas Ulin	2009-01-29 [merge]
      merge
modified:
  sql/ha_ndbcluster.cc
  storage/ndb/src/kernel/blocks/ERROR_codes.txt
  storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
  storage/ndb/src/ndbapi/TransporterFacade.hpp
  storage/ndb/test/ndbapi/testNodeRestart.cpp
  storage/ndb/test/run-test/daily-basic-tests.txt

 2823 Tomas Ulin	2009-01-29
      post merge fixes
modified:
  include/config-win.h
  mysql-test/suite/ndb/r/ndb_restore_undolog.result
  sql/mysqld.cc

 2822 Tomas Ulin	2009-01-29 [merge]
      merge
modified:
  configure.in

=== modified file 'include/config-win.h'
--- a/include/config-win.h	2009-01-28 09:55:02 +0000
+++ b/include/config-win.h	2009-01-29 15:53:38 +0000
@@ -470,6 +470,7 @@ inline ulonglong double2ulonglong(double
 #ifndef EMBEDDED_LIBRARY
 #define HAVE_LIBEVENT 1
 #define HAVE_POOL_OF_THREADS 1
+#endif
 
 /* Windows doesn't define ENOTSUP, define it as the same as Solaris */
 #ifndef ENOTSUP

=== modified file 'mysql-test/suite/ndb/r/ndb_basic.result'
--- a/mysql-test/suite/ndb/r/ndb_basic.result	2009-01-28 09:55:02 +0000
+++ b/mysql-test/suite/ndb/r/ndb_basic.result	2009-01-29 16:49:19 +0000
@@ -9,6 +9,7 @@ attr3 VARCHAR(10)
 drop table t1;
 SHOW GLOBAL STATUS LIKE 'ndb%';
 Variable_name	Value
+Ndb_cluster_connection_pool	#
 Ndb_cluster_node_id	#
 Ndb_config_from_host	#
 Ndb_config_from_port	#
@@ -16,7 +17,6 @@ Ndb_number_of_data_nodes	#
 Ndb_number_of_ready_data_nodes	#
 Ndb_connect_count	#
 Ndb_execute_count	#
-Ndb_cluster_connection_pool	#
 Ndb_conflict_fn_max	#
 Ndb_conflict_fn_old	#
 SHOW GLOBAL VARIABLES LIKE 'ndb%';

=== modified file 'mysql-test/suite/ndb/r/ndb_restore_undolog.result'
--- a/mysql-test/suite/ndb/r/ndb_restore_undolog.result	2008-12-15 12:34:21 +0000
+++ b/mysql-test/suite/ndb/r/ndb_restore_undolog.result	2009-01-29 15:53:38 +0000
@@ -114,8 +114,8 @@ t_pk	t_test	t_date	t_datetime	t_timestam
 2	1	1998-01-01	2006-08-10 10:11:12	2002-10-29 16:51:06	19:38:34	2155
 SELECT t_pk,t_test,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num ORDER by t_pk;
 t_pk	t_test	hex(t_bit)	t_tinyint	t_bool	t_smallint	t_mediumint	t_int	t_bigint	t_float	t_double	t_decimal
-1	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e+20	1e+150	331.0000000000000000
-2	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e+20	1e+150	331.0000000000000000
+1	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e20	1e150	331.0000000000000000
+2	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e20	1e150	331.0000000000000000
 SELECT t_pk,t_test,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1 ORDER by t_pk;
 t_pk	t_test	t_char	t_varchar	hex(t_binary)	hex(t_varbinary)
 1	1	abcdefghijklmn	abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn	612020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000	4100
@@ -276,8 +276,8 @@ t_pk	t_test	t_date	t_datetime	t_timestam
 2	1	1998-01-01	2006-08-10 10:11:12	2002-10-29 16:51:06	19:38:34	2155
 SELECT t_pk,t_test,hex(t_bit),t_tinyint,t_bool,t_smallint,t_mediumint,t_int,t_bigint,t_float,t_double,t_decimal FROM t_num ORDER by t_pk;
 t_pk	t_test	hex(t_bit)	t_tinyint	t_bool	t_smallint	t_mediumint	t_int	t_bigint	t_float	t_double	t_decimal
-1	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e+20	1e+150	331.0000000000000000
-2	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e+20	1e+150	331.0000000000000000
+1	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e20	1e150	331.0000000000000000
+2	1	AAAAAAAAAAAAAAAA	125	1	32765	8388606	2147483647	9223372036854775807	1e20	1e150	331.0000000000000000
 SELECT t_pk,t_test,t_char,t_varchar,hex(t_binary),hex(t_varbinary) FROM t_string_1 ORDER by t_pk;
 t_pk	t_test	t_char	t_varchar	hex(t_binary)	hex(t_varbinary)
 1	1	abcdefghijklmn	abcdefghijklmnabcdefghijklmnabcdefghijklmnabcdefghijklmn	612020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000	4100

=== removed directory 'server-tools'
=== removed directory 'server-tools/instance-manager'
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2009-01-29 13:53:01 +0000
+++ b/sql/ha_ndbcluster.cc	2009-01-29 16:49:19 +0000
@@ -225,7 +225,10 @@ static int update_status_variables(Thd_n
                             ns->connected_port);
   }
   ns->number_of_replicas= 0;
-  ns->number_of_ready_data_nodes= c->get_no_ready();
+  {
+    int n= c->get_no_ready();
+    ns->number_of_ready_data_nodes= n > 0 ?  n : 0;
+  }
   ns->number_of_data_nodes= c->no_db_nodes();
   ns->connect_count= c->get_connect_count();
   if (thd_ndb)

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-01-28 12:46:07 +0000
+++ b/sql/mysqld.cc	2009-01-29 15:53:38 +0000
@@ -1718,7 +1718,6 @@ static void network_init(void)
 #ifdef HAVE_SYS_UN_H
   struct sockaddr_un	UNIXaddr;
 #endif
-  int	arg;
   int   ret;
   uint  waited;
   uint  this_wait;

=== modified file 'storage/ndb/src/kernel/blocks/ERROR_codes.txt'
--- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2008-12-16 02:28:02 +0000
+++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt	2009-01-29 16:49:19 +0000
@@ -1,4 +1,4 @@
-Next QMGR 937
+Next QMGR 938
 Next NDBCNTR 1002
 Next NDBFS 2000
 Next DBACC 3002

=== modified file 'storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp'
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2008-12-01 18:04:19 +0000
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2009-01-29 16:49:19 +0000
@@ -1024,6 +1024,13 @@ void Qmgr::execCM_REGCONF(Signal* signal
   c_start.m_gsn = GSN_CM_NODEINFOREQ;
   c_start.m_nodes = c_clusterNodes;
 
+  if (ERROR_INSERTED(937))
+  {
+    CLEAR_ERROR_INSERT_VALUE;
+    signal->theData[0] = 9999;
+    sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 500, 1);
+  }
+
   return;
 }//Qmgr::execCM_REGCONF()
 
@@ -2946,7 +2953,13 @@ void Qmgr::node_failed(Signal* signal, U
     jam();
     return;
   case ZSTARTING:
-    c_start.reset();
+    /**
+     * bug#42422
+     *   Force "real" failure handling
+     */
+    failedNodePtr.p->phase = ZRUNNING;
+    failReportLab(signal, aFailedNode, FailRep::ZLINK_FAILURE);
+    return;
     // Fall-through
   default:
     jam();
@@ -3536,6 +3549,8 @@ void Qmgr::execPREP_FAILREQ(Signal* sign
 {
   NodeRecPtr myNodePtr;
   jamEntry();
+  
+  c_start.reset();
   
   if (check_multi_node_shutdown(signal))
   {

=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.hpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.hpp	2009-01-23 10:10:40 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.hpp	2009-01-29 16:49:19 +0000
@@ -389,8 +389,12 @@ TransporterFacade::getNodeGrp(NodeId n) 
 inline
 bool
 TransporterFacade::get_node_alive(NodeId n) const {
-  const ClusterMgr::Node & node = theClusterMgr->getNodeInfo(n);
-  return node.m_alive;
+  if (theClusterMgr)
+  {
+    const ClusterMgr::Node & node = theClusterMgr->getNodeInfo(n);
+    return node.m_alive;
+  }
+  return 0;
 }
 
 inline

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2008-12-15 19:41:01 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2009-01-29 16:49:19 +0000
@@ -309,7 +309,7 @@ int runRestarter(NDBT_Context* ctx, NDBT
     return NDBT_FAILED;
   }
   
-  loops *= restarter.getNumDbNodes();
+  loops *= (restarter.getNumDbNodes() > 4 ? 4 : restarter.getNumDbNodes());
   while(i<loops && result != NDBT_FAILED && !ctx->isTestStopped()){
 
     int id = lastId % restarter.getNumDbNodes();
@@ -2836,7 +2836,10 @@ runMNF(NDBT_Context* ctx, NDBT_Step* ste
     {
       for (int i = 0; i<cnt; i++)
       {
-        res.insertErrorInNode(nodes[i], 7180);
+        if (res.getNextMasterNodeId(master) == nodes[i])
+          res.insertErrorInNode(nodes[i], 7180);
+        else
+          res.insertErrorInNode(nodes[i], 7205);
       }
 
       int lcp = 7099;
@@ -3487,6 +3490,65 @@ runBug41469(NDBT_Context* ctx, NDBT_Step
   return NDBT_OK;
 }
 
+int
+runBug42422(NDBT_Context* ctx, NDBT_Step* step)
+{
+  NdbRestarter res;
+  
+  if (res.getNumDbNodes() < 4)
+  {
+    ctx->stopTest();
+    return NDBT_OK;
+  }
+  
+  int loops = ctx->getNumLoops();
+  while (--loops)
+  {
+    int master = res.getMasterNodeId();
+    ndbout_c("master: %u", master);
+    int nodeId = res.getRandomNodeSameNodeGroup(master, rand()); 
+    ndbout_c("target: %u", nodeId);
+    int node2 = res.getRandomNodeOtherNodeGroup(nodeId, rand());
+    ndbout_c("node 2: %u", node2);
+    
+    res.restartOneDbNode(nodeId,
+                         /** initial */ false, 
+                         /** nostart */ true,
+                         /** abort   */ true);
+    
+    res.waitNodesNoStart(&nodeId, 1);
+    
+    int dump[] = { 9000, 0 };
+    dump[1] = node2;
+    
+    if (res.dumpStateOneNode(nodeId, dump, 2))
+      return NDBT_FAILED;
+    
+    int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+    if (res.dumpStateOneNode(nodeId, val2, 2))
+      return NDBT_FAILED;
+    
+    res.insertErrorInNode(nodeId, 937);
+    ndbout_c("%u : starting %u", __LINE__, nodeId);
+    res.startNodes(&nodeId, 1);
+    NdbSleep_SecSleep(3);
+    ndbout_c("%u : waiting for %u to not get not-started", __LINE__, nodeId);
+    res.waitNodesNoStart(&nodeId, 1);
+    
+    ndbout_c("%u : starting %u", __LINE__, nodeId);
+    res.startNodes(&nodeId, 1);
+    
+    ndbout_c("%u : waiting for cluster started", __LINE__);
+    if (res.waitClusterStarted())
+    {
+      return NDBT_FAILED;
+    }
+  }
+
+  ctx->stopTest();
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
 	 "Test that one node at a time can be stopped and then restarted "\
@@ -3963,6 +4025,9 @@ TESTCASE("Bug41469", ""){
   STEP(runBug41469);
   STEP(runScanUpdateUntilStopped);
   FINALIZER(runClearTable);
+}
+TESTCASE("Bug42422", ""){
+  INITIALIZER(runBug42422);
 }
 NDBT_TESTSUITE_END(testNodeRestart);
 

=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt	2009-01-28 09:55:02 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt	2009-01-29 16:49:19 +0000
@@ -1198,6 +1198,10 @@ max-time: 1200
 cmd: testNodeRestart
 args: -n Bug41295 T1
 
+max-time: 1200
+cmd: testNodeRestart
+args: -n Bug42422 -l 1 T1
+
 max-time: 500
 cmd: testLimits
 args: -n DropSignalFragments T1

Thread
bzr push into mysql-6.0-telco-6.4 branch (tomas.ulin:2822 to 2825) Tomas Ulin29 Jan