summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorVenkata Sidagam <venkata.sidagam@oracle.com>2012-07-19 14:14:03 +0530
committerVenkata Sidagam <venkata.sidagam@oracle.com>2012-07-19 14:14:03 +0530
commitdaa380b9cd4070486b5e922d93bc3be870d3be67 (patch)
treeb10c841ea4626236a03833a8645e9fbd3dab7b5b /client
parent0ef427ae3fdfc1dbc90e1e6d3b49f05e378ae727 (diff)
parent913e3a8475f0cc69dcd149668291f973538e5046 (diff)
downloadmariadb-git-daa380b9cd4070486b5e922d93bc3be870d3be67.tar.gz
Bug #12615411 - server side help doesn't work as first statement
Merged from mysql-5.1 to mysql-5.5
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 630c6215603..d7c89d3877b 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2772,7 +2772,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
char *line __attribute__((unused)), char *help_arg)
{
MYSQL_ROW cur;
- const char *server_cmd= buffer->ptr();
+ const char *server_cmd;
char cmd_buf[100 + 1];
MYSQL_RES *result;
int error;
@@ -2787,9 +2787,12 @@ static int com_server_help(String *buffer __attribute__((unused)),
*++end_arg= '\0';
}
(void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
- server_cmd= cmd_buf;
}
-
+ else
+ (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help ", help_arg, NullS);
+
+ server_cmd= cmd_buf;
+
if (!status.batch)
{
old_buffer= *buffer;
@@ -2857,6 +2860,11 @@ static int com_server_help(String *buffer __attribute__((unused)),
else
{
put_info("\nNothing found", INFO_INFO);
+ if (strncasecmp(server_cmd, "help 'contents'", 15) == 0)
+ {
+ put_info("\nPlease check if 'help tables' are loaded.\n", INFO_INFO);
+ goto err;
+ }
put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO);
}
}