Skip to content

Commit c4dad60

Browse files
author
Alexander Nozdrin
committed
Manual merge from mysql-5.0.
2 parents 41258f8 + f761890 commit c4dad60

10 files changed

Lines changed: 39 additions & 72 deletions

File tree

client/mysql.cc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18-
#define COPYRIGHT_NOTICE "\
19-
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
20-
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
21-
and you are welcome to modify and redistribute it under the GPL v2 license\n"
22-
2318
/* mysql command tool
2419
* Commands compatible with mSQL by David J. Hughes
2520
*
@@ -120,6 +115,7 @@ extern "C" {
120115
#endif
121116

122117
#include "completion_hash.h"
118+
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
123119

124120
#define PROMPT_CHAR '\\'
125121
#define DEFAULT_DELIMITER ";"
@@ -1174,7 +1170,7 @@ int main(int argc,char *argv[])
11741170
mysql_thread_id(&mysql), server_version_string(&mysql));
11751171
put_info((char*) glob_buffer.ptr(),INFO_INFO);
11761172

1177-
put_info(COPYRIGHT_NOTICE, INFO_INFO);
1173+
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"), INFO_INFO);
11781174

11791175
#ifdef HAVE_READLINE
11801176
initialize_readline((char*) my_progname);
@@ -1593,7 +1589,7 @@ static void usage(int version)
15931589

15941590
if (version)
15951591
return;
1596-
printf("%s", COPYRIGHT_NOTICE);
1592+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
15971593
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
15981594
my_print_help(my_long_options);
15991595
print_defaults("my", load_default_groups);

client/mysql_upgrade.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
1919
#include <sslopt-vars.h>
2020
#include "../scripts/mysql_fix_privilege_tables_sql.c"
2121

22+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
23+
2224
#define VER "1.1"
2325

2426
#ifdef HAVE_SYS_WAIT_H
@@ -228,6 +230,7 @@ get_one_option(int optid, const struct my_option *opt,
228230
switch (optid) {
229231

230232
case '?':
233+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
231234
printf("%s Ver %s Distrib %s, for %s (%s)\n",
232235
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
233236
puts("MySQL utility for upgrading databases to new MySQL versions.\n");

client/mysqladmin.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <sys/stat.h>
2626
#include <mysql.h>
2727
#include <sql_common.h>
28+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2829

2930
#define ADMIN_VERSION "8.42"
3031
#define MAX_MYSQL_VAR 512
@@ -692,8 +693,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
692693
case ADMIN_VER:
693694
new_line=1;
694695
print_version();
695-
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
696-
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");
696+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
697697
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
698698
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
699699
printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
@@ -1072,8 +1072,7 @@ static void print_version(void)
10721072
static void usage(void)
10731073
{
10741074
print_version();
1075-
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
1076-
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");
1075+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
10771076
puts("Administration program for the mysqld daemon.");
10781077
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
10791078
my_print_help(my_long_options);

client/mysqlcheck.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -15,15 +15,14 @@
1515
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1616
*/
1717

18-
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
19-
2018
#define CHECK_VERSION "2.5.0"
2119

2220
#include "client_priv.h"
2321
#include <m_ctype.h>
2422
#include <mysql_version.h>
2523
#include <mysqld_error.h>
2624
#include <sslopt-vars.h>
25+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2726

2827
/* Exit codes */
2928

@@ -223,9 +222,7 @@ static void print_version(void)
223222
static void usage(void)
224223
{
225224
print_version();
226-
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
227-
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
228-
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
225+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
229226
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
230227
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
231228
puts("used at the same time. Not all options are supported by all storage engines.");

client/mysqldump.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
#include "mysqld_error.h"
5555
#include "../sql/ha_ndbcluster_tables.h"
5656

57+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
58+
5759
/* Exit codes */
5860

5961
#define EX_USAGE 1
@@ -569,8 +571,7 @@ static void short_usage_sub(void)
569571
static void usage(void)
570572
{
571573
print_version();
572-
puts("By Igor Romanenko, Monty, Jani & Sinisa.");
573-
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");
574+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
574575
puts("Dumping structure and contents of MySQL databases and tables.");
575576
short_usage_sub();
576577
print_defaults("my",load_default_groups);

client/mysqlimport.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -18,14 +18,8 @@
1818
/*
1919
** mysqlimport.c - Imports all given files
2020
** into a table(s).
21-
**
22-
** *************************
23-
** * *
24-
** * AUTHOR: Monty & Jani *
25-
** * DATE: June 24, 1997 *
26-
** * *
27-
** *************************
2821
*/
22+
2923
#define IMPORT_VERSION "3.7"
3024

3125
#include "client_priv.h"
@@ -42,6 +36,8 @@ pthread_mutex_t counter_mutex;
4236
pthread_cond_t count_threshhold;
4337
#endif
4438

39+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
40+
4541
static void db_error_with_table(MYSQL *mysql, char *table);
4642
static void db_error(MYSQL *mysql);
4743
static char *field_escape(char *to,const char *from,uint length);
@@ -200,8 +196,7 @@ static void print_version(void)
200196
static void usage(void)
201197
{
202198
print_version();
203-
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
204-
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");
199+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
205200
printf("\
206201
Loads tables from text files in various formats. The base name of the\n\
207202
text file must be the name of the table that should be used.\n\

client/mysqlshow.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
2727
#include <signal.h>
2828
#include <stdarg.h>
2929
#include <sslopt-vars.h>
30+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
3031

3132
static char * host=0, *opt_password=0, *user=0;
3233
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
@@ -255,8 +256,7 @@ static void print_version(void)
255256
static void usage(void)
256257
{
257258
print_version();
258-
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
259-
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");
259+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011)"));
260260
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
261261
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
262262
puts("\n\

client/mysqltest.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
http://dev.mysql.com/doc/mysqltest/en/index.html
2525
2626
Please keep the test framework tools identical in all versions!
27-
28-
Written by:
29-
Sasha Pachev <sasha@mysql.com>
30-
Matt Wagner <matt@mysql.com>
31-
Monty
32-
Jani
33-
Holyfoot
3427
*/
3528

3629
#define MTEST_VERSION "3.3"
@@ -53,6 +46,8 @@
5346
#include <signal.h>
5447
#include <my_stacktrace.h>
5548

49+
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
50+
5651
#ifdef __WIN__
5752
#include <crtdbg.h>
5853
#define SIGNAL_FMT "exception 0x%x"
@@ -6125,8 +6120,7 @@ void print_version(void)
61256120
void usage()
61266121
{
61276122
print_version();
6128-
printf("MySQL AB, by Sasha, Matt, Monty & Jani\n");
6129-
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
6123+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
61306124
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
61316125
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
61326126
my_print_help(my_long_options);

sql/gen_lex_hash.cc

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* Copyright (c) 2000-2007 MySQL AB, 2009 Sun Microsystems, Inc.
2-
Use is subject to license terms.
1+
/*
2+
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -89,6 +89,8 @@ So, we can read full search-structure as 32-bit word
8989
#include "mysql_version.h"
9090
#include "lex.h"
9191

92+
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
93+
9294
const char *default_dbug_option="d:t:o,/tmp/gen_lex_hash.trace";
9395

9496
struct my_option my_long_options[] =
@@ -348,9 +350,7 @@ static void usage(int version)
348350
my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
349351
if (version)
350352
return;
351-
puts("Copyright (C) 2001 MySQL AB, by VVA and Monty");
352-
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
353-
and you are welcome to modify and redistribute it under the GPL license\n");
353+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
354354
puts("This program generates a perfect hashing function for the sql_lex.cc");
355355
printf("Usage: %s [OPTIONS]\n\n", my_progname);
356356
my_print_help(my_long_options);
@@ -452,24 +452,9 @@ int main(int argc,char **argv)
452452
/* Broken up to indicate that it's not advice to you, gentle reader. */
453453
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
454454

455-
printf("\
456-
/* Copyright (C) 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n\
457-
\n\
458-
This program is free software; you can redistribute it and/or modify\n\
459-
it under the terms of the GNU General Public License as published by\n\
460-
the Free Software Foundation; version 2 of the License.\n\
461-
\n\
462-
This program is distributed in the hope that it will be useful,\n\
463-
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
464-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
465-
GNU General Public License for more details.\n\
466-
\n\
467-
You should have received a copy of the GNU General Public License\n\
468-
along with this program; see the file COPYING. If not, write to the\n\
469-
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston\n\
470-
MA 02110-1301 USA. */\n\
471-
\n\
472-
");
455+
puts("/*");
456+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
457+
puts("*/");
473458

474459
/* Broken up to indicate that it's not advice to you, gentle reader. */
475460
printf("/* Do " "not " "edit " "this " "file! This is generated by "

sql/mysqld.cc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ extern "C" sig_handler handle_segfault(int sig);
279279

280280
/* Constants */
281281

282+
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
283+
282284
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
283285
/*
284286
WARNING: When adding new SQL modes don't forget to update the
@@ -7796,13 +7798,8 @@ static void usage(void)
77967798
if (!default_collation_name)
77977799
default_collation_name= (char*) default_charset_info->name;
77987800
print_version();
7799-
puts("\
7800-
Copyright (C) 2000-2008 MySQL AB, by Monty and others.\n\
7801-
Copyright (C) 2008 Sun Microsystems, Inc.\n\
7802-
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
7803-
and you are welcome to modify and redistribute it under the GPL license\n\n\
7804-
Starts the MySQL database server.\n");
7805-
7801+
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
7802+
puts("Starts the MySQL database server.\n");
78067803
printf("Usage: %s [OPTIONS]\n", my_progname);
78077804
if (!opt_verbose)
78087805
puts("\nFor more help options (several pages), use mysqld --verbose --help.");

0 commit comments

Comments
 (0)