summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc15
-rw-r--r--client/mysqlbinlog.cc16
-rw-r--r--client/mysqltest.cc22
-rw-r--r--client/sql_string.h10
4 files changed, 43 insertions, 20 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 4a8579bbd4d..51c8b34b0a8 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -3739,7 +3739,8 @@ print_tab_data(MYSQL_RES *result)
}
static int
-com_tee(String *buffer, char *line __attribute__((unused)))
+com_tee(String *buffer __attribute__((unused)),
+ char *line __attribute__((unused)))
{
char file_name[FN_REFLEN], *end, *param;
@@ -3798,7 +3799,8 @@ com_notee(String *buffer __attribute__((unused)),
#ifdef USE_POPEN
static int
-com_pager(String *buffer, char *line __attribute__((unused)))
+com_pager(String *buffer __attribute__((unused)),
+ char *line __attribute__((unused)))
{
char pager_name[FN_REFLEN], *end, *param;
@@ -3923,7 +3925,8 @@ com_rehash(String *buffer __attribute__((unused)),
#ifdef USE_POPEN
static int
-com_shell(String *buffer, char *line __attribute__((unused)))
+com_shell(String *buffer __attribute__((unused)),
+ char *line __attribute__((unused)))
{
char *shell_cmd;
@@ -4015,7 +4018,8 @@ com_connect(String *buffer, char *line)
}
-static int com_source(String *buffer, char *line)
+static int com_source(String *buffer __attribute__((unused)),
+ char *line)
{
char source_name[FN_REFLEN], *end, *param;
LINE_BUFFER *line_buff;
@@ -4929,7 +4933,8 @@ static void init_username()
}
}
-static int com_prompt(String *buffer, char *line)
+static int com_prompt(String *buffer __attribute__((unused)),
+ char *line)
{
char *ptr=strchr(line, ' ');
prompt_counter = 0;
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 226776e4404..bf4920c6f77 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1010,10 +1010,11 @@ static struct my_option my_long_options[] =
"row-based events; 'decode-rows' decodes row events into commented SQL "
"statements if the --verbose option is also given; 'auto' prints base64 "
"only when necessary (i.e., for row-based events and format description "
- "events); 'always' prints base64 whenever possible. 'always' is for "
- "debugging only and should not be used in a production system. If this "
- "argument is not given, the default is 'auto'; if it is given with no "
- "argument, 'always' is used.",
+ "events); 'always' prints base64 whenever possible. 'always' is "
+ "deprecated, will be removed in a future version, and should not be used "
+ "in a production system. --base64-output with no 'name' argument is "
+ "equivalent to --base64-output=always and is also deprecated. If no "
+ "--base64-output[=name] option is given at all, the default is 'auto'.",
&opt_base64_output_mode_str, &opt_base64_output_mode_str,
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
/*
@@ -2024,6 +2025,13 @@ int main(int argc, char** argv)
if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC)
opt_base64_output_mode= BASE64_OUTPUT_AUTO;
+ if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
+ warning("The --base64-output=always flag and the --base64-output flag "
+ "(with '=MODE' omitted), are deprecated. "
+ "The output generated when these flags are used cannot be "
+ "parsed by mysql 5.6.0 and later. "
+ "The flags will be removed in a future version. "
+ "Please use --base64-output=auto instead.");
my_set_max_open_files(open_files_limit);
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 459abf8ffe1..f413931c5a2 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5403,8 +5403,13 @@ void do_connect(struct st_command *command)
opt_charsets_dir);
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
- if (opt_use_ssl || con_ssl)
+ if (opt_use_ssl)
+ con_ssl= 1;
+#endif
+
+ if (con_ssl)
{
+#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
#if MYSQL_VERSION_ID >= 50000
@@ -5413,36 +5418,37 @@ void do_connect(struct st_command *command)
mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
&opt_ssl_verify_server_cert);
#endif
- }
#endif
+ }
-#ifdef __WIN__
if (con_pipe)
{
+#ifdef __WIN__
opt_protocol= MYSQL_PROTOCOL_PIPE;
- }
#endif
+ }
if (opt_protocol)
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
-#ifdef HAVE_SMEM
if (con_shm)
{
+#ifdef HAVE_SMEM
uint protocol= MYSQL_PROTOCOL_MEMORY;
if (!ds_shm.length)
die("Missing shared memory base name");
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
+#endif
}
- else if(shared_memory_base_name)
+#ifdef HAVE_SMEM
+ else if (shared_memory_base_name)
{
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
- shared_memory_base_name);
+ shared_memory_base_name);
}
#endif
-
/* Use default db name */
if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db);
diff --git a/client/sql_string.h b/client/sql_string.h
index bafc287c73e..f406da28995 100644
--- a/client/sql_string.h
+++ b/client/sql_string.h
@@ -69,9 +69,13 @@ public:
}
static void *operator new(size_t size, MEM_ROOT *mem_root)
{ return (void*) alloc_root(mem_root, (uint) size); }
- static void operator delete(void *ptr_arg,size_t size)
- { TRASH(ptr_arg, size); }
- static void operator delete(void *ptr_arg, MEM_ROOT *mem_root)
+ static void operator delete(void *ptr_arg, size_t size)
+ {
+ (void) ptr_arg;
+ (void) size;
+ TRASH(ptr_arg, size);
+ }
+ static void operator delete(void *, MEM_ROOT *)
{ /* never called */ }
~String() { free(); }