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 {
121121static VALUE rb_set_ssl_mode_option (VALUE self , VALUE setting ) {
122122 unsigned long version = mysql_get_client_version ();
123123
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+ " );
126126 return Qnil ;
127127 }
128128#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() {
17231723 rb_const_set (cMysql2Client , rb_intern ("SESSION_TRACK_TRANSACTION_STATE" ), INT2NUM (SESSION_TRACK_TRANSACTION_STATE ));
17241724#endif
17251725
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
17271727 rb_const_set (cMysql2Client , rb_intern ("SSL_MODE_DISABLED" ), INT2NUM (SSL_MODE_DISABLED ));
17281728 rb_const_set (cMysql2Client , rb_intern ("SSL_MODE_PREFERRED" ), INT2NUM (SSL_MODE_PREFERRED ));
17291729 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) {
143143 return memsize ;
144144}
145145
146+ #ifdef HAVE_RB_GC_MARK_MOVABLE
146147static void rb_mysql_result_compact (void * wrapper ) {
147148 mysql2_result_wrapper * w = wrapper ;
148149 if (w ) {
@@ -153,6 +154,7 @@ static void rb_mysql_result_compact(void * wrapper) {
153154 rb_mysql2_gc_location (w -> statement );
154155 }
155156}
157+ #endif
156158
157159static const rb_data_type_t rb_mysql_result_type = {
158160 "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) {
3333 return sizeof (* stmt_wrapper );
3434}
3535
36+ #ifdef HAVE_RB_GC_MARK_MOVABLE
3637static void rb_mysql_stmt_compact (void * ptr ) {
3738 mysql_stmt_wrapper * stmt_wrapper = ptr ;
3839 if (!stmt_wrapper ) return ;
3940
4041 rb_mysql2_gc_location (stmt_wrapper -> client );
4142}
43+ #endif
4244
4345static const rb_data_type_t rb_mysql_statement_type = {
4446 "rb_mysql_statement" ,
You can’t perform that action at this time.
0 commit comments