Skip to content

Commit d1ae317

Browse files
committed
wl#9819 Version 2. Patch #1: ndbinfo processes table definition
1 parent 16e1cc0 commit d1ae317

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

scripts/mysql_system_tables.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,7 +3123,7 @@ PREPARE stmt FROM @str;
31233123
EXECUTE stmt;
31243124
DROP PREPARE stmt;
31253125

3126-
SET @str=IF(@have_ndbinfo,'CREATE TABLE `ndbinfo`.`ndb$processes` (`reporting_node_id` INT UNSIGNED COMMENT "Reporting data node ID",`node_id` INT UNSIGNED COMMENT "Connected node ID",`node_type` INT UNSIGNED COMMENT "Type of node",`host_addr` VARCHAR(512) COMMENT "IPv4 address of connected node",`node_version` VARCHAR(512) COMMENT "Node MySQL Cluster version string",`process_id` INT UNSIGNED COMMENT "PID of node process on host",`angel_process_id` INT UNSIGNED COMMENT "PID of node\'s angel process, if any",`process_name` VARCHAR(512) COMMENT "Node\'s executable process name",`connection_name` VARCHAR(512) COMMENT "Connection name of API node",`application_port` INT UNSIGNED COMMENT "Node\'s declared application port number") COMMENT="Process ID and Name information for connected nodes" ENGINE=NDBINFO','SET @dummy = 0');
3126+
SET @str=IF(@have_ndbinfo,'CREATE TABLE `ndbinfo`.`ndb$processes` (`reporting_node_id` INT UNSIGNED COMMENT "Reporting data node ID",`node_id` INT UNSIGNED COMMENT "Connected node ID",`node_type` INT UNSIGNED COMMENT "Type of node",`node_version` VARCHAR(512) COMMENT "Node MySQL Cluster version string",`process_id` INT UNSIGNED COMMENT "PID of node process on host",`angel_process_id` INT UNSIGNED COMMENT "PID of node\'s angel process",`process_name` VARCHAR(512) COMMENT "Node\'s executable process name",`service_URI` VARCHAR(512) COMMENT "URI for service provided by node") COMMENT="Process ID and Name information for connected nodes" ENGINE=NDBINFO','SET @dummy = 0');
31273127
PREPARE stmt FROM @str;
31283128
EXECUTE stmt;
31293129
DROP PREPARE stmt;
@@ -3541,7 +3541,7 @@ EXECUTE stmt;
35413541
DROP PREPARE stmt;
35423542

35433543
# ndbinfo.processes
3544-
SET @str=IF(@have_ndbinfo,'CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `ndbinfo`.`processes` AS SELECT DISTINCT node_id, CASE node_type WHEN 0 THEN "NDB" WHEN 1 THEN "API" WHEN 2 THEN "MGM" ELSE NULL END AS node_type, host_addr, node_version, NULLIF(process_id, 0) AS process_id, NULLIF(angel_process_id, 0) AS angel_process_id, process_name, connection_name, NULLIF(application_port, 0) AS application_port FROM `ndbinfo`.`ndb$processes`','SET @dummy = 0');
3544+
SET @str=IF(@have_ndbinfo,'CREATE OR REPLACE DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `ndbinfo`.`processes` AS SELECT DISTINCT node_id, CASE node_type WHEN 0 THEN "NDB" WHEN 1 THEN "API" WHEN 2 THEN "MGM" ELSE NULL END AS node_type, node_version, NULLIF(process_id, 0) AS process_id, NULLIF(angel_process_id, 0) AS angel_process_id, process_name, service_URI FROM `ndbinfo`.`ndb$processes` ORDER BY node_id','SET @dummy = 0');
35453545
PREPARE stmt FROM @str;
35463546
EXECUTE stmt;
35473547
DROP PREPARE stmt;

storage/ndb/src/kernel/vm/NdbinfoTables.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -872,19 +872,17 @@ DECLARE_NDBINFO_TABLE(STORED_TABLES, 20) =
872872
}
873873
};
874874

875-
DECLARE_NDBINFO_TABLE(PROCESSES, 10) =
876-
{ { "processes", 10, 0, "Process ID and Name information for connected nodes" },
875+
DECLARE_NDBINFO_TABLE(PROCESSES, 8) =
876+
{ { "processes", 8, 0, "Process ID and Name information for connected nodes" },
877877
{
878878
{ "reporting_node_id", Ndbinfo::Number, "Reporting data node ID"},
879879
{ "node_id", Ndbinfo::Number, "Connected node ID"},
880880
{ "node_type", Ndbinfo::Number, "Type of node"},
881-
{ "host_addr", Ndbinfo::String, "IPv4 address of connected node"},
882881
{ "node_version", Ndbinfo::String, "Node MySQL Cluster version string"},
883882
{ "process_id", Ndbinfo::Number, "PID of node process on host"},
884-
{ "angel_process_id", Ndbinfo::Number, "PID of node\\\'s angel process, if any"},
883+
{ "angel_process_id", Ndbinfo::Number, "PID of node\\\'s angel process"},
885884
{ "process_name", Ndbinfo::String, "Node\\\'s executable process name"},
886-
{ "connection_name", Ndbinfo::String, "Connection name of API node"},
887-
{ "application_port", Ndbinfo::Number, "Node\\\'s declared application port number"}
885+
{ "service_URI", Ndbinfo::String, "URI for service provided by node"}
888886
}
889887
};
890888

storage/ndb/tools/ndbinfo_sql.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,12 @@ struct view {
450450
" WHEN 2 THEN \"MGM\""
451451
" ELSE NULL "
452452
" END AS node_type, "
453-
" host_addr, node_version, "
453+
" node_version, "
454454
" NULLIF(process_id, 0) AS process_id, "
455455
" NULLIF(angel_process_id, 0) AS angel_process_id, "
456-
" process_name, connection_name, "
457-
" NULLIF(application_port, 0) AS application_port "
458-
"FROM `<NDBINFO_DB>`.`<TABLE_PREFIX>processes`"
456+
" process_name, service_URI "
457+
"FROM `<NDBINFO_DB>`.`<TABLE_PREFIX>processes` "
458+
"ORDER BY node_id"
459459
},
460460
{ "resources",
461461
"SELECT node_id, "

0 commit comments

Comments
 (0)