File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1589,19 +1589,19 @@ void init_mysql2_client() {
1589
1589
void rb_mysql_set_server_query_flags (MYSQL * client , VALUE result ) {
1590
1590
VALUE server_flags = rb_hash_new ();
1591
1591
1592
- #ifdef SERVER_QUERY_NO_GOOD_INDEX_USED
1592
+ #ifdef HAVE_CONST_SERVER_QUERY_NO_GOOD_INDEX_USED
1593
1593
rb_hash_aset (server_flags , sym_no_good_index_used , flag_to_bool (SERVER_QUERY_NO_GOOD_INDEX_USED ));
1594
1594
#else
1595
1595
rb_hash_aset (server_flags , sym_no_good_index_used , Qnil );
1596
1596
#endif
1597
1597
1598
- #ifdef SERVER_QUERY_NO_INDEX_USED
1598
+ #ifdef HAVE_CONST_SERVER_QUERY_NO_INDEX_USED
1599
1599
rb_hash_aset (server_flags , sym_no_index_used , flag_to_bool (SERVER_QUERY_NO_INDEX_USED ));
1600
1600
#else
1601
1601
rb_hash_aset (server_flags , sym_no_index_used , Qnil );
1602
1602
#endif
1603
1603
1604
- #ifdef SERVER_QUERY_WAS_SLOW
1604
+ #ifdef HAVE_CONST_SERVER_QUERY_WAS_SLOW
1605
1605
rb_hash_aset (server_flags , sym_query_was_slow , flag_to_bool (SERVER_QUERY_WAS_SLOW ));
1606
1606
#else
1607
1607
rb_hash_aset (server_flags , sym_query_was_slow , Qnil );
Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ def add_ssl_defines(header)
110
110
add_ssl_defines ( mysql_h )
111
111
have_struct_member ( 'MYSQL' , 'net.vio' , mysql_h )
112
112
have_struct_member ( 'MYSQL' , 'net.pvio' , mysql_h )
113
+ # These constants are actually enums, so they cannot be detected by #ifdef in C code.
113
114
have_const ( 'MYSQL_ENABLE_CLEARTEXT_PLUGIN' , mysql_h )
115
+ have_const ( 'SERVER_QUERY_NO_GOOD_INDEX_USED' , mysql_h )
116
+ have_const ( 'SERVER_QUERY_NO_INDEX_USED' , mysql_h )
117
+ have_const ( 'SERVER_QUERY_WAS_SLOW' , mysql_h )
114
118
have_const ( 'MYSQL_OPT_CONNECT_ATTR_ADD' , mysql_h ) # for mysql_options4
115
119
116
120
# This is our wishlist. We use whichever flags work on the host.
You can’t perform that action at this time.
0 commit comments