diff options
author | unknown <timour@askmonty.org> | 2012-11-06 11:52:55 +0200 |
---|---|---|
committer | unknown <timour@askmonty.org> | 2012-11-06 11:52:55 +0200 |
commit | 7c23d6d0c66cb3b84cb466f956e19bfea0acc342 (patch) | |
tree | 551dd23a43a26923a6dd30096a2822a27a90f355 /client/mysql.cc | |
parent | 43293b7a515dbb2cf04907e2d98bcc813279cad8 (diff) | |
parent | 813b661d00123e3291530d102e2b94388f42fb0f (diff) | |
download | mariadb-git-7c23d6d0c66cb3b84cb466f956e19bfea0acc342.tar.gz |
Merge MySQL 5.1.66 -> MariaDB 5.1.65
Diffstat (limited to 'client/mysql.cc')
-rw-r--r-- | client/mysql.cc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 4d761945068..385266d7c11 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1,6 +1,6 @@ -/* Copyright (C) 2000-2009 MySQL AB - Copyright 2000, 2010-2011, Oracle and/or its affiliates. - Copyright 2000-2010 Monty Program Ab +/* + Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2009, 2012, Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -119,6 +119,7 @@ extern "C" { #endif #include "completion_hash.h" +#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE #define PROMPT_CHAR '\\' #define DEFAULT_DELIMITER ";" @@ -1176,7 +1177,7 @@ int main(int argc,char *argv[]) mysql_thread_id(&mysql), server_version_string(&mysql)); put_info((char*) glob_buffer.ptr(),INFO_INFO); - put_info(COPYRIGHT_NOTICE, INFO_INFO); + put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO); #ifdef HAVE_READLINE initialize_readline((char*) my_progname); @@ -1604,7 +1605,7 @@ static void usage(int version) if (version) return; - printf("%s", COPYRIGHT_NOTICE); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); printf("Usage: %s [OPTIONS] [database]\n", my_progname); my_print_help(my_long_options); print_defaults("my", load_default_groups); @@ -2826,7 +2827,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; @@ -2841,9 +2842,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; @@ -2911,6 +2915,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); } } |