Lines Matching refs:H
38 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in pdo_oci_fetch_error_func() local
41 einfo = &H->einfo; in pdo_oci_fetch_error_func()
64 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in _oci_error() local
75 einfo = &H->einfo; in _oci_error()
167 H->attached = 0; in _oci_error()
180 if (H->einfo.errmsg) { in _oci_error()
181 pefree(H->einfo.errmsg, dbh->is_persistent); in _oci_error()
183 H->einfo = *einfo; in _oci_error()
184 H->einfo.errmsg = einfo->errmsg ? pestrdup(einfo->errmsg, dbh->is_persistent) : NULL; in _oci_error()
200 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_closer() local
202 if (H->svc) { in oci_handle_closer()
204 OCITransRollback(H->svc, H->err, 0); in oci_handle_closer()
207 if (H->session) { in oci_handle_closer()
208 OCIHandleFree(H->session, OCI_HTYPE_SESSION); in oci_handle_closer()
209 H->session = NULL; in oci_handle_closer()
212 if (H->svc) { in oci_handle_closer()
213 OCIHandleFree(H->svc, OCI_HTYPE_SVCCTX); in oci_handle_closer()
214 H->svc = NULL; in oci_handle_closer()
217 if (H->server && H->attached) { in oci_handle_closer()
218 H->last_err = OCIServerDetach(H->server, H->err, OCI_DEFAULT); in oci_handle_closer()
219 if (H->last_err) { in oci_handle_closer()
222 H->attached = 0; in oci_handle_closer()
225 if (H->server) { in oci_handle_closer()
226 OCIHandleFree(H->server, OCI_HTYPE_SERVER); in oci_handle_closer()
227 H->server = NULL; in oci_handle_closer()
230 if (H->err) { in oci_handle_closer()
231 OCIHandleFree(H->err, OCI_HTYPE_ERROR); in oci_handle_closer()
232 H->err = NULL; in oci_handle_closer()
235 if (H->charset && H->env) { in oci_handle_closer()
236 OCIHandleFree(H->env, OCI_HTYPE_ENV); in oci_handle_closer()
237 H->env = NULL; in oci_handle_closer()
240 if (H->einfo.errmsg) { in oci_handle_closer()
241 pefree(H->einfo.errmsg, dbh->is_persistent); in oci_handle_closer()
242 H->einfo.errmsg = NULL; in oci_handle_closer()
245 pefree(H, dbh->is_persistent); in oci_handle_closer()
253 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_preparer() local
268 S->H = H; in oci_handle_preparer()
284 OCIHandleAlloc(H->env, (dvoid*)&S->stmt, OCI_HTYPE_STMT, 0, NULL); in oci_handle_preparer()
287 OCIHandleAlloc(H->env, (dvoid*)&S->err, OCI_HTYPE_ERROR, 0, NULL); in oci_handle_preparer()
290 H->last_err = OCIStmtPrepare(S->stmt, H->err, (text*)sql, sql_len, OCI_NTV_SYNTAX, OCI_DEFAULT); in oci_handle_preparer()
295 if (H->last_err) { in oci_handle_preparer()
296 H->last_err = oci_drv_error("OCIStmtPrepare"); in oci_handle_preparer()
307 H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, in oci_handle_preparer()
308 OCI_ATTR_PREFETCH_ROWS, H->err); in oci_handle_preparer()
309 if (!H->last_err) { in oci_handle_preparer()
311 H->last_err = OCIAttrSet(S->stmt, OCI_HTYPE_STMT, &prefetch, 0, in oci_handle_preparer()
312 OCI_ATTR_PREFETCH_MEMORY, H->err); in oci_handle_preparer()
329 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_doer() local
335 OCIHandleAlloc(H->env, (dvoid*)&stmt, OCI_HTYPE_STMT, 0, NULL); in oci_handle_doer()
337 H->last_err = OCIStmtPrepare(stmt, H->err, (text*)sql, sql_len, OCI_NTV_SYNTAX, OCI_DEFAULT); in oci_handle_doer()
338 if (H->last_err) { in oci_handle_doer()
339 H->last_err = oci_drv_error("OCIStmtPrepare"); in oci_handle_doer()
344 H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &stmt_type, 0, OCI_ATTR_STMT_TYPE, H->err); in oci_handle_doer()
354 H->last_err = OCIStmtExecute(H->svc, stmt, H->err, 1, 0, NULL, NULL, in oci_handle_doer()
357 if (H->last_err) { in oci_handle_doer()
358 H->last_err = oci_drv_error("OCIStmtExecute"); in oci_handle_doer()
361 H->last_err = OCIAttrGet(stmt, OCI_HTYPE_STMT, &rowcount, 0, OCI_ATTR_ROW_COUNT, H->err); in oci_handle_doer()
417 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_commit() local
419 H->last_err = OCITransCommit(H->svc, H->err, 0); in oci_handle_commit()
421 if (H->last_err) { in oci_handle_commit()
422 H->last_err = oci_drv_error("OCITransCommit"); in oci_handle_commit()
431 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_rollback() local
433 H->last_err = OCITransRollback(H->svc, H->err, 0); in oci_handle_rollback()
435 if (H->last_err) { in oci_handle_rollback()
436 H->last_err = oci_drv_error("OCITransRollback"); in oci_handle_rollback()
445 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_set_attribute() local
450 H->last_err = OCITransCommit(H->svc, H->err, 0); in oci_handle_set_attribute()
452 if (H->last_err) { in oci_handle_set_attribute()
453 H->last_err = oci_drv_error("OCITransCommit"); in oci_handle_set_attribute()
472 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in oci_handle_get_attribute() local
482 …if (OCIServerRelease(H->svc, H->err, infostr, (ub4)sizeof(infostr), (ub1)OCI_HTYPE_SVCCTX, &vernum… in oci_handle_get_attribute()
538 pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; in pdo_oci_check_liveness() local
545 if (H->attached == 0) { in pdo_oci_check_liveness()
557 H->last_err = OCIPing (H->svc, H->err, OCI_DEFAULT); in pdo_oci_check_liveness()
560 …H->last_err = OCIServerVersion (H->svc, H->err, (text *)version, sizeof(version), OCI_HTYPE_SVCCTX… in pdo_oci_check_liveness()
562 if (H->last_err == OCI_SUCCESS) { in pdo_oci_check_liveness()
566 OCIErrorGet (H->err, (ub4)1, NULL, &error_code, NULL, 0, OCI_HTYPE_ERROR); in pdo_oci_check_liveness()
593 pdo_oci_db_handle *H; in pdo_oci_handle_factory() local
602 H = pecalloc(1, sizeof(*H), dbh->is_persistent); in pdo_oci_handle_factory()
603 dbh->driver_data = H; in pdo_oci_handle_factory()
608 H->charset = OCINlsCharSetNameToId(pdo_oci_Env, (const oratext *)vars[0].optval); in pdo_oci_handle_factory()
609 if (!H->charset) { in pdo_oci_handle_factory()
613 …if (OCIEnvNlsCreate(&H->env, PDO_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, H->charset, H->chars… in pdo_oci_handle_factory()
620 if (H->env == NULL) { in pdo_oci_handle_factory()
622 H->env = pdo_oci_Env; in pdo_oci_handle_factory()
626 OCIHandleAlloc(H->env, (dvoid **)&H->err, OCI_HTYPE_ERROR, 0, NULL); in pdo_oci_handle_factory()
629 OCIHandleAlloc(H->env, (dvoid **)&H->server, OCI_HTYPE_SERVER, 0, NULL); in pdo_oci_handle_factory()
631 H->last_err = OCIServerAttach(H->server, H->err, (text*)vars[1].optval, in pdo_oci_handle_factory()
634 if (H->last_err) { in pdo_oci_handle_factory()
639 H->attached = 1; in pdo_oci_handle_factory()
642 H->last_err = OCIHandleAlloc(H->env, (dvoid**)&H->svc, OCI_HTYPE_SVCCTX, 0, NULL); in pdo_oci_handle_factory()
643 if (H->last_err) { in pdo_oci_handle_factory()
648 H->last_err = OCIHandleAlloc(H->env, (dvoid**)&H->session, OCI_HTYPE_SESSION, 0, NULL); in pdo_oci_handle_factory()
649 if (H->last_err) { in pdo_oci_handle_factory()
655 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, H->server, 0, OCI_ATTR_SERVER, H->err); in pdo_oci_handle_factory()
656 if (H->last_err) { in pdo_oci_handle_factory()
663 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in pdo_oci_handle_factory()
665 OCI_ATTR_USERNAME, H->err); in pdo_oci_handle_factory()
666 if (H->last_err) { in pdo_oci_handle_factory()
674 H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION, in pdo_oci_handle_factory()
676 OCI_ATTR_PASSWORD, H->err); in pdo_oci_handle_factory()
677 if (H->last_err) { in pdo_oci_handle_factory()
684 H->last_err = OCISessionBegin(H->svc, H->err, H->session, OCI_CRED_RDBMS, OCI_DEFAULT); in pdo_oci_handle_factory()
685 if (H->last_err) { in pdo_oci_handle_factory()
691 H->last_err = OCIAttrSet(H->svc, OCI_HTYPE_SVCCTX, H->session, 0, OCI_ATTR_SESSION, H->err); in pdo_oci_handle_factory()
692 if (H->last_err) { in pdo_oci_handle_factory()