mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug #12615411 - server side help doesn't work as first statement
Merged from mysql-5.1 to mysql-5.5
This commit is contained in:
@ -2772,7 +2772,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
|||||||
char *line __attribute__((unused)), char *help_arg)
|
char *line __attribute__((unused)), char *help_arg)
|
||||||
{
|
{
|
||||||
MYSQL_ROW cur;
|
MYSQL_ROW cur;
|
||||||
const char *server_cmd= buffer->ptr();
|
const char *server_cmd;
|
||||||
char cmd_buf[100 + 1];
|
char cmd_buf[100 + 1];
|
||||||
MYSQL_RES *result;
|
MYSQL_RES *result;
|
||||||
int error;
|
int error;
|
||||||
@ -2787,9 +2787,12 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
|||||||
*++end_arg= '\0';
|
*++end_arg= '\0';
|
||||||
}
|
}
|
||||||
(void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
|
(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)
|
if (!status.batch)
|
||||||
{
|
{
|
||||||
old_buffer= *buffer;
|
old_buffer= *buffer;
|
||||||
@ -2857,6 +2860,11 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
put_info("\nNothing found", INFO_INFO);
|
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);
|
put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user