Commit f79f6e0c authored by Alexander Nozdrin's avatar Alexander Nozdrin

Fix for Bug#57094 (Copyright notice incorrect?).

The fix is to:
  - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
    to specify copyright notice;
  - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
    in programs.
parent ab15833a
...@@ -13,11 +13,6 @@ ...@@ -13,11 +13,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define COPYRIGHT_NOTICE "\
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
and you are welcome to modify and redistribute it under the GPL v2 license\n"
/* mysql command tool /* mysql command tool
* Commands compatible with mSQL by David J. Hughes * Commands compatible with mSQL by David J. Hughes
* *
...@@ -110,6 +105,7 @@ extern "C" { ...@@ -110,6 +105,7 @@ extern "C" {
#endif #endif
#include "completion_hash.h" #include "completion_hash.h"
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#define PROMPT_CHAR '\\' #define PROMPT_CHAR '\\'
#define DEFAULT_DELIMITER ";" #define DEFAULT_DELIMITER ";"
...@@ -1177,7 +1173,7 @@ int main(int argc,char *argv[]) ...@@ -1177,7 +1173,7 @@ int main(int argc,char *argv[])
mysql_thread_id(&mysql), server_version_string(&mysql)); mysql_thread_id(&mysql), server_version_string(&mysql));
put_info((char*) glob_buffer.ptr(),INFO_INFO); put_info((char*) glob_buffer.ptr(),INFO_INFO);
put_info(COPYRIGHT_NOTICE, INFO_INFO); put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"), INFO_INFO);
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
initialize_readline((char*) my_progname); initialize_readline((char*) my_progname);
...@@ -1595,7 +1591,7 @@ static void usage(int version) ...@@ -1595,7 +1591,7 @@ static void usage(int version)
if (version) if (version)
return; return;
printf("%s", COPYRIGHT_NOTICE); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
printf("Usage: %s [OPTIONS] [database]\n", my_progname); printf("Usage: %s [OPTIONS] [database]\n", my_progname);
my_print_help(my_long_options); my_print_help(my_long_options);
print_defaults("my", load_default_groups); print_defaults("my", load_default_groups);
......
/* Copyright (C) 2000 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include "../scripts/mysql_fix_privilege_tables_sql.c" #include "../scripts/mysql_fix_privilege_tables_sql.c"
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#define VER "1.1" #define VER "1.1"
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
...@@ -232,6 +234,7 @@ get_one_option(int optid, const struct my_option *opt, ...@@ -232,6 +234,7 @@ get_one_option(int optid, const struct my_option *opt,
case '?': case '?':
printf("%s Ver %s Distrib %s, for %s (%s)\n", printf("%s Ver %s Distrib %s, for %s (%s)\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("MySQL utility for upgrading databases to new MySQL versions.\n"); puts("MySQL utility for upgrading databases to new MySQL versions.\n");
my_print_help(my_long_options); my_print_help(my_long_options);
exit(0); exit(0);
......
/* Copyright (C) 2000-2006 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <mysql.h> #include <mysql.h>
#include <sql_common.h> #include <sql_common.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#define ADMIN_VERSION "8.42" #define ADMIN_VERSION "8.42"
#define MAX_MYSQL_VAR 512 #define MAX_MYSQL_VAR 512
...@@ -671,8 +672,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) ...@@ -671,8 +672,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
case ADMIN_VER: case ADMIN_VER:
new_line=1; new_line=1;
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
printf("Server version\t\t%s\n", mysql_get_server_info(mysql)); printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql)); printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
printf("Connection\t\t%s\n",mysql_get_host_info(mysql)); printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
...@@ -1070,8 +1070,7 @@ static void print_version(void) ...@@ -1070,8 +1070,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Administration program for the mysqld daemon."); puts("Administration program for the mysqld daemon.");
printf("Usage: %s [OPTIONS] command command....\n", my_progname); printf("Usage: %s [OPTIONS] command command....\n", my_progname);
my_print_help(my_long_options); my_print_help(my_long_options);
......
/* Copyright (C) 2001-2004 MySQL AB /* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "sql_priv.h" #include "sql_priv.h"
#include "log_event.h" #include "log_event.h"
#include "sql_common.h" #include "sql_common.h"
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#define BIN_LOG_HEADER_SIZE 4 #define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4) #define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
...@@ -1239,10 +1240,7 @@ static void print_version() ...@@ -1239,10 +1240,7 @@ static void print_version()
static void usage() static void usage()
{ {
print_version(); print_version();
puts("By Monty and Sasha, for your professional use\n\ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2001, 2010"));
This software comes with NO WARRANTY: This is free software,\n\
and you are welcome to modify and redistribute it under the GPL license.\n");
printf("\ printf("\
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\ Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
the mysql command line client.\n\n"); the mysql command line client.\n\n");
......
/* Copyright (C) 2000 MySQL AB, 2009 Sun Microsystems, Inc /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
#define CHECK_VERSION "2.5.0" #define CHECK_VERSION "2.5.0"
#include "client_priv.h" #include "client_priv.h"
...@@ -22,6 +20,7 @@ ...@@ -22,6 +20,7 @@
#include <mysql_version.h> #include <mysql_version.h>
#include <mysqld_error.h> #include <mysqld_error.h>
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
/* Exit codes */ /* Exit codes */
...@@ -215,9 +214,7 @@ static void print_version(void) ...@@ -215,9 +214,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n"); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),"); puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be"); puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
puts("used at the same time. Not all options are supported by all storage engines."); puts("used at the same time. Not all options are supported by all storage engines.");
......
/* Copyright 2000-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc. /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
#include "mysql_version.h" #include "mysql_version.h"
#include "mysqld_error.h" #include "mysqld_error.h"
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
/* Exit codes */ /* Exit codes */
#define EX_USAGE 1 #define EX_USAGE 1
...@@ -584,8 +586,7 @@ static void short_usage_sub(void) ...@@ -584,8 +586,7 @@ static void short_usage_sub(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("By Igor Romanenko, Monty, Jani & Sinisa."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
puts("Dumping structure and contents of MySQL databases and tables."); puts("Dumping structure and contents of MySQL databases and tables.");
short_usage_sub(); short_usage_sub();
print_defaults("my",load_default_groups); print_defaults("my",load_default_groups);
......
/* Copyright (C) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc. /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <my_pthread.h> #include <my_pthread.h>
#endif #endif
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
/* Global Thread counter */ /* Global Thread counter */
uint counter; uint counter;
...@@ -191,8 +193,7 @@ static void print_version(void) ...@@ -191,8 +193,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
printf("\ printf("\
Loads tables from text files in various formats. The base name of the\n\ Loads tables from text files in various formats. The base name of the\n\
text file must be the name of the table that should be used.\n\ text file must be the name of the table that should be used.\n\
......
/* Copyright (C) 2000-2006 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
static char * host=0, *opt_password=0, *user=0; static char * host=0, *opt_password=0, *user=0;
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0; static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
...@@ -247,8 +248,7 @@ static void print_version(void) ...@@ -247,8 +248,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010)"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n"); puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname); printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
puts("\n\ puts("\n\
......
/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc. /* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -11,12 +11,7 @@ ...@@ -11,12 +11,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
original idea: Brian Aker via playing with ab for too many years
coded by: Patrick Galbraith
*/
/* /*
MySQL Slap MySQL Slap
...@@ -94,6 +89,7 @@ ...@@ -94,6 +89,7 @@
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
#include <ctype.h> #include <ctype.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#ifdef __WIN__ #ifdef __WIN__
#define srandom srand #define srandom srand
...@@ -686,8 +682,7 @@ static void print_version(void) ...@@ -686,8 +682,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright (C) 2005 MySQL AB"); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
puts("Run a query multiple times against the server.\n"); puts("Run a query multiple times against the server.\n");
printf("Usage: %s [OPTIONS]\n",my_progname); printf("Usage: %s [OPTIONS]\n",my_progname);
print_defaults("my",load_default_groups); print_defaults("my",load_default_groups);
......
/* Copyright (C) 2000 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include <signal.h> #include <signal.h>
#include <my_stacktrace.h> #include <my_stacktrace.h>
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#ifdef __WIN__ #ifdef __WIN__
#include <crtdbg.h> #include <crtdbg.h>
#define SIGNAL_FMT "exception 0x%x" #define SIGNAL_FMT "exception 0x%x"
...@@ -6260,8 +6262,7 @@ void print_version(void) ...@@ -6260,8 +6262,7 @@ void print_version(void)
void usage() void usage()
{ {
print_version(); print_version();
printf("MySQL AB, by Sasha, Matt, Monty & Jani\n"); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
printf("Runs a test against the mysql server and compares output with a results file.\n\n"); printf("Runs a test against the mysql server and compares output with a results file.\n\n");
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname); printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
my_print_help(my_long_options); my_print_help(my_long_options);
......
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
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
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_
/*
This define specifies copyright notice which is displayed by every MySQL
program on start, or on help screen.
*/
#define ORACLE_WELCOME_COPYRIGHT_NOTICE(years) \
"Copyright (c) " years ", Oracle and/or its affiliates. All rights reserved.\n" \
"\n" \
"Oracle is a registered trademark of Oracle Corporation and/or its\n" \
"affiliates. Other names may be trademarks of their respective\n" \
"owners.\n"
#endif /* _welcome_copyright_notice_h_ */
...@@ -265,6 +265,8 @@ extern "C" sig_handler handle_segfault(int sig); ...@@ -265,6 +265,8 @@ extern "C" sig_handler handle_segfault(int sig);
/* Constants */ /* Constants */
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"}; const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
static const char *tc_heuristic_recover_names[]= static const char *tc_heuristic_recover_names[]=
...@@ -6593,13 +6595,8 @@ static void usage(void) ...@@ -6593,13 +6595,8 @@ static void usage(void)
if (!default_collation_name) if (!default_collation_name)
default_collation_name= (char*) default_charset_info->name; default_collation_name= (char*) default_charset_info->name;
print_version(); print_version();
puts("\ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
Copyright (C) 2000-2008 MySQL AB, by Monty and others.\n\ puts("Starts the MySQL database server.\n");
Copyright (C) 2008,2009 Sun Microsystems, Inc.\n\
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
and you are welcome to modify and redistribute it under the GPL license\n\n\
Starts the MySQL database server.\n");
printf("Usage: %s [OPTIONS]\n", my_progname); printf("Usage: %s [OPTIONS]\n", my_progname);
if (!opt_verbose) if (!opt_verbose)
puts("\nFor more help options (several pages), use mysqld --verbose --help."); puts("\nFor more help options (several pages), use mysqld --verbose --help.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment