diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-11-14 13:24:29 +0100 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-11-14 13:24:29 +0100 |
commit | 22ae28d3e1d1f93f1b56f00c0201fdd82ec3f024 (patch) | |
tree | 68dbc27781ec0248212165d7516d4b9e3c515a37 /client | |
parent | 3fab29461661f677fd5ca0be75fab8bcf84eadff (diff) | |
parent | dec388d5beac2e9d0d32ce1610b871c3d1042544 (diff) | |
download | mariadb-git-22ae28d3e1d1f93f1b56f00c0201fdd82ec3f024.tar.gz |
merge from 5.5
Diffstat (limited to 'client')
-rw-r--r-- | client/CMakeLists.txt | 2 | ||||
-rw-r--r-- | client/client_priv.h | 2 | ||||
-rw-r--r-- | client/mysql.cc | 28 | ||||
-rw-r--r-- | client/mysql_upgrade.c | 5 | ||||
-rw-r--r-- | client/mysqladmin.cc | 9 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 8 | ||||
-rw-r--r-- | client/mysqlcheck.c | 20 | ||||
-rw-r--r-- | client/mysqldump.c | 7 | ||||
-rw-r--r-- | client/mysqlimport.c | 7 | ||||
-rw-r--r-- | client/mysqlshow.c | 6 | ||||
-rw-r--r-- | client/mysqlslap.c | 13 | ||||
-rw-r--r-- | client/mysqltest.cc | 41 |
12 files changed, 92 insertions, 56 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index e39e8d7178a..80c5bbd1c9f 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -72,3 +72,5 @@ ENDIF(WIN32) SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap PROPERTIES HAS_CXX TRUE) +ADD_DEFINITIONS(-DHAVE_DLOPEN) + diff --git a/client/client_priv.h b/client/client_priv.h index e7911fc31f7..1a81768adc4 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -84,6 +84,8 @@ enum options_client OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_WRITE_BINLOG, OPT_DUMP_DATE, OPT_INIT_COMMAND, + OPT_PLUGIN_DIR, + OPT_DEFAULT_PLUGIN, OPT_MAX_CLIENT_OPTION }; diff --git a/client/mysql.cc b/client/mysql.cc index b61a751198a..4a8579bbd4d 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -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 <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE #define PROMPT_CHAR '\\' #define DEFAULT_DELIMITER ";" @@ -166,6 +162,7 @@ static int wait_time = 5; static STATUS status; static ulong select_limit,max_join_size,opt_connect_timeout=0; static char mysql_charsets_dir[FN_REFLEN+1]; +static char *opt_plugin_dir= 0, *opt_default_auth; static const char *xmlmeta[] = { "&", "&", "<", "<", @@ -1176,7 +1173,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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"), INFO_INFO); #ifdef HAVE_READLINE initialize_readline((char*) my_progname); @@ -1564,6 +1561,13 @@ static struct my_option my_long_options[] = {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.", &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + (uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"default_auth", OPT_PLUGIN_DIR, + "Default authentication client-side plugin to use.", + (uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; @@ -1587,7 +1591,7 @@ static void usage(int version) if (version) return; - printf("%s", COPYRIGHT_NOTICE); + puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010")); printf("Usage: %s [OPTIONS] [database]\n", my_progname); my_print_help(my_long_options); print_defaults("my", load_default_groups); @@ -4295,9 +4299,15 @@ sql_real_connect(char *host,char *database,char *user,char *password, mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); + if (opt_plugin_dir && *opt_plugin_dir) + mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir); + + if (opt_default_auth && *opt_default_auth) + mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth); + if (!mysql_real_connect(&mysql, host, user, password, - database, opt_mysql_port, opt_mysql_unix_port, - connect_flag | CLIENT_MULTI_STATEMENTS)) + database, opt_mysql_port, opt_mysql_unix_port, + connect_flag | CLIENT_MULTI_STATEMENTS)) { if (!silent || (mysql_errno(&mysql) != CR_CONN_HOST_ERROR && diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 882350f813b..4fbf08102bd 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ + #define VER "1.1" #ifdef HAVE_SYS_WAIT_H @@ -232,6 +234,7 @@ get_one_option(int optid, const struct my_option *opt, 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, 2010")); puts("MySQL utility for upgrading databases to new MySQL versions.\n"); my_print_help(my_long_options); exit(0); diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 69381b749a1..342a67fbc29 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ #define ADMIN_VERSION "8.42" #define MAX_MYSQL_VAR 512 @@ -671,8 +672,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) 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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010")); 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 277c2d62544..226776e4404 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -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 <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE #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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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"); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index ce733e57db6..7b188d7ce18 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ /* Exit codes */ @@ -48,7 +47,7 @@ static char *shared_memory_base_name=0; #endif static uint opt_protocol=0; -enum operations { DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE }; +enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE }; static struct my_option my_long_options[] = { @@ -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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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."); @@ -244,6 +241,8 @@ static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) { + int orig_what_to_do= what_to_do; + switch(optid) { case 'a': what_to_do = DO_ANALYZE; @@ -318,6 +317,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt->name); break; } + + if (orig_what_to_do && (what_to_do != orig_what_to_do)) + { + fprintf(stderr, "Error: %s doesn't support multiple contradicting commands.\n", + my_progname); + return 1; + } return 0; } diff --git a/client/mysqldump.c b/client/mysqldump.c index ac704f152de..b47d88290a5 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ + /* 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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010")); 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 3d71e437e40..aea1cb79e74 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ + /* 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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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\ diff --git a/client/mysqlshow.c b/client/mysqlshow.c index bb05400e0d8..8cd70db1424 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ 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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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\ diff --git a/client/mysqlslap.c b/client/mysqlslap.c index e605e2d522c..4e8e4f1aa67 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -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 <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ #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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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); diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 1cc275a37be..5dc3576e759 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -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 @@ -36,6 +36,7 @@ #include "client_priv.h" #include <mysql_version.h> #include <mysqld_error.h> +#include <sql_common.h> #include <m_ctype.h> #include <my_dir.h> #include <hash.h> @@ -51,6 +52,8 @@ #include <signal.h> #include <my_stacktrace.h> +#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE + #ifdef __WIN__ #include <crtdbg.h> #define SIGNAL_FMT "exception 0x%x" @@ -191,6 +194,8 @@ static ulonglong timer_now(void); static ulong connection_retry_sleep= 100000; /* Microseconds */ +static char *opt_plugin_dir= 0; + /* Precompiled re's */ static my_regex_t ps_re; /* the query can be run using PS protocol */ static my_regex_t sp_re; /* the query can be run as a SP */ @@ -453,7 +458,7 @@ struct st_command char *query, *query_buf,*first_argument,*last_argument,*end; DYNAMIC_STRING content; int first_word_len, query_len; - my_bool abort_on_error; + my_bool abort_on_error, used_replace; struct st_expected_errors expected_errors; char require_file[FN_REFLEN]; enum enum_commands type; @@ -3442,7 +3447,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname, if (ds_wild && ds_wild->length && wild_compare(file->name, ds_wild->str, 0)) continue; - dynstr_append(ds, file->name); + replace_dynstr_append(ds, file->name); dynstr_append(ds, "\n"); } set_wild_chars(0); @@ -3472,6 +3477,7 @@ static void do_list_files(struct st_command *command) {"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"} }; DBUG_ENTER("do_list_files"); + command->used_replace= 1; check_command_args(command, command->first_argument, list_files_args, @@ -3513,6 +3519,7 @@ static void do_list_files_write_file_command(struct st_command *command, {"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"} }; DBUG_ENTER("do_list_files_write_file"); + command->used_replace= 1; check_command_args(command, command->first_argument, list_files_args, @@ -3898,13 +3905,15 @@ void do_change_user(struct st_command *command) } if (!ds_user.length) + { dynstr_set(&ds_user, mysql->user); - if (!ds_passwd.length) - dynstr_set(&ds_passwd, mysql->passwd); + if (!ds_passwd.length) + dynstr_set(&ds_passwd, mysql->passwd); - if (!ds_db.length) - dynstr_set(&ds_db, mysql->db); + if (!ds_db.length) + dynstr_set(&ds_db, mysql->db); + } DBUG_PRINT("info",("connection: '%s' user: '%s' password: '%s' database: '%s'", cur_con->name, ds_user.str, ds_passwd.str, ds_db.str)); @@ -5273,6 +5282,7 @@ void do_connect(struct st_command *command) static DYNAMIC_STRING ds_port; static DYNAMIC_STRING ds_sock; static DYNAMIC_STRING ds_options; + static DYNAMIC_STRING ds_default_auth; #ifdef HAVE_SMEM static DYNAMIC_STRING ds_shm; #endif @@ -5284,7 +5294,8 @@ void do_connect(struct st_command *command) { "database", ARG_STRING, FALSE, &ds_database, "Database to select after connect" }, { "port", ARG_STRING, FALSE, &ds_port, "Port to connect to" }, { "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with" }, - { "options", ARG_STRING, FALSE, &ds_options, "Options to use while connecting" } + { "options", ARG_STRING, FALSE, &ds_options, "Options to use while connecting" }, + { "default_auth", ARG_STRING, FALSE, &ds_default_auth, "Default authentication to use" } }; DBUG_ENTER("do_connect"); @@ -5434,6 +5445,12 @@ void do_connect(struct st_command *command) if (ds_database.length == 0) dynstr_set(&ds_database, opt_db); + if (opt_plugin_dir && *opt_plugin_dir) + mysql_options(&con_slot->mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir); + + if (ds_default_auth.length) + mysql_options(&con_slot->mysql, MYSQL_DEFAULT_AUTH, ds_default_auth.str); + /* Special database to allow one to connect without a database name */ if (ds_database.length && !strcmp(ds_database.str,"*NO-ONE*")) dynstr_set(&ds_database, ""); @@ -6356,6 +6373,9 @@ static struct my_option my_long_options[] = "Number of seconds before connection timeout.", &opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG, 120, 0, 3600 * 12, 0, 0, 0}, + {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.", + (uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0, + GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; @@ -6369,8 +6389,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(ORACLE_WELCOME_COPYRIGHT_NOTICE("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); @@ -8673,7 +8692,7 @@ int main(int argc, char **argv) memset(&saved_expected_errors, 0, sizeof(saved_expected_errors)); } - if (command_executed != last_command_executed) + if (command_executed != last_command_executed || command->used_replace) { /* As soon as any command has been executed, |