Skip to content

Commit 69c741a

Browse files
committed
Define SECURE_CONNECTION to 0 if not available
1 parent fb623da commit 69c741a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/mysql2/client.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,10 @@ void init_mysql2_client() {
13781378
#ifdef CLIENT_SECURE_CONNECTION
13791379
rb_const_set(cMysql2Client, rb_intern("SECURE_CONNECTION"),
13801380
LONG2NUM(CLIENT_SECURE_CONNECTION));
1381+
#else
1382+
/* HACK because MySQL5.7 no longer defines this constant,
1383+
* but we're using it in our default connection flags. */
1384+
rb_const_set(cMysql2Client, rb_intern("SECURE_CONNECTION"), LONG2NUM(0));
13811385
#endif
13821386

13831387
#ifdef CLIENT_MULTI_STATEMENTS

0 commit comments

Comments
 (0)