Lines Matching refs:H

34 	pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;  in pdo_oci_fetch_error_func()  local
37 einfo = &H->einfo; in pdo_oci_fetch_error_func()
58 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in _oci_error() local
69 einfo = &H->einfo; in _oci_error()
155 H->attached = 0; in _oci_error()
168 if (H->einfo.errmsg) { in _oci_error()
169 pefree(H->einfo.errmsg, dbh->is_persistent); in _oci_error()
171 H->einfo = *einfo; in _oci_error()
172 H->einfo.errmsg = einfo->errmsg ? pestrdup(einfo->errmsg, dbh->is_persistent) : NULL; in _oci_error()
188 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_closer() local
190 if (H->svc) { in oci_handle_closer()
192 OCITransRollback(H->svc, H->err, 0); in oci_handle_closer()
195 if (H->session) { in oci_handle_closer()
196 OCIHandleFree(H->session, OCI_HTYPE_SESSION); in oci_handle_closer()
197 H->session = NULL; in oci_handle_closer()
200 if (H->svc) { in oci_handle_closer()
201 OCIHandleFree(H->svc, OCI_HTYPE_SVCCTX); in oci_handle_closer()
202 H->svc = NULL; in oci_handle_closer()
205 if (H->server && H->attached) { in oci_handle_closer()
206 H->last_err = OCIServerDetach(H->server, H->err, OCI_DEFAULT); in oci_handle_closer()
207 if (H->last_err) { in oci_handle_closer()
210 H->attached = 0; in oci_handle_closer()
213 if (H->server) { in oci_handle_closer()
214 OCIHandleFree(H->server, OCI_HTYPE_SERVER); in oci_handle_closer()
215 H->server = NULL; in oci_handle_closer()
218 if (H->err) { in oci_handle_closer()
219 OCIHandleFree(H->err, OCI_HTYPE_ERROR); in oci_handle_closer()
220 H->err = NULL; in oci_handle_closer()
223 if (H->charset && H->env) { in oci_handle_closer()
224 OCIHandleFree(H->env, OCI_HTYPE_ENV); in oci_handle_closer()
225 H->env = NULL; in oci_handle_closer()
228 if (H->einfo.errmsg) { in oci_handle_closer()
229 pefree(H->einfo.errmsg, dbh->is_persistent); in oci_handle_closer()
230 H->einfo.errmsg = NULL; in oci_handle_closer()
233 pefree(H, dbh->is_persistent); in oci_handle_closer()
239 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_preparer() local
253 S->H = H; in oci_handle_preparer()
268 OCIHandleAlloc(H->env, (dvoid*)&S->stmt, OCI_HTYPE_STMT, 0, NULL); in oci_handle_preparer()
271 OCIHandleAlloc(H->env, (dvoid*)&S->err, OCI_HTYPE_ERROR, 0, NULL); in oci_handle_preparer()
274H->last_err = OCIStmtPrepare(S->stmt, H->err, (text*) ZSTR_VAL(sql), (ub4) ZSTR_LEN(sql), OCI_NTV_… in oci_handle_preparer()
279 if (H->last_err) { in oci_handle_preparer()
280 H->last_err = oci_drv_error("OCIStmtPrepare"); in oci_handle_preparer()
289 …prefetch = H->prefetch; /* Note 0 is allowed so in future REF CURSORs can be used & then passed w… in oci_handle_preparer()
290 H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, in oci_handle_preparer()
291 OCI_ATTR_PREFETCH_ROWS, H->err); in oci_handle_preparer()
292 if (!H->last_err) { in oci_handle_preparer()
294 H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, in oci_handle_preparer()
295 OCI_ATTR_PREFETCH_MEMORY, H->err); in oci_handle_preparer()
311 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_doer() local
317 OCIHandleAlloc(H->env, (dvoid*)&stmt, OCI_HTYPE_STMT, 0, NULL); in oci_handle_doer()
319H->last_err = OCIStmtPrepare(stmt, H->err, (text*)ZSTR_VAL(sql), (ub4) ZSTR_LEN(sql), OCI_NTV_SYNT… in oci_handle_doer()
320 if (H->last_err) { in oci_handle_doer()
321 H->last_err = oci_drv_error("OCIStmtPrepare"); in oci_handle_doer()
326 H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &stmt_type, 0, OCI_ATTR_STMT_TYPE, H->err); in oci_handle_doer()
336 H->last_err = OCIStmtExecute(H->svc, stmt, H->err, 1, 0, NULL, NULL, in oci_handle_doer()
339 sword last_err = H->last_err; in oci_handle_doer()
342 H->last_err = oci_drv_error("OCIStmtExecute"); in oci_handle_doer()
347 H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &rowcount, 0, OCI_ATTR_ROW_COUNT, H->err); in oci_handle_doer()
404 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_commit() local
406 H->last_err = OCITransCommit(H->svc, H->err, 0); in oci_handle_commit()
408 if (H->last_err) { in oci_handle_commit()
409 H->last_err = oci_drv_error("OCITransCommit"); in oci_handle_commit()
418 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_rollback() local
420 H->last_err = OCITransRollback(H->svc, H->err, 0); in oci_handle_rollback()
422 if (H->last_err) { in oci_handle_rollback()
423 H->last_err = oci_drv_error("OCITransRollback"); in oci_handle_rollback()
433 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_set_attribute() local
445 H->last_err = OCITransCommit(H->svc, H->err, 0); in oci_handle_set_attribute()
447 if (H->last_err) { in oci_handle_set_attribute()
448 H->last_err = oci_drv_error("OCITransCommit"); in oci_handle_set_attribute()
463 H->prefetch = pdo_oci_sanitize_prefetch(lval); in oci_handle_set_attribute()
474 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
476 OCI_ATTR_ACTION, H->err); in oci_handle_set_attribute()
477 if (H->last_err) { in oci_handle_set_attribute()
495 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
497 OCI_ATTR_CLIENT_INFO, H->err); in oci_handle_set_attribute()
498 if (H->last_err) { in oci_handle_set_attribute()
516 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
518 OCI_ATTR_CLIENT_IDENTIFIER, H->err); in oci_handle_set_attribute()
519 if (H->last_err) { in oci_handle_set_attribute()
537 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in oci_handle_set_attribute()
539 OCI_ATTR_MODULE, H->err); in oci_handle_set_attribute()
540 if (H->last_err) { in oci_handle_set_attribute()
558 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, in oci_handle_set_attribute()
560 OCI_ATTR_CALL_TIMEOUT, H->err); in oci_handle_set_attribute()
561 if (H->last_err) { in oci_handle_set_attribute()
580 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_get_attribute() local
590 …if (OCIServerRelease(H->svc, H->err, infostr, (ub4)sizeof(infostr), (ub1)OCI_HTYPE_SVCCTX, &vernum… in oci_handle_get_attribute()
636 ZVAL_LONG(return_value, H->prefetch); in oci_handle_get_attribute()
643 H->last_err = OCIAttrGet(H->svc, OCI_HTYPE_SVCCTX, in oci_handle_get_attribute()
645 OCI_ATTR_CALL_TIMEOUT, H->err); in oci_handle_get_attribute()
646 if (H->last_err) { in oci_handle_get_attribute()
669 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in pdo_oci_check_liveness() local
676 if (H->attached == 0) { in pdo_oci_check_liveness()
688 H->last_err = OCIPing (H->svc, H->err, OCI_DEFAULT); in pdo_oci_check_liveness()
691H->last_err = OCIServerVersion (H->svc, H->err, (text *)version, sizeof(version), OCI_HTYPE_SVCCTX… in pdo_oci_check_liveness()
693 if (H->last_err == OCI_SUCCESS) { in pdo_oci_check_liveness()
697 OCIErrorGet (H->err, (ub4)1, NULL, &error_code, NULL, 0, OCI_HTYPE_ERROR); in pdo_oci_check_liveness()
727 pdo_oci_db_handle *H; in pdo_oci_handle_factory() local
738 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_oci_handle_factory()
739 dbh->driver_data = H; in pdo_oci_handle_factory()
746 H->prefetch = PDO_OCI_PREFETCH_DEFAULT; in pdo_oci_handle_factory()
751 H->charset = OCINlsCharSetNameToId(pdo_oci_Env, (const oratext *)vars[0].optval); in pdo_oci_handle_factory()
752 if (!H->charset) { in pdo_oci_handle_factory()
756 …if (OCIEnvNlsCreate(&H->env, PDO_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, H->charset, H->chars… in pdo_oci_handle_factory()
763 if (H->env == NULL) { in pdo_oci_handle_factory()
765 H->env = pdo_oci_Env; in pdo_oci_handle_factory()
769 OCIHandleAlloc(H->env, (dvoid **)&H->err, OCI_HTYPE_ERROR, 0, NULL); in pdo_oci_handle_factory()
772 OCIHandleAlloc(H->env, (dvoid **)&H->server, OCI_HTYPE_SERVER, 0, NULL); in pdo_oci_handle_factory()
774 H->last_err = OCIServerAttach(H->server, H->err, (text*)vars[1].optval, in pdo_oci_handle_factory()
777 if (H->last_err) { in pdo_oci_handle_factory()
782 H->attached = 1; in pdo_oci_handle_factory()
785 H->last_err = OCIHandleAlloc(H->env, (dvoid**)&H->svc, OCI_HTYPE_SVCCTX, 0, NULL); in pdo_oci_handle_factory()
786 if (H->last_err) { in pdo_oci_handle_factory()
791 H->last_err = OCIHandleAlloc(H->env, (dvoid**)&H->session, OCI_HTYPE_SESSION, 0, NULL); in pdo_oci_handle_factory()
792 if (H->last_err) { in pdo_oci_handle_factory()
798 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, H->server, 0, OCI_ATTR_SERVER, H->err); in pdo_oci_handle_factory()
799 if (H->last_err) { in pdo_oci_handle_factory()
810 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in pdo_oci_handle_factory()
812 OCI_ATTR_USERNAME, H->err); in pdo_oci_handle_factory()
813 if (H->last_err) { in pdo_oci_handle_factory()
825 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in pdo_oci_handle_factory()
827 OCI_ATTR_PASSWORD, H->err); in pdo_oci_handle_factory()
828 if (H->last_err) { in pdo_oci_handle_factory()
835 H->last_err = OCISessionBegin(H->svc, H->err, H->session, OCI_CRED_RDBMS, OCI_DEFAULT); in pdo_oci_handle_factory()
836 if (H->last_err) { in pdo_oci_handle_factory()
841 if (H->last_err != OCI_SUCCESS_WITH_INFO) { in pdo_oci_handle_factory()
847 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, H->session, 0, OCI_ATTR_SESSION, H->err); in pdo_oci_handle_factory()
848 if (H->last_err) { in pdo_oci_handle_factory()
854 H->last_err = OCINlsNumericInfoGet(H->env, H->err, &H->max_char_width, OCI_NLS_CHARSET_MAXBYTESZ); in pdo_oci_handle_factory()
855 if (H->last_err) { in pdo_oci_handle_factory()