Bug #88958 ndb_desc should fail if no object is provided
Submitted: 18 Dec 2017 14:58
Reporter: Bogdan Kecman Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: plugin Severity:S4 (Feature request)
Version:7.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: ndb_desc

[18 Dec 2017 14:58] Bogdan Kecman
Description:
If no object is provided to ndb_desc it will exit with OK not showing anything instead of reporting error that no object is provided.

How to repeat:
ok:

./ndb_desc nekitest -c localhost -d test
-- nekitest --
Version: 5
Fragment type: HashMapPartition
K Value: 6
Min load factor: 78
Max load factor: 80
Temporary table: no
Number of attributes: 4
Number of primary keys: 1
Length of frm data: 307
Max Rows: 0
Row Checksum: 1
Row GCI: 1
SingleUserMode: 0
ForceVarPart: 1
PartitionCount: 2
FragmentCount: 2
PartitionBalance: FOR_RP_BY_LDM
ExtraRowGciBits: 0
ExtraRowAuthorBits: 0
TableStatus: Retrieved
Table options:
HashMap: DEFAULT-HASHMAP-3840-2
-- Attributes --
id Bigint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
x Int NULL AT=FIXED ST=MEMORY
y Int NULL AT=FIXED ST=MEMORY
z Varchar(255;latin1_swedish_ci) NULL AT=SHORT_VAR ST=MEMORY
-- Indexes --
PRIMARY KEY(id) - UniqueHashIndex
PRIMARY(id) - OrderedIndex

NDBT_ProgramExit: 0 - OK

NOK:

./ndb_desc  -c localhost -d test -t nekitest

returns only "NDBT_ProgramExit: 0 - OK"

Suggested fix:
Fail when no object is not provided.. e.g.

./ndb_desc -c localhost -d db1 -t t1
No object provided

NDBT_ProgramExit: 0 - OK