From: Nirbhay Choubey Date: August 7 2012 2:02pm Subject: bzr push into mysql-5.6 branch (nirbhay.choubey:4099 to 4100) Bug#13928675 List-Archive: http://lists.mysql.com/commits/144531 X-Bug: 13928675 Message-Id: <20120807140226.23833.81142.4100@Nirbhay-lenovo> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 4100 Nirbhay Choubey 2012-08-07 [merge] Merge of patch for Bug#13928675 from mysql-5.5. 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 extra/innochecksum.cc extra/perror.c include/welcome_copyright_notice.h sql/gen_lex_hash.cc sql/mysqld.cc storage/perfschema/gen_pfs_lex_token.cc 4099 Tor Didriksen 2012-08-07 Bug#14314156 MAIN.FUNC_MATH TEST FAILS ON MYSQL-TRUNK ON PB2 This seems to be a bug in gcc/clang/osx10.7-x86 -(LONGLONG_MIN) is not flagged as out of range. Fixed by adding an explicit test for this value in Item_func_neg::int_op() @ unittest/gunit/item-t.cc New unit test. modified: sql/item_func.cc sql/item_func.h unittest/gunit/item-t.cc === modified file 'client/mysql.cc' --- a/client/mysql.cc 2012-08-06 09:45:33 +0000 +++ b/client/mysql.cc 2012-08-07 13:56:51 +0000 @@ -1303,7 +1303,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, 2012"), INFO_INFO); + put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO); #ifdef HAVE_READLINE initialize_readline((char*) my_progname); @@ -1746,7 +1746,7 @@ static void usage(int version) if (version) return; - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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); === modified file 'client/mysql_upgrade.c' --- a/client/mysql_upgrade.c 2012-06-28 08:47:12 +0000 +++ b/client/mysql_upgrade.c 2012-08-07 13:56:51 +0000 @@ -247,7 +247,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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); 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 2012-07-05 07:18:42 +0000 +++ b/client/mysqladmin.cc 2012-08-07 13:56:51 +0000 @@ -720,7 +720,7 @@ static int execute_commands(MYSQL *mysql case ADMIN_VER: new_line=1; print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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)); @@ -1118,7 +1118,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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); === modified file 'client/mysqlbinlog.cc' --- a/client/mysqlbinlog.cc 2012-07-10 09:30:08 +0000 +++ b/client/mysqlbinlog.cc 2012-08-07 13:56:51 +0000 @@ -1508,7 +1508,7 @@ static void print_version() static void usage() { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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"); === modified file 'client/mysqlcheck.c' --- a/client/mysqlcheck.c 2012-05-31 15:33:21 +0000 +++ b/client/mysqlcheck.c 2012-08-07 13:56:51 +0000 @@ -229,7 +229,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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."); === modified file 'client/mysqldump.c' --- a/client/mysqldump.c 2012-07-13 11:54:29 +0000 +++ b/client/mysqldump.c 2012-08-07 13:56:51 +0000 @@ -56,8 +56,6 @@ #include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ -#include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ - /* Exit codes */ #define EX_USAGE 1 @@ -622,7 +620,7 @@ static void short_usage_sub(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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); === modified file 'client/mysqlimport.c' --- a/client/mysqlimport.c 2012-05-31 15:33:21 +0000 +++ b/client/mysqlimport.c 2012-08-07 13:56:51 +0000 @@ -39,8 +39,6 @@ pthread_mutex_t counter_mutex; pthread_cond_t count_threshhold; #endif -#include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ - static void db_error_with_table(MYSQL *mysql, char *table); static void db_error(MYSQL *mysql); static char *field_escape(char *to,const char *from,uint length); @@ -204,7 +202,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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\ === modified file 'client/mysqlshow.c' --- a/client/mysqlshow.c 2012-05-31 15:33:21 +0000 +++ b/client/mysqlshow.c 2012-08-07 13:56:51 +0000 @@ -281,7 +281,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012)")); + 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\ === modified file 'client/mysqlslap.c' --- a/client/mysqlslap.c 2012-07-05 07:18:42 +0000 +++ b/client/mysqlslap.c 2012-08-07 13:56:51 +0000 @@ -721,7 +721,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2012")); + 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); === modified file 'client/mysqltest.cc' --- a/client/mysqltest.cc 2012-08-06 09:45:33 +0000 +++ b/client/mysqltest.cc 2012-08-07 13:56:51 +0000 @@ -6671,7 +6671,7 @@ void print_version(void) void usage() { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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); === modified file 'extra/innochecksum.cc' --- a/extra/innochecksum.cc 2012-04-16 09:14:37 +0000 +++ b/extra/innochecksum.cc 2012-08-07 13:56:51 +0000 @@ -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 @@ -35,6 +35,7 @@ # include #endif #include +#include #include /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ /* Only parts of these files are included from the InnoDB codebase. @@ -152,7 +153,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); printf("InnoDB offline file checksum utility.\n"); printf("Usage: %s [-c] [-s ] [-e ] [-p ] [-v] [-d] \n", my_progname); my_print_help(innochecksum_options); === modified file 'extra/perror.c' --- a/extra/perror.c 2012-04-16 09:14:37 +0000 +++ b/extra/perror.c 2012-08-07 13:56:51 +0000 @@ -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 @@ -84,7 +84,7 @@ static void print_version(void) static void usage(void) { print_version(); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012")); + 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); === modified file 'include/welcome_copyright_notice.h' --- a/include/welcome_copyright_notice.h 2012-03-27 10:53:19 +0000 +++ b/include/welcome_copyright_notice.h 2012-08-07 13:56:51 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2012, 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_ */ === modified file 'sql/gen_lex_hash.cc' --- a/sql/gen_lex_hash.cc 2012-04-16 09:14:37 +0000 +++ b/sql/gen_lex_hash.cc 2012-08-07 13:56:51 +0000 @@ -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 @@ -377,7 +377,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, 2012")); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("*/"); /* Broken up to indicate that it's not advice to you, gentle reader. */ === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2012-07-30 12:47:14 +0000 +++ b/sql/mysqld.cc 2012-08-07 13:56:51 +0000 @@ -7796,7 +7796,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, 2012")); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); puts("Starts the MySQL database server.\n"); printf("Usage: %s [OPTIONS]\n", my_progname); if (!opt_verbose) === modified file 'storage/perfschema/gen_pfs_lex_token.cc' --- a/storage/perfschema/gen_pfs_lex_token.cc 2012-03-27 10:53:19 +0000 +++ b/storage/perfschema/gen_pfs_lex_token.cc 2012-08-07 13:56:51 +0000 @@ -1,5 +1,5 @@ /* - 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 @@ -243,7 +243,7 @@ void print_tokens() int main(int argc,char **argv) { puts("/*"); - puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2011, 2012")); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2011")); puts("*/"); printf("/*\n"); No bundle (reason: useless for push emails).