summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay.choubey@oracle.com>2012-08-07 18:58:19 +0530
committerNirbhay Choubey <nirbhay.choubey@oracle.com>2012-08-07 18:58:19 +0530
commit5ad8292c63a89db63a54f9cfed6ceb3a35656f7b (patch)
treecf7e56d23409e04f0c0e3d85fc45baddbc741c4a
parentd86d06345b7cb46bce30b34e74a1d39a8df4677b (diff)
downloadmariadb-git-5ad8292c63a89db63a54f9cfed6ceb3a35656f7b.tar.gz
Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST
SHOW 2012 INSTEAD OF 2011 * Added a new macro to hold the current year : COPYRIGHT_NOTICE_CURRENT_YEAR * Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro to take the initial year as parameter and pick current year from the above mentioned macro.
-rw-r--r--client/mysql.cc6
-rw-r--r--client/mysql_upgrade.c4
-rw-r--r--client/mysqladmin.cc6
-rw-r--r--client/mysqlbinlog.cc2
-rw-r--r--client/mysqlcheck.c4
-rw-r--r--client/mysqldump.c2
-rw-r--r--client/mysqlimport.c4
-rw-r--r--client/mysqlshow.c4
-rw-r--r--client/mysqlslap.c6
-rw-r--r--client/mysqltest.cc2
-rw-r--r--extra/perror.c5
-rw-r--r--include/welcome_copyright_notice.h21
-rw-r--r--sql/gen_lex_hash.cc6
-rw-r--r--sql/mysqld.cc2
14 files changed, 40 insertions, 34 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 595d5e1d969..3cb28e81164 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -1170,7 +1170,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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"), INFO_INFO);
+ put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
#ifdef HAVE_READLINE
initialize_readline((char*) my_progname);
@@ -1589,7 +1589,7 @@ static void usage(int version)
if (version)
return;
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ 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);
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 88e893701fb..2512f5269ab 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2006, 2012, 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
@@ -230,7 +230,7 @@ get_one_option(int optid, const struct my_option *opt,
switch (optid) {
case '?':
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
printf("%s Ver %s Distrib %s, for %s (%s)\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
puts("MySQL utility for upgrading databases to new MySQL versions.\n");
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 1613e1a42c3..d5d6ad9ff6a 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -693,7 +693,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
case ADMIN_VER:
new_line=1;
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
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));
@@ -1072,7 +1072,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("Administration program for the mysqld daemon.");
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
my_print_help(my_long_options);
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index b5acfc5c169..ef67e0ffba9 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1274,7 +1274,7 @@ static void print_version()
static void usage()
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
printf("\
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
the mysql command line client.\n\n");
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index be1fbf1a020..ec9ee50868b 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2001, 2012, 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
@@ -222,7 +222,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
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.");
diff --git a/client/mysqldump.c b/client/mysqldump.c
index dc124f1b335..3fda1fafc24 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -585,7 +585,7 @@ static void short_usage_sub(void)
static void usage(void)
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("Dumping structure and contents of MySQL databases and tables.");
short_usage_sub();
print_defaults("my",load_default_groups);
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index f1a05c76513..a739c5aded0 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -196,7 +196,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
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\
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index dec31868c0c..1656ec71af8 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -256,7 +256,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011)"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
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\
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 35c36806769..4c4dbafc24d 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2005, 2012, 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
@@ -95,6 +95,7 @@ TODO:
#include <sys/wait.h>
#endif
#include <ctype.h>
+#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#ifdef __WIN__
#define srandom srand
@@ -691,8 +692,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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005"));
puts("Run a query multiple times against the server.\n");
printf("Usage: %s [OPTIONS]\n",my_progname);
print_defaults("my",load_default_groups);
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index e595493ccf0..89fcb56825e 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -6135,7 +6135,7 @@ void print_version(void)
void usage()
{
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
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);
diff --git a/extra/perror.c b/extra/perror.c
index b76f3fd8e55..d8e3c3a59a8 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -29,6 +29,7 @@
#include "../storage/ndb/src/kernel/error/ndbd_exit_codes.c"
#include "../storage/ndb/include/mgmapi/mgmapi_error.h"
#endif
+#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
static my_bool verbose, print_all_codes;
@@ -115,7 +116,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- 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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
printf("Print a description for a system error code or a MySQL error code.\n");
printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
diff --git a/include/welcome_copyright_notice.h b/include/welcome_copyright_notice.h
index 5a96da4ceb4..ef4b08d4c0d 100644
--- a/include/welcome_copyright_notice.h
+++ b/include/welcome_copyright_notice.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, 2012, 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
@@ -16,16 +16,21 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_
+#define COPYRIGHT_NOTICE_CURRENT_YEAR "2012"
+
/*
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"
+#define ORACLE_WELCOME_COPYRIGHT_NOTICE(first_year) \
+ (strcmp(first_year, COPYRIGHT_NOTICE_CURRENT_YEAR) ? \
+ "Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR ", " \
+ "Oracle and/or its affiliates. All rights reserved.\n\nOracle is a " \
+ "registered trademark of Oracle Corporation and/or its\naffiliates. " \
+ "Other names may be trademarks of their respective\nowners.\n" : \
+ "Copyright (c) " first_year ", Oracle and/or its affiliates. " \
+ "All rights reserved.\n\nOracle is a registered trademark of " \
+ "Oracle Corporation and/or its\naffiliates. Other names may be " \
+ "trademarks of their respective\nowners.\n")
#endif /* _welcome_copyright_notice_h_ */
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc
index 9814814e8db..f126afb9015 100644
--- a/sql/gen_lex_hash.cc
+++ b/sql/gen_lex_hash.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2012, 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
@@ -350,7 +350,7 @@ static void usage(int version)
my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
if (version)
return;
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("This program generates a perfect hashing function for the sql_lex.cc");
printf("Usage: %s [OPTIONS]\n\n", my_progname);
my_print_help(my_long_options);
@@ -453,7 +453,7 @@ int main(int argc,char **argv)
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
puts("/*");
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("*/");
/* Broken up to indicate that it's not advice to you, gentle reader. */
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d6397280e0d..bc8d4162272 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -7652,7 +7652,7 @@ static void usage(void)
if (!default_collation_name)
default_collation_name= (char*) default_charset_info->name;
print_version();
- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts("Starts the MySQL database server.\n");
printf("Usage: %s [OPTIONS]\n", my_progname);
if (!opt_verbose)