Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pdo_firebird] Added pdo_firebird_check_liveness #12757

Merged
merged 2 commits into from Dec 20, 2023

Conversation

SakiTakamachi
Copy link
Member

@SakiTakamachi SakiTakamachi commented Nov 23, 2023

Added liveness check function for persistent connections.

todo:

  • add test

@SakiTakamachi SakiTakamachi force-pushed the pdo-firebird-liveness branch 2 times, most recently from 28d8d6d to e34305d Compare November 23, 2023 23:47
@SakiTakamachi SakiTakamachi force-pushed the pdo-firebird-liveness branch 2 times, most recently from 6f5e79d to 7cb0aba Compare December 15, 2023 14:18
@SakiTakamachi SakiTakamachi changed the title [WIP] add pdo_firebird_check_liveness [pdo_firebird] Added pdo_firebird_check_liveness Dec 15, 2023
Comment on lines +1219 to +1229
#if FB_API_VER >= 30
/* called by PDO to check liveness */
static zend_result pdo_firebird_check_liveness(pdo_dbh_t *dbh) /* {{{ */
{
pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;

/* fb_ping return 0 if the connection is alive */
return fb_ping(H->isc_status, &H->db) ? FAILURE : SUCCESS;
}
/* }}} */
#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I downloaded the source from the following list and checked the included ibase.h:
https://firebirdsql.org/en/discontinued-versions/

It turns out that this feature was introduced since v3.0.

@SakiTakamachi SakiTakamachi marked this pull request as ready for review December 15, 2023 15:07
@SakiTakamachi
Copy link
Member Author

@Girgias
Could you please take a look when you have time?

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :) Maybe an upgrading entry?

@SakiTakamachi
Copy link
Member Author

Thank you for checking! Please wait a moment.

@SakiTakamachi
Copy link
Member Author

Added to UPGRADING!

@Girgias Girgias merged commit 5dfb2d9 into php:master Dec 20, 2023
1 of 2 checks passed
@Girgias
Copy link
Member

Girgias commented Dec 20, 2023

Thank you!

@SakiTakamachi SakiTakamachi deleted the pdo-firebird-liveness branch December 21, 2023 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants