|
1 | 1 | /* |
2 | | - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. |
| 2 | + Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. |
3 | 3 |
|
4 | 4 | This program is free software; you can redistribute it and/or modify |
5 | 5 | it under the terms of the GNU General Public License as published by |
@@ -1486,8 +1486,9 @@ sig_handler handle_kill_signal(int sig) |
1486 | 1486 | mysql_options(kill_mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0); |
1487 | 1487 | mysql_options4(kill_mysql, MYSQL_OPT_CONNECT_ATTR_ADD, |
1488 | 1488 | "program_name", "mysql"); |
1489 | | - if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password, |
1490 | | - "", opt_mysql_port, opt_mysql_unix_port,0)) |
| 1489 | + if (!mysql_connect_ssl_check(kill_mysql, current_host, current_user, |
| 1490 | + opt_password, "", opt_mysql_port, |
| 1491 | + opt_mysql_unix_port, 0, opt_ssl_required)) |
1491 | 1492 | { |
1492 | 1493 | tee_fprintf(stdout, "%s -- sorry, cannot connect to server to kill query, giving up ...\n", reason); |
1493 | 1494 | goto err; |
@@ -4815,9 +4816,10 @@ sql_real_connect(char *host,char *database,char *user,char *password, |
4815 | 4816 | "program_name", "mysql"); |
4816 | 4817 | mysql_options(&mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, &handle_expired); |
4817 | 4818 |
|
4818 | | - if (!mysql_real_connect(&mysql, host, user, password, |
4819 | | - database, opt_mysql_port, opt_mysql_unix_port, |
4820 | | - connect_flag | CLIENT_MULTI_STATEMENTS)) |
| 4819 | + if (!mysql_connect_ssl_check(&mysql, host, user, password, |
| 4820 | + database, opt_mysql_port, opt_mysql_unix_port, |
| 4821 | + connect_flag | CLIENT_MULTI_STATEMENTS, |
| 4822 | + opt_ssl_required)) |
4821 | 4823 | { |
4822 | 4824 | if (!silent || |
4823 | 4825 | (mysql_errno(&mysql) != CR_CONN_HOST_ERROR && |
|
0 commit comments