Lines Matching refs:ib_link

552 	zval *link_id, ibase_db_link **ib_link, ibase_trans **trans)  in _php_ibase_get_link_trans()  argument
565 *ib_link = (*trans)->db_link[0]; in _php_ibase_get_link_trans()
571 *ib_link = (ibase_db_link *)zend_fetch_resource2_ex(link_id, LE_LINK, le_link, le_plink); in _php_ibase_get_link_trans()
893 ibase_db_link *ib_link; in _php_ibase_connect() local
966 ib_link = (ibase_db_link *) le->ptr; in _php_ibase_connect()
967 if (!isc_database_info(status, &ib_link->handle, sizeof(info), info, sizeof(result), result)) { in _php_ibase_connect()
968 RETVAL_RES(zend_register_resource(ib_link, le_plink)); in _php_ibase_connect()
988 ib_link = (ibase_db_link *) emalloc(sizeof(ibase_db_link)); in _php_ibase_connect()
989 RETVAL_RES(zend_register_resource(ib_link, le_link)); in _php_ibase_connect()
993 ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link)); in _php_ibase_connect()
994 if (!ib_link) { in _php_ibase_connect()
1000 new_le.ptr = ib_link; in _php_ibase_connect()
1003 free(ib_link); in _php_ibase_connect()
1006 RETVAL_RES(zend_register_resource(ib_link, le_plink)); in _php_ibase_connect()
1009 ib_link->handle = db_handle; in _php_ibase_connect()
1010 ib_link->dialect = largs[DLECT] ? (unsigned short)largs[DLECT] : SQL_DIALECT_CURRENT; in _php_ibase_connect()
1011 ib_link->tr_list = NULL; in _php_ibase_connect()
1012 ib_link->event_head = NULL; in _php_ibase_connect()
1085 ibase_db_link *ib_link; in PHP_FUNCTION() local
1103 ib_link = (ibase_db_link *)zend_fetch_resource2(link_res, LE_LINK, le_link, le_plink); in PHP_FUNCTION()
1105 if (!ib_link) { in PHP_FUNCTION()
1109 if (isc_drop_database(IB_STATUS, &ib_link->handle)) { in PHP_FUNCTION()
1115 for (l = ib_link->tr_list; l != NULL; l = l->next) { in PHP_FUNCTION()
1135 ibase_db_link **ib_link = NULL; in PHP_FUNCTION() local
1145 ib_link = (ibase_db_link **) safe_emalloc(sizeof(ibase_db_link *),1+argn,0); in PHP_FUNCTION()
1154 efree(ib_link); in PHP_FUNCTION()
1167 …if ((ib_link[link_cnt] = (ibase_db_link *)zend_fetch_resource2_ex(&args[i], LE_LINK, le_link, le_p… in PHP_FUNCTION()
1170 efree(ib_link); in PHP_FUNCTION()
1178 teb[link_cnt].db_ptr = &ib_link[link_cnt]->handle; in PHP_FUNCTION()
1235 …if ((ib_link[0] = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_pl… in PHP_FUNCTION()
1236 efree(ib_link); in PHP_FUNCTION()
1239 result = isc_start_transaction(IB_STATUS, &tr_handle, 1, &ib_link[0]->handle, tpb_len, last_tpb); in PHP_FUNCTION()
1245 efree(ib_link); in PHP_FUNCTION()
1256 ib_trans->db_link[i] = ib_link[i]; in PHP_FUNCTION()
1259 if (ib_link[i]->tr_list == NULL) { in PHP_FUNCTION()
1260 ib_link[i]->tr_list = (ibase_tr_list *) emalloc(sizeof(ibase_tr_list)); in PHP_FUNCTION()
1261 ib_link[i]->tr_list->trans = NULL; in PHP_FUNCTION()
1262 ib_link[i]->tr_list->next = NULL; in PHP_FUNCTION()
1266 for (l = &ib_link[i]->tr_list; *l != NULL; l = &(*l)->next); in PHP_FUNCTION()
1271 efree(ib_link); in PHP_FUNCTION()
1277 int _php_ibase_def_trans(ibase_db_link *ib_link, ibase_trans **trans) /* {{{ */ in _php_ibase_def_trans() argument
1279 if (ib_link == NULL) { in _php_ibase_def_trans()
1285 if (ib_link->tr_list == NULL) { in _php_ibase_def_trans()
1286 ib_link->tr_list = (ibase_tr_list *) emalloc(sizeof(ibase_tr_list)); in _php_ibase_def_trans()
1287 ib_link->tr_list->trans = NULL; in _php_ibase_def_trans()
1288 ib_link->tr_list->next = NULL; in _php_ibase_def_trans()
1292 ibase_trans *tr = ib_link->tr_list->trans; in _php_ibase_def_trans()
1299 tr->db_link[0] = ib_link; in _php_ibase_def_trans()
1300 ib_link->tr_list->trans = tr; in _php_ibase_def_trans()
1303 if (isc_start_transaction(IB_STATUS, &tr->handle, 1, &ib_link->handle, 0, NULL)) { in _php_ibase_def_trans()
1319 ibase_db_link *ib_link; in _php_ibase_trans_end() local
1329 ib_link = (ibase_db_link *)zend_fetch_resource2(IBG(default_link), LE_LINK, le_link, le_plink); in _php_ibase_trans_end()
1330 if (ib_link->tr_list == NULL || ib_link->tr_list->trans == NULL) { in _php_ibase_trans_end()
1335 trans = ib_link->tr_list->trans; in _php_ibase_trans_end()
1342 ib_link = (ibase_db_link *)zend_fetch_resource2_ex(arg, LE_LINK, le_link, le_plink); in _php_ibase_trans_end()
1344 if (ib_link->tr_list == NULL || ib_link->tr_list->trans == NULL) { in _php_ibase_trans_end()
1349 trans = ib_link->tr_list->trans; in _php_ibase_trans_end()
1421 ibase_db_link *ib_link; in PHP_FUNCTION() local
1438 PHP_IBASE_LINK_TRANS(link, ib_link, trans); in PHP_FUNCTION()
1453 if (isc_dsql_exec_immed2(IB_STATUS, &ib_link->handle, &trans->handle, 0, query, in PHP_FUNCTION()