1
1
/*
2
- Copyright (c) 2003, 2016 , Oracle and/or its affiliates. All rights reserved.
2
+ Copyright (c) 2003, 2017 , Oracle and/or its affiliates. All rights reserved.
3
3
4
4
This program is free software; you can redistribute it and/or modify
5
5
it under the terms of the GNU General Public License as published by
@@ -7612,38 +7612,37 @@ Qmgr::execDBINFO_SCANREQ(Signal *signal)
7612
7612
ProcessInfo *processInfo = getProcessInfo (i);
7613
7613
if (processInfo && processInfo->isValid ())
7614
7614
{
7615
+ char uri_buffer[512 ];
7616
+ processInfo->getServiceUri (uri_buffer, sizeof (uri_buffer));
7615
7617
Ndbinfo::Row row (signal, req);
7616
7618
row.write_uint32 (getOwnNodeId ()); // reporting_node_id
7617
7619
row.write_uint32 (i); // node_id
7618
7620
row.write_uint32 (nodeInfo.getType ()); // node_type
7619
- row.write_string (processInfo->getHostAddress ()); // host_addr
7620
7621
row.write_string (version_buffer); // node_version
7621
7622
row.write_uint32 (processInfo->getPid ()); // process_id
7622
7623
row.write_uint32 (processInfo->getAngelPid ()); // angel_process_id
7623
7624
row.write_string (processInfo->getProcessName ()); // process_name
7624
- row.write_string (processInfo->getConnectionName ()); // conn_name
7625
- row.write_uint32 (processInfo->getPort ()); // application_port
7625
+ row.write_string (uri_buffer); // service_URI
7626
7626
ndbinfo_send_row (signal, req, row, rl);
7627
7627
}
7628
7628
else if (nodeInfo.m_type != NodeInfo::DB)
7629
7629
{
7630
- /* MGM/API node is < version 7.5.5 or has not sent ProcessInfoRep */
7630
+ /* MGM/API node is an older version or has not sent ProcessInfoRep */
7631
7631
7632
7632
struct in_addr addr= globalTransporterRegistry.get_connect_address (i);
7633
- char address_buffer[16 ];
7634
- Ndb_inet_ntop (AF_INET, & addr, address_buffer, 16 );
7633
+ char service_uri[32 ];
7634
+ strcpy (service_uri, " ndb://" );
7635
+ Ndb_inet_ntop (AF_INET, & addr, service_uri + 6 , 24 );
7635
7636
7636
7637
Ndbinfo::Row row (signal, req);
7637
7638
row.write_uint32 (getOwnNodeId ()); // reporting_node_id
7638
7639
row.write_uint32 (i); // node_id
7639
7640
row.write_uint32 (nodeInfo.getType ()); // node_type
7640
- row.write_string (address_buffer); // host_addr
7641
7641
row.write_string (version_buffer); // node_version
7642
7642
row.write_uint32 (0 ); // process_id
7643
7643
row.write_uint32 (0 ); // angel_process_id
7644
7644
row.write_string (" " ); // process_name
7645
- row.write_string (" " ); // conn_name
7646
- row.write_uint32 (0 ); // application_port
7645
+ row.write_string (service_uri); // service_URI
7647
7646
ndbinfo_send_row (signal, req, row, rl);
7648
7647
}
7649
7648
}
@@ -7663,22 +7662,24 @@ Qmgr::execPROCESSINFO_REP(Signal *signal)
7663
7662
jamEntry ();
7664
7663
ProcessInfoRep * report = (ProcessInfoRep *) signal->theData ;
7665
7664
SectionHandle handle (this , signal);
7666
- SegmentedSectionPtr connNamePtr, hostAddrPtr ;
7665
+ SegmentedSectionPtr pathSectionPtr, hostSectionPtr ;
7667
7666
7668
7667
ProcessInfo * processInfo = getProcessInfo (report->node_id );
7669
7668
if (processInfo)
7670
7669
{
7671
7670
/* Set everything except the connection name and host address */
7672
7671
processInfo->initializeFromProcessInfoRep (report);
7673
7672
7674
- /* Set the connection name */
7675
- handle.getSection (connNamePtr, ProcessInfoRep::ConnNameSectionNum);
7676
- processInfo->setConnectionName (connNamePtr.p ->theData );
7673
+ /* Set the URI path */
7674
+ if (handle.getSection (pathSectionPtr, ProcessInfoRep::PathSectionNum))
7675
+ {
7676
+ processInfo->setUriPath (pathSectionPtr.p ->theData );
7677
+ }
7677
7678
7678
7679
/* Set the host address */
7679
- if (handle.getSection (hostAddrPtr , ProcessInfoRep::HostAddrSectionNum ))
7680
+ if (handle.getSection (hostSectionPtr , ProcessInfoRep::HostSectionNum ))
7680
7681
{
7681
- processInfo->setHostAddress (hostAddrPtr .p ->theData );
7682
+ processInfo->setHostAddress (hostSectionPtr .p ->theData );
7682
7683
}
7683
7684
else
7684
7685
{
0 commit comments