File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,8 @@ struct nogvl_select_db_args {
121
121
static VALUE rb_set_ssl_mode_option (VALUE self , VALUE setting ) {
122
122
unsigned long version = mysql_get_client_version ();
123
123
124
- if (version < 50703 ) {
125
- rb_warn ( "Your mysql client library does not support setting ssl_mode; full support comes with 5.7.11. " );
124
+ if (version < 50630 || ( version >= 50700 && version < 50703 ) ) {
125
+ rb_warn ( "Your mysql client library does not support setting ssl_mode; full support comes with 5.6.36+, 5. 7.11+, 8.0+ " );
126
126
return Qnil ;
127
127
}
128
128
#if defined(HAVE_CONST_MYSQL_OPT_SSL_VERIFY_SERVER_CERT ) || defined(HAVE_CONST_MYSQL_OPT_SSL_ENFORCE )
@@ -1723,7 +1723,7 @@ void init_mysql2_client() {
1723
1723
rb_const_set (cMysql2Client , rb_intern ("SESSION_TRACK_TRANSACTION_STATE" ), INT2NUM (SESSION_TRACK_TRANSACTION_STATE ));
1724
1724
#endif
1725
1725
1726
- #if defined(FULL_SSL_MODE_SUPPORT ) // MySQL 5.7.11 and above
1726
+ #if defined(FULL_SSL_MODE_SUPPORT ) // MySQL 5.6.36 and MySQL 5. 7.11 and above
1727
1727
rb_const_set (cMysql2Client , rb_intern ("SSL_MODE_DISABLED" ), INT2NUM (SSL_MODE_DISABLED ));
1728
1728
rb_const_set (cMysql2Client , rb_intern ("SSL_MODE_PREFERRED" ), INT2NUM (SSL_MODE_PREFERRED ));
1729
1729
rb_const_set (cMysql2Client , rb_intern ("SSL_MODE_REQUIRED" ), INT2NUM (SSL_MODE_REQUIRED ));
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ static size_t rb_mysql_result_memsize(const void * wrapper) {
143
143
return memsize ;
144
144
}
145
145
146
+ #ifdef HAVE_RB_GC_MARK_MOVABLE
146
147
static void rb_mysql_result_compact (void * wrapper ) {
147
148
mysql2_result_wrapper * w = wrapper ;
148
149
if (w ) {
@@ -153,6 +154,7 @@ static void rb_mysql_result_compact(void * wrapper) {
153
154
rb_mysql2_gc_location (w -> statement );
154
155
}
155
156
}
157
+ #endif
156
158
157
159
static const rb_data_type_t rb_mysql_result_type = {
158
160
"rb_mysql_result" ,
Original file line number Diff line number Diff line change @@ -33,12 +33,14 @@ static size_t rb_mysql_stmt_memsize(const void * ptr) {
33
33
return sizeof (* stmt_wrapper );
34
34
}
35
35
36
+ #ifdef HAVE_RB_GC_MARK_MOVABLE
36
37
static void rb_mysql_stmt_compact (void * ptr ) {
37
38
mysql_stmt_wrapper * stmt_wrapper = ptr ;
38
39
if (!stmt_wrapper ) return ;
39
40
40
41
rb_mysql2_gc_location (stmt_wrapper -> client );
41
42
}
43
+ #endif
42
44
43
45
static const rb_data_type_t rb_mysql_statement_type = {
44
46
"rb_mysql_statement" ,
You can’t perform that action at this time.
0 commit comments