summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc3
-rw-r--r--client/mysqladmin.c8
-rw-r--r--client/mysqlcheck.c12
-rw-r--r--client/mysqldump.c8
-rw-r--r--client/mysqlimport.c8
-rw-r--r--client/mysqlshow.c14
6 files changed, 19 insertions, 34 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index eaf80a1014e..ec5eb01d0e7 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2209,9 +2209,6 @@ sql_real_connect(char *host,char *database,char *user,char *password,
if (using_opt_local_infile)
mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
#ifdef HAVE_OPENSSL
- if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
- opt_ssl_cipher)
- opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index cdca59574f7..01e36509c30 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -52,7 +52,7 @@ static uint ex_val_max_len[MAX_MYSQL_VAR];
static my_bool ex_status_printed = 0; /* First output is not relative. */
static uint ex_var_count, max_var_length, max_val_length;
-#include "sslopt-vars.h"
+#include <sslopt-vars.h>
static void print_version(void);
static void usage(void);
@@ -150,7 +150,7 @@ static struct my_option my_long_options[] =
{"sleep", 'i', "Execute commands again and again with a sleep between.",
(gptr*) &interval, (gptr*) &interval, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0,
0, 0},
-#include "sslopt-longopts.h"
+#include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &user,
(gptr*) &user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -211,6 +211,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '#':
DBUG_PUSH(argument ? argument : "d:t:o,/tmp/mysqladmin.trace");
break;
+#include <sslopt-case.h>
case 'V':
print_version();
exit(0);
@@ -279,9 +280,6 @@ int main(int argc,char *argv[])
mysql_options(&mysql,MYSQL_OPT_CONNECT_TIMEOUT, (char*) &tmp);
}
#ifdef HAVE_OPENSSL
- if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
- opt_ssl_cipher)
- opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 91405a784ea..394555f37a9 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -20,9 +20,9 @@
#include "client_priv.h"
#include <m_ctype.h>
-#include "mysql_version.h"
-#include "mysqld_error.h"
-#include "sslopt-vars.h"
+#include <mysql_version.h>
+#include <mysqld_error.h>
+#include <sslopt-vars.h>
/* Exit codes */
@@ -121,7 +121,7 @@ static struct my_option my_long_options[] =
{"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#include "sslopt-longopts.h"
+#include <sslopt-longopts.h>
{"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DONT_ALLOW_USER_CHANGE
@@ -239,6 +239,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
break;
+#include <sslopt-case.h>
case OPT_TABLES:
opt_databases = 0;
break;
@@ -529,9 +530,6 @@ static int dbConnect(char *host, char *user, char *passwd)
if (opt_compress)
mysql_options(&mysql_connection, MYSQL_OPT_COMPRESS, NullS);
#ifdef HAVE_OPENSSL
- if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
- opt_ssl_cipher)
- opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 6a26f4167f7..612746c205b 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -88,7 +88,7 @@ static my_string opt_mysql_unix_port=0;
static int first_error=0;
extern ulong net_buffer_length;
static DYNAMIC_STRING extended_row;
-#include "sslopt-vars.h"
+#include <sslopt-vars.h>
FILE *md_result_file;
static struct my_option my_long_options[] =
@@ -211,7 +211,7 @@ static struct my_option my_long_options[] =
{"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#include "sslopt-longopts.h"
+#include <sslopt-longopts.h>
{"tab",'T',
"Creates tab separated textfile for each table to given path. (creates .sql and .txt files). NOTE: This only works if mysqldump is run on the same machine as the mysqld daemon.",
(gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -335,6 +335,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
break;
+#include <sslopt-case.h>
case 'V': print_version(); exit(0);
case 'X':
opt_xml = 1;
@@ -457,9 +458,6 @@ static int dbConnect(char *host, char *user,char *passwd)
if (opt_compress)
mysql_options(&mysql_connection,MYSQL_OPT_COMPRESS,NullS);
#ifdef HAVE_OPENSSL
- if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
- opt_ssl_cipher)
- opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 603e9036106..a11b7383517 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -47,7 +47,7 @@ static char *opt_password=0, *current_user=0,
static uint opt_mysql_port=0;
static my_string opt_mysql_unix_port=0;
static my_string opt_ignore_lines=0;
-#include "sslopt-vars.h"
+#include <sslopt-vars.h>
static struct my_option my_long_options[] =
{
@@ -119,7 +119,7 @@ static struct my_option my_long_options[] =
{"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#include "sslopt-longopts.h"
+#include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &current_user,
(gptr*) &current_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -188,6 +188,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
break;
+#include <sslopt-case.h>
case 'V': print_version(); exit(0);
case 'I':
case '?':
@@ -347,9 +348,6 @@ static MYSQL *db_connect(char *host, char *database, char *user, char *passwd)
mysql_options(&mysql_connection,MYSQL_OPT_LOCAL_INFILE,
(char*) &opt_local_file);
#ifdef HAVE_OPENSSL
- if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
- opt_ssl_cipher)
- opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index 718716b60be..5475fc7b531 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -18,16 +18,14 @@
#define SHOW_VERSION "9.4"
-#include <my_global.h>
#include "client_priv.h"
#include <my_sys.h>
#include <m_string.h>
-#include "mysql.h"
-#include "mysql_version.h"
-#include "mysqld_error.h"
+#include <mysql.h>
+#include <mysqld_error.h>
#include <signal.h>
#include <stdarg.h>
-#include "sslopt-vars.h"
+#include <sslopt-vars.h>
static my_string host=0,opt_password=0,user=0;
static my_bool opt_show_keys=0,opt_compress=0,opt_status=0, tty_password=0;
@@ -85,9 +83,6 @@ int main(int argc, char **argv)
if (opt_compress)
mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS);
#ifdef HAVE_OPENSSL
- if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
- opt_ssl_cipher)
- opt_use_ssl= 1;
if (opt_use_ssl)
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher);
@@ -156,7 +151,7 @@ static struct my_option my_long_options[] =
{"socket", 'S', "Socket file to use for connection.",
(gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#include "sslopt-longopts.h"
+#include <sslopt-longopts.h>
#ifndef DONT_ALLOW_USER_CHANGE
{"user", 'u', "User for login if not current user.", (gptr*) &user,
(gptr*) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -224,6 +219,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
break;
+#include <sslopt-case.h>
case 'V':
print_version();
exit(0);