Bug #20993 Print NodeID in MySQL node's logs
Submitted: 12 Jul 2006 10:30 Modified: 22 Oct 2009 14:03
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql-5.1 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[12 Jul 2006 10:30] Geert Vanderkelen
Description:
Currently the NodeID of the MySQL (API) node is available using the SHOW STATUS command. Though, it would be nice to have this referenced in the 'error log' as well.

The reasoning would that from the cluster there is no way to say whether the connecting API Node is a MySQL server or an NDB API application. To make debugging easier, it would be helpful to know what nodeid the mysqld had at a particular time.

How to repeat:
Check the Error logs: no mentioning of the nodeid.

Suggested fix:
Workaround would be to specify a NodeID for the MySQL nodes, and not for the NDB API applications. But that is not going to help much in some setups..

Patch against 5.1.2-drop5p14:

--- sql/ha_ndbcluster.cc        2006-07-12 11:47:17.000000000 +0200
+++ sql/ha_ndbcluster.cc.orig   2006-07-12 12:08:47.000000000 +0200
@@ -5425,9 +5425,6 @@
   }
   
   ndbcluster_inited= 1;
-  /* geert */ 
-  sql_print_information("NDB: NodeID is %d",
-                        g_ndb_cluster_connection->node_id());
   DBUG_RETURN(FALSE);
 
 ndbcluster_init_error:
[22 Oct 2009 14:03] Jonas Oreland
This has actually already been implmented.
Both that the node-ids are printed in mysqld error log
and that they are reported to cluster-log