Lines Matching refs:H

36 	pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;  in pdo_oci_fetch_error_func()  local
39 einfo = &H->einfo; in pdo_oci_fetch_error_func()
62 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in _oci_error() local
73 einfo = &H->einfo; in _oci_error()
159 H->attached = 0; in _oci_error()
172 if (H->einfo.errmsg) { in _oci_error()
173 pefree(H->einfo.errmsg, dbh->is_persistent); in _oci_error()
175 H->einfo = *einfo; in _oci_error()
176 H->einfo.errmsg = einfo->errmsg ? pestrdup(einfo->errmsg, dbh->is_persistent) : NULL; in _oci_error()
192 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_closer() local
194 if (H->svc) { in oci_handle_closer()
196 OCITransRollback(H->svc, H->err, 0); in oci_handle_closer()
199 if (H->session) { in oci_handle_closer()
200 OCIHandleFree(H->session, OCI_HTYPE_SESSION); in oci_handle_closer()
201 H->session = NULL; in oci_handle_closer()
204 if (H->svc) { in oci_handle_closer()
205 OCIHandleFree(H->svc, OCI_HTYPE_SVCCTX); in oci_handle_closer()
206 H->svc = NULL; in oci_handle_closer()
209 if (H->server && H->attached) { in oci_handle_closer()
210 H->last_err = OCIServerDetach(H->server, H->err, OCI_DEFAULT); in oci_handle_closer()
211 if (H->last_err) { in oci_handle_closer()
214 H->attached = 0; in oci_handle_closer()
217 if (H->server) { in oci_handle_closer()
218 OCIHandleFree(H->server, OCI_HTYPE_SERVER); in oci_handle_closer()
219 H->server = NULL; in oci_handle_closer()
222 if (H->err) { in oci_handle_closer()
223 OCIHandleFree(H->err, OCI_HTYPE_ERROR); in oci_handle_closer()
224 H->err = NULL; in oci_handle_closer()
227 if (H->charset && H->env) { in oci_handle_closer()
228 OCIHandleFree(H->env, OCI_HTYPE_ENV); in oci_handle_closer()
229 H->env = NULL; in oci_handle_closer()
232 if (H->einfo.errmsg) { in oci_handle_closer()
233 pefree(H->einfo.errmsg, dbh->is_persistent); in oci_handle_closer()
234 H->einfo.errmsg = NULL; in oci_handle_closer()
237 pefree(H, dbh->is_persistent); in oci_handle_closer()
245 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_preparer() local
260 S->H = H; in oci_handle_preparer()
276 OCIHandleAlloc(H->env, (dvoid*)&S->stmt, OCI_HTYPE_STMT, 0, NULL); in oci_handle_preparer()
279 OCIHandleAlloc(H->env, (dvoid*)&S->err, OCI_HTYPE_ERROR, 0, NULL); in oci_handle_preparer()
282H->last_err = OCIStmtPrepare(S->stmt, H->err, (text*)sql, (ub4) sql_len, OCI_NTV_SYNTAX, OCI_DEFAU… in oci_handle_preparer()
287 if (H->last_err) { in oci_handle_preparer()
288 H->last_err = oci_drv_error("OCIStmtPrepare"); in oci_handle_preparer()
297 …prefetch = H->prefetch; /* Note 0 is allowed so in future REF CURSORs can be used & then passed w… in oci_handle_preparer()
298 H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, in oci_handle_preparer()
299 OCI_ATTR_PREFETCH_ROWS, H->err); in oci_handle_preparer()
300 if (!H->last_err) { in oci_handle_preparer()
302 H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, in oci_handle_preparer()
303 OCI_ATTR_PREFETCH_MEMORY, H->err); in oci_handle_preparer()
319 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_doer() local
325 OCIHandleAlloc(H->env, (dvoid*)&stmt, OCI_HTYPE_STMT, 0, NULL); in oci_handle_doer()
327 H->last_err = OCIStmtPrepare(stmt, H->err, (text*)sql, (ub4) sql_len, OCI_NTV_SYNTAX, OCI_DEFAULT); in oci_handle_doer()
328 if (H->last_err) { in oci_handle_doer()
329 H->last_err = oci_drv_error("OCIStmtPrepare"); in oci_handle_doer()
334 H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &stmt_type, 0, OCI_ATTR_STMT_TYPE, H->err); in oci_handle_doer()
344 H->last_err = OCIStmtExecute(H->svc, stmt, H->err, 1, 0, NULL, NULL, in oci_handle_doer()
347 if (H->last_err) { in oci_handle_doer()
348 H->last_err = oci_drv_error("OCIStmtExecute"); in oci_handle_doer()
351 H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &rowcount, 0, OCI_ATTR_ROW_COUNT, H->err); in oci_handle_doer()
407 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_commit() local
409 H->last_err = OCITransCommit(H->svc, H->err, 0); in oci_handle_commit()
411 if (H->last_err) { in oci_handle_commit()
412 H->last_err = oci_drv_error("OCITransCommit"); in oci_handle_commit()
421 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_rollback() local
423 H->last_err = OCITransRollback(H->svc, H->err, 0); in oci_handle_rollback()
425 if (H->last_err) { in oci_handle_rollback()
426 H->last_err = oci_drv_error("OCITransRollback"); in oci_handle_rollback()
436 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_set_attribute() local
443 H->last_err = OCITransCommit(H->svc, H->err, 0); in oci_handle_set_attribute()
445 if (H->last_err) { in oci_handle_set_attribute()
446 H->last_err = oci_drv_error("OCITransCommit"); in oci_handle_set_attribute()
457 H->prefetch = pdo_oci_sanitize_prefetch(lval); in oci_handle_set_attribute()
468 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
470 OCI_ATTR_ACTION, H->err); in oci_handle_set_attribute()
471 if (H->last_err) { in oci_handle_set_attribute()
489 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
491 OCI_ATTR_CLIENT_INFO, H->err); in oci_handle_set_attribute()
492 if (H->last_err) { in oci_handle_set_attribute()
510 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
512 OCI_ATTR_CLIENT_IDENTIFIER, H->err); in oci_handle_set_attribute()
513 if (H->last_err) { in oci_handle_set_attribute()
531 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
533 OCI_ATTR_MODULE, H->err); in oci_handle_set_attribute()
534 if (H->last_err) { in oci_handle_set_attribute()
553 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_get_attribute() local
563 …if (OCIServerRelease(H->svc, H->err, infostr, (ub4)sizeof(infostr), (ub1)OCI_HTYPE_SVCCTX, &vernum… in oci_handle_get_attribute()
609 ZVAL_LONG(return_value, H->prefetch); in oci_handle_get_attribute()
622 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in pdo_oci_check_liveness() local
629 if (H->attached == 0) { in pdo_oci_check_liveness()
641 H->last_err = OCIPing (H->svc, H->err, OCI_DEFAULT); in pdo_oci_check_liveness()
644H->last_err = OCIServerVersion (H->svc, H->err, (text *)version, sizeof(version), OCI_HTYPE_SVCCTX… in pdo_oci_check_liveness()
646 if (H->last_err == OCI_SUCCESS) { in pdo_oci_check_liveness()
650 OCIErrorGet (H->err, (ub4)1, NULL, &error_code, NULL, 0, OCI_HTYPE_ERROR); in pdo_oci_check_liveness()
677 pdo_oci_db_handle *H; in pdo_oci_handle_factory() local
688 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_oci_handle_factory()
689 dbh->driver_data = H; in pdo_oci_handle_factory()
696 H->prefetch = PDO_OCI_PREFETCH_DEFAULT; in pdo_oci_handle_factory()
701 H->charset = OCINlsCharSetNameToId(pdo_oci_Env, (const oratext *)vars[0].optval); in pdo_oci_handle_factory()
702 if (!H->charset) { in pdo_oci_handle_factory()
706 …if (OCIEnvNlsCreate(&H->env, PDO_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, H->charset, H->chars… in pdo_oci_handle_factory()
713 if (H->env == NULL) { in pdo_oci_handle_factory()
715 H->env = pdo_oci_Env; in pdo_oci_handle_factory()
719 OCIHandleAlloc(H->env, (dvoid **)&H->err, OCI_HTYPE_ERROR, 0, NULL); in pdo_oci_handle_factory()
722 OCIHandleAlloc(H->env, (dvoid **)&H->server, OCI_HTYPE_SERVER, 0, NULL); in pdo_oci_handle_factory()
724 H->last_err = OCIServerAttach(H->server, H->err, (text*)vars[1].optval, in pdo_oci_handle_factory()
727 if (H->last_err) { in pdo_oci_handle_factory()
732 H->attached = 1; in pdo_oci_handle_factory()
735 H->last_err = OCIHandleAlloc(H->env, (dvoid**)&H->svc, OCI_HTYPE_SVCCTX, 0, NULL); in pdo_oci_handle_factory()
736 if (H->last_err) { in pdo_oci_handle_factory()
741 H->last_err = OCIHandleAlloc(H->env, (dvoid**)&H->session, OCI_HTYPE_SESSION, 0, NULL); in pdo_oci_handle_factory()
742 if (H->last_err) { in pdo_oci_handle_factory()
748 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, H->server, 0, OCI_ATTR_SERVER, H->err); in pdo_oci_handle_factory()
749 if (H->last_err) { in pdo_oci_handle_factory()
760 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in pdo_oci_handle_factory()
762 OCI_ATTR_USERNAME, H->err); in pdo_oci_handle_factory()
763 if (H->last_err) { in pdo_oci_handle_factory()
775 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in pdo_oci_handle_factory()
777 OCI_ATTR_PASSWORD, H->err); in pdo_oci_handle_factory()
778 if (H->last_err) { in pdo_oci_handle_factory()
785 H->last_err = OCISessionBegin(H->svc, H->err, H->session, OCI_CRED_RDBMS, OCI_DEFAULT); in pdo_oci_handle_factory()
786 if (H->last_err) { in pdo_oci_handle_factory()
792 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, H->session, 0, OCI_ATTR_SESSION, H->err); in pdo_oci_handle_factory()
793 if (H->last_err) { in pdo_oci_handle_factory()
799 H->last_err = OCINlsNumericInfoGet(H->env, H->err, &H->max_char_width, OCI_NLS_CHARSET_MAXBYTESZ); in pdo_oci_handle_factory()
800 if (H->last_err) { in pdo_oci_handle_factory()