Bug #53280 ndb_mgm client does bash-like auto-completion
Submitted: 29 Apr 2010 7:36 Modified: 11 Jun 2010 18:53
Reporter: Geert Vanderkelen Email Updates:
Status: Patch pending Impact on me:
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: mysql-5.1.39-telco-6.3.28

[29 Apr 2010 7:36] Geert Vanderkelen
When you use the tabulator key in the command line, it will act like the Bash auto-completion feature.
So if you do <TAB><TAB> at the ndb_mgm> prompt, it will show all files of the current directory.

Doesn't harm, but I can't see how this could be useful.

How to repeat:
ndb_mgm> te<TAB><TAB>
tee            test.logs.sql  test_data.sql  test_ddl.sql   test_dump.sql 

Suggested fix:
Bash the feature (pun intended)
[3 May 2010 12:29] Hartmut Holzgraefe
Quick solution: disable TAB completion, maybe the TAB key alltogether (as literal tabs make no sense in ndb_mgm).

Dream solution: replace default completion function with customized one knowing about the possible command words in each ndb_mgm input state
[3 May 2010 12:31] Hartmut Holzgraefe
Patch to disable TAB completion in ndb_mgm

Attachment: disable-tab-completion.patch (text/x-patch), 441 bytes.

[3 May 2010 12:32] Hartmut Holzgraefe
Patch to completely disable the TAB key in ndb_mgm

Attachment: disable-tab-completely.patch (text/x-patch), 496 bytes.

[17 May 2010 9:29] Bernd Ocklin
Hartmut, you want to push it or shall we do it for you?
[11 Jun 2010 18:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


3538 John David Duncan	2010-06-11
      Actual tab-completion for ndb_mgm.  
      This is context-sensitive completion, implemented by parsing EBNF help text into a syntax graph.
      It includes the debug (VM_TRACE) commands, and if you are already connected the first time you hit TAB, it also knows the node ids of the data nodes.
      Also includes some cleanup of readline handling in main.cpp.