#At file:///home/alik/MySQL/bzr/00/bug57094/mysql-5.5-bugteam-bug57094/ based on revid:alexander.nozdrin@stripped
3209 Alexander Nozdrin 2010-09-30
Fix for Bug#59074 (Copyright notice incorrect?).
The fix is to:
- define MYSQL_COPYRIGHT_START_SCREEN_TEXT define to have a single place
to specify copyright notice;
- replace custom copyright notices with MYSQL_COPYRIGHT_START_SCREEN_TEXT
in programs.
modified:
client/mysql.cc
client/mysql_upgrade.c
client/mysqladmin.cc
client/mysqlbinlog.cc
client/mysqlcheck.c
client/mysqldump.c
client/mysqlimport.c
client/mysqlshow.c
client/mysqlslap.c
client/mysqltest.cc
sql/mysqld.cc
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2010-08-19 11:35:47 +0000
+++ b/client/mysql.cc 2010-09-30 15:59:25 +0000
@@ -13,11 +13,6 @@
along with this program; if not, write to the Free Software
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
* Commands compatible with mSQL by David J. Hughes
*
@@ -110,6 +105,7 @@ extern "C" {
#endif
#include "completion_hash.h"
+#include <copyright.h>
#define PROMPT_CHAR '\\'
#define DEFAULT_DELIMITER ";"
@@ -1176,7 +1172,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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"), INFO_INFO);
#ifdef HAVE_READLINE
initialize_readline((char*) my_progname);
@@ -1587,7 +1583,7 @@ static void usage(int version)
if (version)
return;
- printf("%s", COPYRIGHT_NOTICE);
+ puts(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
my_print_help(my_long_options);
print_defaults("my", load_default_groups);
=== modified file 'client/mysql_upgrade.c'
--- a/client/mysql_upgrade.c 2010-08-11 17:56:56 +0000
+++ b/client/mysql_upgrade.c 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,8 @@
#include <sslopt-vars.h>
#include "../scripts/mysql_fix_privilege_tables_sql.c"
+#include <copyright.h>
+
#define VER "1.1"
#ifdef HAVE_SYS_WAIT_H
@@ -232,6 +234,7 @@ get_one_option(int optid, const struct m
case '?':
printf("%s Ver %s Distrib %s, for %s (%s)\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
+ puts(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
puts("MySQL utility for upgrading databases to new MySQL versions.\n");
my_print_help(my_long_options);
exit(0);
=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc 2010-07-15 11:13:30 +0000
+++ b/client/mysqladmin.cc 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
#include <sys/stat.h>
#include <mysql.h>
#include <sql_common.h>
+#include <copyright.h>
#define ADMIN_VERSION "8.42"
#define MAX_MYSQL_VAR 512
@@ -671,8 +672,7 @@ static int execute_commands(MYSQL *mysql
case ADMIN_VER:
new_line=1;
print_version();
- puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
@@ -1070,8 +1070,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
puts("Administration program for the mysqld daemon.");
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
my_print_help(my_long_options);
=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc 2010-07-15 13:47:50 +0000
+++ b/client/mysqlbinlog.cc 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
#include "sql_priv.h"
#include "log_event.h"
#include "sql_common.h"
+#include <copyright.h>
#define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
@@ -1239,10 +1240,7 @@ static void print_version()
static void usage()
{
print_version();
- puts("By Monty and Sasha, for your professional use\n\
-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");
-
+ puts(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2001, 2010"));
printf("\
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
the mysql command line client.\n\n");
=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c 2010-07-15 13:47:50 +0000
+++ b/client/mysqlcheck.c 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,6 @@
along with this program; if not, write to the Free Software
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"
#include "client_priv.h"
@@ -22,6 +20,7 @@
#include <mysql_version.h>
#include <mysqld_error.h>
#include <sslopt-vars.h>
+#include <copyright.h>
/* Exit codes */
@@ -215,9 +214,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
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("used at the same time. Not all options are supported by all storage engines.");
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c 2010-08-30 12:06:32 +0000
+++ b/client/mysqldump.c 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -51,6 +51,8 @@
#include "mysql_version.h"
#include "mysqld_error.h"
+#include <copyright.h>
+
/* Exit codes */
#define EX_USAGE 1
@@ -584,8 +586,7 @@ static void short_usage_sub(void)
static void usage(void)
{
print_version();
- puts("By Igor Romanenko, Monty, Jani & Sinisa.");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
puts("Dumping structure and contents of MySQL databases and tables.");
short_usage_sub();
print_defaults("my",load_default_groups);
=== modified file 'client/mysqlimport.c'
--- a/client/mysqlimport.c 2010-07-15 11:13:30 +0000
+++ b/client/mysqlimport.c 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -32,6 +32,8 @@
#include <my_pthread.h>
#endif
+#include <copyright.h>
+
/* Global Thread counter */
uint counter;
@@ -191,8 +193,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
printf("\
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\
=== modified file 'client/mysqlshow.c'
--- a/client/mysqlshow.c 2010-07-15 13:47:50 +0000
+++ b/client/mysqlshow.c 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
#include <signal.h>
#include <stdarg.h>
#include <sslopt-vars.h>
+#include <copyright.h>
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;
@@ -247,8 +248,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010)"));
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
puts("\n\
=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c 2010-07-15 11:13:30 +0000
+++ b/client/mysqlslap.c 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -11,12 +11,7 @@
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
-
- original idea: Brian Aker via playing with ab for too many years
- coded by: Patrick Galbraith
-*/
-
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
MySQL Slap
@@ -94,6 +89,7 @@ TODO:
#include <sys/wait.h>
#endif
#include <ctype.h>
+#include <copyright.h>
#ifdef __WIN__
#define srandom srand
@@ -686,8 +682,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright (C) 2005 MySQL AB");
- 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(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2005, 2010"));
puts("Run a query multiple times against the server.\n");
printf("Usage: %s [OPTIONS]\n",my_progname);
print_defaults("my",load_default_groups);
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2010-09-28 15:15:58 +0000
+++ b/client/mysqltest.cc 2010-09-30 15:59:25 +0000
@@ -1,4 +1,4 @@
-/* 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
it under the terms of the GNU General Public License as published by
@@ -51,6 +51,8 @@
#include <signal.h>
#include <my_stacktrace.h>
+#include <copyright.h>
+
#ifdef __WIN__
#include <crtdbg.h>
#define SIGNAL_FMT "exception 0x%x"
@@ -6179,8 +6181,7 @@ void print_version(void)
void usage()
{
print_version();
- printf("MySQL AB, by Sasha, Matt, Monty & Jani\n");
- printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
+ puts(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
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);
my_print_help(my_long_options);
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-09-14 21:40:50 +0000
+++ b/sql/mysqld.cc 2010-09-30 15:59:25 +0000
@@ -271,6 +271,8 @@ extern "C" sig_handler handle_segfault(i
/* Constants */
+#include <copyright.h> // MYSQL_COPYRIGHT_START_SCREEN_TEXT
+
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
static const char *tc_heuristic_recover_names[]=
@@ -6613,13 +6615,8 @@ static void usage(void)
if (!default_collation_name)
default_collation_name= (char*) default_charset_info->name;
print_version();
- puts("\
-Copyright (C) 2000-2008 MySQL AB, by Monty and others.\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");
-
+ puts(MYSQL_COPYRIGHT_START_SCREEN_TEXT("2000, 2010"));
+ puts("Starts the MySQL database server.\n");
printf("Usage: %s [OPTIONS]\n", my_progname);
if (!opt_verbose)
puts("\nFor more help options (several pages), use mysqld --verbose --help.");
Attachment: [text/bzr-bundle] bzr/alexander.nozdrin@oracle.com-20100930155925-o5dkrcsx0t8gth9e.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-bugteam branch (alexander.nozdrin:3209) Bug#59074 | Alexander Nozdrin | 30 Sep |