Bug #47503 GRT Shell "help" with no parameters crash

Submitted: 22 Sep 2009 3:26 Modified: 12 Nov 2009 15:45
Reporter: Josh Guyette Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.3, 5.2.2 OSS Alpha - Build 3745 OS:Windows
Assigned to: CPU Architecture:Any
Tags: GRT Shell Help, GRT Shell Help

[22 Sep 2009 3:26] Josh Guyette
Description:
In the GRT shell the "help" command, which is suppose to be equivalent to "?", crashes when no arguments are specified.

This is because of show_help(NULL) in grtpp_shell.cpp. You do not want to pass a NULL parameter here, as this is a pass-by-reference parameter.

How to repeat:
In the GRT Shell, type the command "help".

Suggested fix:
Well since the "?" works, you might as well remove the conditional (and body) of "if (strcmp(cmd, "help")==0)"...

  // So this is now the start of the "if", rather than an "else if"
  if ((cmd_param= get_value_from_text_ex(cmd, cmd_len, "^(help|\\\\h)\\s+([\\w\\/\\.]*)", 2)))
  {
    show_help(cmd_param);

    res= ShellCommandHelp;
  }
[22 Sep 2009 6:03] Valeriy Kravchuk
Thank you for the bug report. Verified just as described with WB 5.2.3 on 32-bit Windows XP.
[29 Oct 2009 12:53] Alfredo Kojima
Can't repeat on Mac or Linux
[5 Nov 2009 21:08] Alfredo Kojima
i can't repeat in windows either, probably got fixed at some point.
[11 Nov 2009 22:30] Johannes Taxacher
this has been fixed. fix will be included in 5.2.7
[12 Nov 2009 15:45] Tony Bedford
An entry has been added to the 5.2.7 changelog:

In the GRT shell the help command, which is equivalent to ?, crashed when no arguments were specified.
[12 Nov 2009 15:45] Tony Bedford
An entry has been added to the 5.2.7 changelog:

In the GRT shell the help command, which is equivalent to ?, crashed when no arguments were specified.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.056 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.