Skip to content

Commit

Permalink
MYSQL_SECURE_AUTH has been removed in MySQL 8.0.3 RC (#892)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yahonda authored and sodabrew committed Nov 11, 2017
1 parent 58d0a0d commit ac34e68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/mysql2/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,12 @@ static VALUE _mysql_client_options(VALUE self, int opt, VALUE value) {
retval = &boolval;
break;

#if defined(MYSQL_SECURE_AUTH)
case MYSQL_SECURE_AUTH:
boolval = (value == Qfalse ? 0 : 1);
retval = &boolval;
break;
#endif

case MYSQL_READ_DEFAULT_FILE:
charval = (const char *)StringValueCStr(value);
Expand Down Expand Up @@ -1312,7 +1314,10 @@ static VALUE set_ssl_options(VALUE self, VALUE key, VALUE cert, VALUE ca, VALUE
}

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

static VALUE set_read_default_file(VALUE self, VALUE value) {
Expand Down

0 comments on commit ac34e68

Please sign in to comment.