Skip to content

Commit 1659af7

Browse files
yahondakratob
authored andcommitted
MYSQL_SECURE_AUTH has been removed in MySQL 8.0.3 RC (brianmario#892)
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-3.html#mysqld-8-0-3-capi > The deprecated secure_auth system variable and --secure-auth client option have been removed. > The MYSQL_SECURE_AUTH option for the mysql_options() C API function was removed.
1 parent 499c7c4 commit 1659af7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/mysql2/client.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,10 +794,12 @@ static VALUE _mysql_client_options(VALUE self, int opt, VALUE value) {
794794
retval = &boolval;
795795
break;
796796

797+
#if defined(MYSQL_SECURE_AUTH)
797798
case MYSQL_SECURE_AUTH:
798799
boolval = (value == Qfalse ? 0 : 1);
799800
retval = &boolval;
800801
break;
802+
#endif
801803

802804
case MYSQL_READ_DEFAULT_FILE:
803805
charval = (const char *)StringValuePtr(value);
@@ -1193,7 +1195,10 @@ static VALUE set_ssl_options(VALUE self, VALUE key, VALUE cert, VALUE ca, VALUE
11931195
}
11941196

11951197
static VALUE set_secure_auth(VALUE self, VALUE value) {
1198+
/* This option was deprecated in MySQL 5.x and removed in MySQL 8.0 */
1199+
#if defined(MYSQL_SECURE_AUTH)
11961200
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
1201+
#endif
11971202
}
11981203

11991204
static VALUE set_read_default_file(VALUE self, VALUE value) {

0 commit comments

Comments
 (0)