diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-20 17:02:59 -0200 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-20 17:02:59 -0200 |
commit | 6997cff45975168618f387e380a3ce62ac93bc8d (patch) | |
tree | 8b9671ed7e4c19f1f97d8f8347422f15f2432a03 /client | |
parent | dc0412d5899538c89a2922406168a5e70ddbceb5 (diff) | |
parent | 3e9c52250a3ab6664c53ea6b3923acfbe8e09e4e (diff) | |
download | mariadb-git-6997cff45975168618f387e380a3ce62ac93bc8d.tar.gz |
Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 22 |
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); |