Skip to content

Commit cf183cb

Browse files
committed
wl#10147 ndbinfo.config_nodes: mtr test case
1 parent 02ae818 commit cf183cb

File tree

2 files changed

+87
-1
lines changed

2 files changed

+87
-1
lines changed

mysql-test/suite/ndb/r/ndbinfo.result

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ table_id table_name comment
8383
36 table_replicas_all Fragment replicas of the tables
8484
37 stored_tables Information about stored tables
8585
38 processes Process ID and Name information for connected nodes
86+
39 config_nodes All nodes of current cluster configuration
8687
SELECT COUNT(*) FROM ndb$tables;
8788
COUNT(*)
88-
39
89+
40
8990
SELECT * FROM ndb$tables WHERE table_id = 2;
9091
table_id table_name comment
9192
2 test for testing
@@ -124,6 +125,7 @@ table_id table_name comment
124125
36 table_replicas_all Fragment replicas of the tables
125126
37 stored_tables Information about stored tables
126127
38 processes Process ID and Name information for connected nodes
128+
39 config_nodes All nodes of current cluster configuration
127129
SELECT * FROM ndb$tables WHERE table_name = 'LOGDESTINATION';
128130
table_id table_name comment
129131
SELECT COUNT(*) FROM ndb$tables t, ndb$columns c
@@ -145,6 +147,7 @@ SELECT table_id, table_name FROM ndb$tables ORDER BY table_name;
145147
table_id table_name
146148
30 acc_operations
147149
1 columns
150+
39 config_nodes
148151
23 config_values
149152
8 counters
150153
28 cpustat
@@ -256,6 +259,7 @@ table_id
256259
36
257260
37
258261
38
262+
39
259263

260264
TRUNCATE ndb$tables;
261265
ERROR HY000: Table 'ndb$tables' is read only
@@ -1700,3 +1704,70 @@ node_id node_type process_name proc_id angel_proc_id process_name connection_nam
17001704
63 API mysqld not_null null mysqld mysqld --server-id=1 (connection 2) not_null
17011705
127 API mysqld not_null null mysqld mysqld --server-id=1 (connection 3) not_null
17021706

1707+
desc ndb$config_nodes;
1708+
Field Type Null Key Default Extra
1709+
reporting_node_id int(10) unsigned YES NULL
1710+
node_id int(10) unsigned YES NULL
1711+
node_type int(10) unsigned YES NULL
1712+
node_hostname varchar(512) YES NULL
1713+
show create table config_nodes;
1714+
View Create View character_set_client collation_connection
1715+
config_nodes CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `config_nodes` AS select distinct `ndb$config_nodes`.`node_id` AS `node_id`,(case `ndb$config_nodes`.`node_type` when 0 then 'NDB' when 1 then 'API' when 2 then 'MGM' else NULL end) AS `node_type`,`ndb$config_nodes`.`node_hostname` AS `node_hostname` from `ndb$config_nodes` order by `ndb$config_nodes`.`node_id` latin1 latin1_swedish_ci
1716+
1717+
SELECT * from ndb$config_nodes;
1718+
reporting_node_id node_id node_type node_hostname
1719+
1 3 2 localhost
1720+
1 49 1 localhost
1721+
1 16 1 localhost
1722+
1 32 1 localhost
1723+
1 48 1 localhost
1724+
1 63 1 localhost
1725+
1 127 1 localhost
1726+
1 192 1 localhost
1727+
1 228 1 localhost
1728+
1 229 1 localhost
1729+
1 230 1 localhost
1730+
1 231 1 localhost
1731+
1 232 1 localhost
1732+
1 233 1 localhost
1733+
1 255 1 localhost
1734+
1 1 0 localhost
1735+
1 2 0 localhost
1736+
2 3 2 localhost
1737+
2 49 1 localhost
1738+
2 16 1 localhost
1739+
2 32 1 localhost
1740+
2 48 1 localhost
1741+
2 63 1 localhost
1742+
2 127 1 localhost
1743+
2 192 1 localhost
1744+
2 228 1 localhost
1745+
2 229 1 localhost
1746+
2 230 1 localhost
1747+
2 231 1 localhost
1748+
2 232 1 localhost
1749+
2 233 1 localhost
1750+
2 255 1 localhost
1751+
2 1 0 localhost
1752+
2 2 0 localhost
1753+
1754+
SELECT * from config_nodes;
1755+
node_id node_type node_hostname
1756+
1 NDB localhost
1757+
2 NDB localhost
1758+
3 MGM localhost
1759+
16 API localhost
1760+
32 API localhost
1761+
48 API localhost
1762+
49 API localhost
1763+
63 API localhost
1764+
127 API localhost
1765+
192 API localhost
1766+
228 API localhost
1767+
229 API localhost
1768+
230 API localhost
1769+
231 API localhost
1770+
232 API localhost
1771+
233 API localhost
1772+
255 API localhost
1773+

mysql-test/suite/ndb/t/ndbinfo.test

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,3 +879,18 @@ if(application_port is null, "null", "not_null") as port
879879
FROM processes
880880
ORDER BY node_id;
881881

882+
#
883+
# wl#10147 ndbinfo.config_nodes
884+
#
885+
# (A) Normative tests of table and view definition
886+
desc ndb$config_nodes;
887+
show create table config_nodes;
888+
889+
# (B) Tests of table content.
890+
# These results will change if the cluster config used when running
891+
# this test case changes.
892+
SELECT * from ndb$config_nodes;
893+
894+
# (C) Tests of view: SELECT DISTINCT, removing reporting_node_id
895+
SELECT * from config_nodes;
896+

0 commit comments

Comments
 (0)