Skip to content

Commit 2d6aeea

Browse files
Backport MySQL 8.0.3 support from 0.4.10 to 0.3.21
1 parent 329b63b commit 2d6aeea

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 *)StringValueCStr(value);
@@ -1182,7 +1184,10 @@ static VALUE set_ssl_options(VALUE self, VALUE key, VALUE cert, VALUE ca, VALUE
11821184
}
11831185

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

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

0 commit comments

Comments
 (0)