summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 376ce0fa59d..5e1cd15eb99 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5398,8 +5398,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
@@ -5408,36 +5413,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);