Patch php5-bug64603.patch for PDO Firebird Bug #64603
Patch version 2013-09-18 05:26 UTC
Return to Bug #64603 |
Download this patch
Patch Revisions:
Developer: slavb18@gmail.com
--- ext/pdo_firebird/firebird_driver.c.orig 2013-09-16 22:19:05.000000000 +0400
+++ ext/pdo_firebird/firebird_driver.c 2013-09-16 22:24:58.000000000 +0400
@@ -544,6 +544,15 @@
}
}
/* }}} */
+/* {{{ pdo_firebird_check_liveness */
+static int pdo_firebird_check_liveness(pdo_dbh_t *dbh TSRMLS_DC)
+{
+ pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
+ char db_items[] = {isc_info_page_size,isc_info_end};
+ char res_buffer[10];
+ return isc_database_info(H->isc_status,&H->db,sizeof (db_items),db_items,sizeof (res_buffer),res_buffer) && H->isc_status[0] == 1?FAILURE:SUCCESS;
+}
+/* }}} */
/* called by PDO to get a driver-specific dbh attribute */
static int firebird_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) /* {{{ */
@@ -639,7 +648,7 @@
NULL, /* last_id not supported */
pdo_firebird_fetch_error_func,
firebird_handle_get_attribute,
- NULL /* check_liveness */
+ pdo_firebird_check_liveness
};
/* }}} */
|