--- sql-common/client.c.orig 2012-05-02 18:19:52.000000000 +0200 +++ sql-common/client.c 2012-05-02 18:20:54.000000000 +0200 @@ -1618,6 +1618,7 @@ mysql->options.ssl_ca= strdup_if_not_null(ca); mysql->options.ssl_capath= strdup_if_not_null(capath); mysql->options.ssl_cipher= strdup_if_not_null(cipher); + mysql->options.use_ssl= TRUE; #endif /* HAVE_OPENSSL */ DBUG_RETURN(0); } @@ -2258,10 +2259,6 @@ client_flag|= CLIENT_MULTI_RESULTS; #ifdef HAVE_OPENSSL - if (mysql->options.ssl_key || mysql->options.ssl_cert || - mysql->options.ssl_ca || mysql->options.ssl_capath || - mysql->options.ssl_cipher) - mysql->options.use_ssl= 1; if (mysql->options.use_ssl) client_flag|=CLIENT_SSL; #endif /* HAVE_OPENSSL */