diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-03-12 12:51:53 +0300 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-03-12 12:51:53 +0300 |
commit | dbbdc4b19691711c82e42c4def5f5325759524c4 (patch) | |
tree | 1d8062b6d5a8ab72361ee3021277a00ca8c6acf1 /client | |
parent | 6e7b8b6a7ab2b58016403304b1c49cf908a6479d (diff) | |
parent | b182c9bd2030c3b3c548157d1bc4c01c306b2c5c (diff) | |
download | mariadb-git-dbbdc4b19691711c82e42c4def5f5325759524c4.tar.gz |
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:
Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/r/explain.result
Text conflict in mysql-test/r/subselect.result
Text conflict in mysql-test/r/subselect3.result
Text conflict in mysql-test/r/type_datetime.result
Text conflict in sql/share/Makefile.am
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 20 | ||||
-rw-r--r-- | client/mysql_upgrade.c | 5 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 9 | ||||
-rw-r--r-- | client/mysqltest.cc | 2 |
4 files changed, 22 insertions, 14 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 9c82f7850c8..3102204b4ad 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2008 MySQL AB +/* Copyright 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,6 +13,11 @@ 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 * @@ -1167,6 +1172,8 @@ 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); + #ifdef HAVE_READLINE initialize_readline((char*) my_progname); if (!status.batch && !quick && !opt_html && !opt_xml) @@ -1209,13 +1216,11 @@ int main(int argc,char *argv[]) sprintf(histfile_tmp, "%s.TMP", histfile); } } + #endif + sprintf(buff, "%s", -#ifndef NOT_YET "Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n"); -#else - "Type 'help [[%]function name[%]]' to get help on usage of function.\n"); -#endif put_info(buff,INFO_INFO); status.exit_status= read_and_execute(!status.batch); if (opt_outfile) @@ -1573,10 +1578,7 @@ static void usage(int version) if (version) return; - printf("\ -Copyright 2000-2008 MySQL AB, 2008 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"); + printf("%s", COPYRIGHT_NOTICE); 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 8c3549f1d94..9797b4f5650 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -45,7 +45,7 @@ static DYNAMIC_STRING conn_args; static char *opt_password= 0; static my_bool tty_password= 0; -static char opt_tmpdir[FN_REFLEN]; +static char opt_tmpdir[FN_REFLEN] = ""; #ifndef DBUG_OFF static char *default_dbug_option= (char*) "d:t:O,/tmp/mysql_upgrade.trace"; @@ -464,7 +464,8 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res, DBUG_ENTER("run_query"); DBUG_PRINT("enter", ("query: %s", query)); - if ((fd= create_temp_file(query_file_path, opt_tmpdir, + if ((fd= create_temp_file(query_file_path, + opt_tmpdir[0] ? opt_tmpdir : NULL, "sql", O_CREAT | O_SHARE | O_RDWR, MYF(MY_WME))) < 0) die("Failed to create temporary file for defaults"); diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 02bfca63b38..aa3d3e0e007 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -832,7 +832,11 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, print_event_info->common_header_len= glob_description_event->common_header_len; ev->print(result_file, print_event_info); - ev->temp_buf= 0; // as the event ref is zeroed + if (!remote_opt) + ev->free_temp_buf(); // free memory allocated in dump_local_log_entries + else + // disassociate but not free dump_remote_log_entries time memory + ev->temp_buf= 0; /* We don't want this event to be deleted now, so let's hide it (I (Guilhem) should later see if this triggers a non-serious Valgrind @@ -2018,7 +2022,8 @@ int main(int argc, char** argv) my_init_time(); // for time functions - load_defaults("my", load_default_groups, &argc, &argv); + if (load_defaults("my", load_default_groups, &argc, &argv)) + exit(1); defaults_argv= argv; parse_args(&argc, (char***)&argv); diff --git a/client/mysqltest.cc b/client/mysqltest.cc index d19f03af5f2..628bfda1e29 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -1245,7 +1245,7 @@ void die(const char *fmt, ...) Help debugging by displaying any warnings that might have been produced prior to the error */ - if (cur_con) + if (cur_con && !cur_con->pending) show_warnings_before_error(&cur_con->mysql); cleanup_and_exit(1); |