Skip to content

Commit

Permalink
WL#11092: Remove mysql_ssl_set() C API function
Browse files Browse the repository at this point in the history
Change-Id: I5c7eff31e474661b5d5e578182715a96012f8d4b
  • Loading branch information
Miroslav Rajcic committed Oct 2, 2023
1 parent 4c77cf2 commit 4788470
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
6 changes: 0 additions & 6 deletions include/mysql.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,12 +458,6 @@ const char *STDCALL mysql_character_set_name(MYSQL *mysql);
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);

MYSQL *STDCALL mysql_init(MYSQL *mysql);
#if defined(__cplusplus) && (__cplusplus >= 201402L)
[[deprecated("Use mysql_options() instead.")]]
#endif
bool STDCALL
mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca,
const char *capath, const char *cipher);
const char *STDCALL mysql_get_ssl_cipher(MYSQL *mysql);
bool STDCALL mysql_get_ssl_session_reused(MYSQL *mysql);
void *STDCALL mysql_get_ssl_session_data(MYSQL *mysql, unsigned int n_ticket,
Expand Down
3 changes: 0 additions & 3 deletions include/mysql.h.pp
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,6 @@
const char * mysql_character_set_name(MYSQL *mysql);
int mysql_set_character_set(MYSQL *mysql, const char *csname);
MYSQL * mysql_init(MYSQL *mysql);
bool
mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca,
const char *capath, const char *cipher);
const char * mysql_get_ssl_cipher(MYSQL *mysql);
bool mysql_get_ssl_session_reused(MYSQL *mysql);
void * mysql_get_ssl_session_data(MYSQL *mysql, unsigned int n_ticket,
Expand Down
1 change: 0 additions & 1 deletion libmysql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ SET(CLIENT_API_FUNCTIONS
mysql_set_local_infile_default
mysql_set_local_infile_handler
mysql_sqlstate
mysql_ssl_set
mysql_stat
mysql_stmt_affected_rows
mysql_stmt_attr_get
Expand Down
23 changes: 0 additions & 23 deletions sql-common/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3410,29 +3410,6 @@ void mysql_extension_free(MYSQL_EXTENSION *ext) {
my_free(ext);
}

/*
Fill in SSL part of MYSQL structure and set 'use_ssl' flag.
NB! Errors are not reported until you do mysql_real_connect.
*/

bool STDCALL mysql_ssl_set(MYSQL *mysql [[maybe_unused]],
const char *key [[maybe_unused]],
const char *cert [[maybe_unused]],
const char *ca [[maybe_unused]],
const char *capath [[maybe_unused]],
const char *cipher [[maybe_unused]]) {
bool result = false;
DBUG_TRACE;
result = mysql_options(mysql, MYSQL_OPT_SSL_KEY, key) +
mysql_options(mysql, MYSQL_OPT_SSL_CERT, cert) +
mysql_options(mysql, MYSQL_OPT_SSL_CA, ca) +
mysql_options(mysql, MYSQL_OPT_SSL_CAPATH, capath) +
mysql_options(mysql, MYSQL_OPT_SSL_CIPHER, cipher)
? true
: false;
return result;
}

/*
Free strings in the SSL structure and clear 'use_ssl' flag.
NB! Errors are not reported until you do mysql_real_connect.
Expand Down

1 comment on commit 4788470

@dcorking
Copy link

@dcorking dcorking commented on 4788470 Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was deleted in the current innovation release (8.3.0) just 3 months after it was deprecated (8.2.0).
I believe users were told that deprecations will give 4 releases (12 months) notice.. Is the deprecation policy more complicated than that announcement suggests>

Please sign in to comment.