Skip to content

Commit 804f71d

Browse files
committed
Add ifdef for ER_CLIENT_INTERACTION_TIMEOUT
As `ER_CLIENT_INTERACTION_TIMEOUT` was introduced in 8.0.24 this was breaking compilation with earlier versions of 8.0 (e.g. 8.0.22)
1 parent 43be0c2 commit 804f71d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dbdimp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4463,8 +4463,10 @@ int mysql_db_reconnect(SV* h)
44634463
}
44644464

44654465
if (mysql_errno(imp_dbh->pmysql) != CR_SERVER_GONE_ERROR &&
4466-
mysql_errno(imp_dbh->pmysql) != CR_SERVER_LOST &&
4467-
mysql_errno(imp_dbh->pmysql) != ER_CLIENT_INTERACTION_TIMEOUT) {
4466+
#ifdef ER_CLIENT_INTERACTION_TIMEOUT /* Added in 8.0.24 */
4467+
mysql_errno(imp_dbh->pmysql) != ER_CLIENT_INTERACTION_TIMEOUT &&
4468+
#endif
4469+
mysql_errno(imp_dbh->pmysql) != CR_SERVER_LOST) {
44684470
/* Other error */
44694471
if (DBIc_DBISTATE(imp_xxh)->debug >= 2)
44704472
PerlIO_printf(DBIc_LOGPIO(imp_xxh), "Can't reconnect on unexpected error %d\n",

0 commit comments

Comments
 (0)