summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <iggy@rolltop.ignatz42.dyndns.org>2006-07-19 17:00:39 -0400
committerunknown <iggy@rolltop.ignatz42.dyndns.org>2006-07-19 17:00:39 -0400
commite71f3f1f14a060c11df8f736e60364b59b2d4cb5 (patch)
tree079188d13c6657fedb9ece16331bbb917732f9d7 /client
parent73f47590aa6a4f1a8866cea33f06ea12fc4ddc7f (diff)
parentb80bba31ad5ab62758ac5fce465182851ace8dea (diff)
downloadmariadb-git-e71f3f1f14a060c11df8f736e60364b59b2d4cb5.tar.gz
Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug20328 client/mysql.cc: Auto merged mysql-test/r/bug20328.result: Merge rename: mysql-test/r/mysql_client.result -> mysql-test/r/bug20328.result mysql-test/t/bug20328.test: Merge rename: mysql-test/t/mysql_client.test -> mysql-test/t/bug20328.test
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 09818ae27b3..123aa3ae639 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1725,7 +1725,14 @@ static int com_server_help(String *buffer __attribute__((unused)),
if (help_arg[0] != '\'')
{
- (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
+ char *end_arg= strend(help_arg);
+ if(--end_arg)
+ {
+ while (my_isspace(charset_info,*end_arg))
+ end_arg--;
+ *++end_arg= '\0';
+ }
+ (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
server_cmd= cmd_buf;
}
@@ -1811,9 +1818,13 @@ com_help(String *buffer __attribute__((unused)),
{
reg1 int i, j;
char * help_arg= strchr(line,' '), buff[32], *end;
-
if (help_arg)
- return com_server_help(buffer,line,help_arg+1);
+ {
+ while (my_isspace(charset_info,*help_arg))
+ help_arg++;
+ if (*help_arg)
+ return com_server_help(buffer,line,help_arg);
+ }
put_info("\nFor information about MySQL products and services, visit:\n"
" http://www.mysql.com/\n"